Warren Buffett's Berkshire Hathaway (BRK.A -0.28%) (BRK.B -0.68%) owns 400 million shares of Coca-Cola (KO 1.50%), which gives it a 9.2% stake in the beverage company. Coca-Cola now accounts for 7.9% of Berkshire's portfolio, and it's the diversified holding company's third-largest investment after Apple and Bank of America.

Buffett, who claims to drink at least five 12-ounce cans of Coke every day, initiated Berkshire's position in the company back in 1988. The stock has rallied 2,560% since the beginning of 1988, and it's generated a total return of 5,810% after factoring in reinvested dividends. During that same period, the S&P 500 generated a total return of 1,450%.

Let's review the four main reasons Warren Buffett fell in love with Coca-Cola, and see if it's still a sparkling investment for long-term investors.

A person holds a Coca-Cola plate at Coca-Cola's Orlando store.

Image source: Coca-Cola.

1. The stock was undervalued

Berkshire bought 23 million shares of Coca-Cola in 1988 and 1989, when the market was still recovering from the Black Monday crash of 1987. Buffett paid an average price of $43.81 per share ($2.73 on a split-adjusted basis) -- or 15 times Coca-Cola's earnings per share (EPS) in 1988.

That price-to-earnings (P/E) ratio didn't make it a deep value stock, but Buffett believed it was undervalued relative to its growth potential. After all, Coca-Cola was already an evergreen brand that had dominated the beverage market for decades before Berkshire bought its first shares.

2. It's a "forever" stock

In Berkshire's 1988 shareholder letter, Buffett said he planned to hold Coca-Cola and its other latest investments "for a long time." He also explained that "when we own portions of outstanding businesses with outstanding managements, our favorite holding period is forever."

The company has grappled with declining soda consumption over the past decade, but it's largely offset that pressure by buying and developing new brands of juices, teas, sports drinks, bottled water, coffee, and even alcoholic beverages. It's also consistently refreshed its carbonated drinks with new flavors, smaller serving sizes, and healthier sugar-free versions.

That's why Coca-Cola's annual revenue rose from $8.3 billion in 1988 to $38.7 billion in 2021, representing a steady compound annual growth rate (CAGR) of 5%, even as sales of its namesake product stagnated. 

3. It's a Dividend King

Coca-Cola has raised its dividend annually for 60 straight years, making it a Dividend King. It's tough to join that elite club -- which only consists of the S&P 500 companies that have raised their payouts annually for at least 50 straight years -- because paying consistent dividends for decades requires a company to generate stable profits through countless crises and recessions.

Coca-Cola currently pays a healthy forward dividend yield of 2.8%. Therefore, Berkshire's 400 million shares of the company now net a whopping $704 million in dividend payments each year.

4. Coca-Cola buys back its own stock

Back in 2004, Buffett told investors that buybacks are "probably the best use of cash" when a company's stock is undervalued. Berkshire didn't launch its own buyback plan until 2011, but it frequently invests in companies that aggressively repurchase their own shares.

In 1987, Coca-Cola announced that it would repurchase up to 10.6% of its shares over the following three years, even though its stock had already risen every year since 1980. That bold decision likely convinced Buffett that the stock was cheap and still had room to run.

Coca-Cola has reduced its share count by 30% since the beginning of 1987. After pausing its buybacks during the pandemic, it plans to repurchase about $500 million in shares this year.

That might seem like a drop in the pond for a $274 billion company, but Coca-Cola's slow and steady buybacks will reward its long-term investors -- just as its reinvested dividends will boost their total returns.

Is Coca-Cola still a good long-term investment?

Coca-Cola's stock has risen about 17% over the past 12 months as rising interest rates drove investors toward defensive blue chip stocks. The stock doesn't look cheap at 26 times forward earnings, but it will likely retain that premium valuation as long as interest rates keep climbing.

For 2022, it expects its organic sales to rise 7% to 8%, and for its comparable EPS to grow 8% to 10% on a constant currency basis. That sunny outlook indicates it will easily weather the inflationary headwinds and remain an attractive investment throughout the bear market.

When the bear market finally ends, some investors might sell Coca-Cola to buy higher-growth stocks. But over the long term, I believe it will remain a well-balanced consumer staples stock and an evergreen investment.