Warren Buffett knows a thing or two about picking stocks. As CEO of Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%), he delivered a staggering return of 3,787,464% to the company's shareholders from 1965 to 2022. 

He has applied a proven strategy of buying shares in wonderful businesses and holding onto them for years. Two of the largest holdings in Berkshire Hathaway's equity portfolio are Coca-Cola (KO) and Apple (AAPL -0.35%). Here's why they should deliver good returns for many years.

Coca-Cola

Coca-Cola enjoys a dominant position as the top non-alcoholic beverage company in the world. Its iconic brand is the primary reason Buffett initially invested in the stock more than 30 years ago. As of the end of 2023's first quarter, Berkshire still held 400 million shares of the beverage giant.

The stock has gained 40% over the last five years, and factoring in dividends, it has returned almost 61%. While the company has faced more competition in recent years, it's impressive that its market share in the non-alcoholic beverage segment has continued to march higher: From 42% in 2004, it rose gradually to a high of 46.3% in 2021, according to Statista. 

Keep in mind, Coca-Cola has underperformed the total return of S&P 500 index, including dividends, over the last five- and 10-year periods. This isn't a high-growth business that is going to deliver big returns. But the stock's above-average dividend yield of 3% could help boost your portfolio's income, if that's what you're looking for. 

Coke stock has also been somewhat less volatile over the last year compared to the broader market, which is why investors consider it a top defensive stock when market uncertainty rises.

KO Total Return Price Chart

Data by YCharts

However, Coke has performed roughly in line with the market's return over the last three years, as revenue and earnings growth has been much stronger since the pandemic. Some consumer brands have relied almost exclusively on price increases to keep growing and offset inflationary costs, but Coke has also grown its unit volumes despite charging more for its products. 

Coke owns numerous brands, including Minute Maid, Powerade, and Simply. It's seeing balanced demand across its soda, water, coffee, and juice brands. The only categories that saw declines in unit case volume last quarter were sports drinks and teas.

These results reflect the company's marketing expertise and global distribution system, which is a key part of its competitive advantage. Coke's strategy is to invest in marketing and innovation to keep its beverages relevant to consumers. Its stellar adjusted revenue and earnings growth of 12% year over year in the first quarter shows that it's a well-oiled machine. 

Coca-Cola is simply a world-class consumer products company that should deliver satisfactory returns for a long time. 

Apple

Apple is the largest holding in Berkshire Hathaway's stock portfolio. As of the end of the first quarter, it held over 915 million shares worth over $150 billion. That dwarfs its Coca-Cola stake, which was valued at almost $25 billion. Buffett loves both for their dominant brand presences in their respective industries, but there's another characteristic they share that speaks to their competitive advantages.

People around the world consume more than 2 billion servings of Coke products a day. Likewise, Apple has more than 2 billion active devices in people's hands worldwide. But what's better about Apple's position is that many of these users have credit cards on file with the company, making it a frictionless process for them to purchase apps and subscriptions through the App Store.

Coke generated a profit margin of 22.7% over the last year, while Apple's margin was 24.5%. It's no coincidence that Buffett loves Apple.

Like Coke, Apple is a master of marketing. Its products are not always the most technically advanced on the market. It's common for its competitors to introduce a new technology or feature to their mobile devices well before Apple brings it to the iPhone -- if it chooses to at all. Samsung, for example, beat Apple to the punch with a foldable smartphone; Apple is now rumored to be working on the same. Nonetheless, Apple generates $385 billion in annual revenue because people enjoy using its devices. 

Apple stock recently surged to new all-time highs and trades at an expensive forward price-to-earnings ratio of 31. That's higher than both Coke's ratio of 23.5 and the S&P 500's earnings multiple of 25. Wall Street analysts are starting to express concern about the downside risks for Apple's stock if the economy dips into a recession and iPhone sales slow.

By all accounts, Buffett doesn't make investment decisions based on whether he thinks a recession is coming. The reason has to do with his long-term approach to investing. A slight dip in sales due to a recession is irrelevant to his view of a company's long-term worth. 

If you aren't willing to own a stock for 10 years, don't even think about owning it for 10 minutes. Put together a portfolio of companies whose aggregate earnings march upward over the years, and so also will the portfolio's market value.

-- Warren Buffett, 1996 Berkshire Hathaway shareholder letter

Wall Street is concerned about next quarter's iPhone sales, but as Buffett suggests, all that matters is how Apple is investing its money to fuel long-term growth in the business.

On that note, Apple continues to plow billions into R&D for new technologies and products -- $28.7 billion in the past year, to be exact. The company just released its Vision Pro virtual reality headset, and there will no doubt be more to come, especially in more advanced artificial intelligence features.

If you think like Buffett and are more concerned about what your portfolio will be worth in 10 years or more than with what it will be worth in 2024, I don't think you can go wrong with Coca-Cola and Apple.

Of course, no business is without risks. Apple must continuously battle other smartphone and tech manufacturers for customers, and Coca-Cola is always navigating the shifting tides of consumer preferences. But these companies have long histories of delivering growth and returns, which makes them no-brainer stocks to anchor your portfolio for the long term.