In Warren Buffet's 1988 letter to Berkshire Hathaway shareholders he wrote "when we own portions of outstanding businesses with outstanding managements, our favorite holding period is forever." What Buffett fully understands is that long-term compound interest is an investor's best friend. Holding shares of a growing business over many years can truly work wonders for an investor's financial goals.

Tesla (TSLA -1.11%) and Amazon (AMZN 3.43%) have already demonstrated that they have the ingredients to make investors a lot of money. Here's why these companies can continue to deliver shareholder returns for a long time.

Tesla

Tesla has a market capitalization of $705 billion -- the value of all the shares outstanding. This looks exceedingly high for a car company, but it reflects Tesla's industry-leading profit margin with more growth ahead.

While there are headwinds holding back electric-vehicle (EV) sales right now, such as rising interest rates, the future of auto is moving toward an electric future. Last year set a record for EV sales, which accounted for 7.6% of all vehicles sold in the U.S., according to Kelley Blue Book, up from 5.9% in 2022. Tesla delivered over 1.8 million vehicles in 2023, a good jump over the 1.3 million deliveries the previous year.

Tesla will face more competition as the market for EVs expands, but it's well positioned to create above-average returns for shareholders. It dominates the U.S. EV market with a 55% share, and it's accomplishing this while selling vehicles at a much higher profit margin than its competitors.

TSLA Profit Margin Chart

Data by YCharts

Tesla generated a net profit margin of 11% over the last year, even higher than BYD, Tesla's top EV rival in China. While Tesla has sacrificed some profit to sell more vehicles in a weak auto market, the company's investments in software and artificial intelligence (AI) capabilities open the door for profitable growth avenues that could increase its margin and earnings growth over the long term. That's why the market is willing to pay such a high valuation for the stock.

Most importantly, Tesla's superior profitability indicates a competitive advantage built on brand power. Tesla has beaten all the German luxury car brands in market share, and it achieved all this in just over a decade.

As Tesla continues to sell more EVs every year, investors should expect Tesla to invest the profits in areas that increase its margin and stock price for many years -- robotics, energy solutions, and so on.

Amazon

Amazon is the next growth stock investors should consider buying for the long haul. While Amazon's cloud services business is a key factor driving interest for the stock on Wall Street, Amazon's commanding position in the growing $5 trillion global e-commerce market will remain an important driver of the company's long-term growth. Like Tesla, Amazon still only commands a small share of its market.

Moreover, Amazon's free cash flow, a key measure of a company's profitability, has improved over the last year as management improves efficiency at the company's fulfillment centers. The stock is responding and will continue to climb with free cash flow over the long term.

AMZN Chart

Data by YCharts

Amazon still has several opportunities to improve profitability and deliver returns to investors. One opportunity is in retail media. Amazon attracts millions of customers to its site every day. This is turning the site into a powerful advertising platform. In the third quarter, revenue from advertising services grew 25% year over year, a $48 billion annual run-rate business.

Amazon is also pursuing other ways to create value for shareholders. Last year, it announced Buy With Prime in partnership with Shopify, which will allow Shopify merchants to offer all the benefits of Prime shopping to their customers. The added sales volume that could flow through Amazon's fulfillment centers could be very beneficial to its bottom line.

The stock is trading at a price-to-sales ratio of 2.9, a discount to the stock's pre-pandemic valuation, when it traded around 3.6 times sales or higher. Look for improving revenue growth and free cash flow to push the stock higher over the next few years, and from there, it should grow in value for years as Amazon pursues a multitrillion online shopping market.