Apple (AAPL -0.60%) and Coca-Cola (KO 0.26%) are two of Warren Buffett's favorite stocks. Buffett's Berkshire Hathaway (BRK.A 0.43%) (BRK.B 0.47%) currently allocates a whopping 47% of its portfolio to Apple, making it the company's single largest investment, and another 7% to Coca-Cola, its third-largest investment.

Buffett loves both companies because they have unmatched brand appeal, generate plenty of cash, consistently repurchase their shares, and pay out steady dividends. But which of these iconic American brands is a better investment right now?

The Apple Store in Manhattan.

Image source: Apple.

Apple faces a tough near-term slowdown

Apple's revenue and earnings per share (EPS) grew 8% and 9%, respectively, in fiscal 2022 (which ended last September). But for fiscal 2023, analysts expect its revenue and EPS to decline 9% and 6%, respectively.

Three factors are causing that slowdown: the market's waning appetite for new iPhones (which accounted for 53% of its revenue in the first nine months of fiscal 2023), declining shipments of Macs in a post-pandemic market, and intense currency headwinds.

Apple also faces unpredictable macro and regulatory challenges in China (which accounted for a fifth of its revenue in the first nine months of fiscal 2023) as the tech and trade war between the U.S. and China intensifies.

Apple has been trying to diversify its supply chain away from China while selling more devices in higher-growth markets like India, but it could take at least a few more years for those strategies to move the needle.

On the bright side, Apple's services ecosystem locked in more than a billion paid subscribers as of the end of the third quarter. About 92% of iPhone users still plan to stick with Apple for their next smartphone purchase, according to ZipDo, and it will continue to expand its prisoner-taking ecosystem with new products like the Vision Pro.

The tech titan is sitting on $166 billion in cash and marketable securities -- which gives it plenty of room to grow through fresh investments and acquisitions -- and it already bought back nearly a fifth of its shares over the past five years. Apple's modest forward yield of 0.6% won't attract any serious income investors, but its low payout ratio of 16% suggests the company has plenty of room to increase the dividend as its business matures.

Coca-Cola continues to generate evergreen returns

Coca-Cola suffered a rare slowdown in 2020 as restaurants and other customers closed during the pandemic. But its organic sales grew 16% in both 2021 and 2022 as those headwinds eased. It expects its organic sales to grow 10% to 11% in 2023, even as inflation curbs the spending power of the average consumer.

Coca-Cola's stable growth has been driven by three long-term tailwinds: the diversification of its portfolio beyond carbonated drinks with teas, juices, sports drinks, bottled water, coffee, and even alcoholic beverages; revival of its flagship sodas with new flavors, smaller serving sizes, and healthier versions for younger consumers; and its evergreen brand appeal compared to other beverages. Those core strengths countered the bearish notion that Coca-Cola's business would eventually shrivel as soda consumption rates declined across the world.

Coca-Cola's adjusted EPS increased 7% in 2022, even as inflation boosted its commodity costs, and it expects another 7% to 8% growth in 2023. Those rock-solid growth rates enabled Coca-Cola to end its latest quarter with over $14 billion in cash, cash equivalents, and short-term investments.

The company continues to buy back its shares, but its share count still grew about 1% over the past five years as its stock-based compensation slightly offset buybacks.

Meanwhile, Coca-Cola has raised its dividend annually for 61 consecutive years and currently pays an attractive forward yield of 3.3%. Its sustainable payout ratio of 74% suggests it can continue to boost its dividend annually for the foreseeable future.

The valuations and verdict

Apple trades at 26 times forward earnings, while Coca-Cola has a lower forward multiple of 20. Those valuations might seem a bit high relative to their near-term growth rates, but that's because investors flocked to both stocks over the past year as inflation, rising rates, and other macro headwinds rattled the markets.

I believe Apple and Coca-Cola are both still reliable long-term investments. But if I had to pick one over the other right now, I'd stick with Coca-Cola because it's better diversified, it holds up better during deep economic downturns, its stock is cheaper, and it pays a much higher dividend.