Warren Buffett, who has held a large position in Coca-Cola (NYSE:KO) through Berkshire Hathaway (NYSE:BRK.A) (NYSE:BRK.B) since 1988, often claims to drink at least five cans of Coke every day. Investors who followed Buffett's lead back then are now sitting on some big millionaire-making gains.

Coca-Cola's stock has rallied roughly 2,080% since the beginning of 1988, and it generated a total return of 4,540% after factoring in reinvested dividends. But can Coca-Cola's stock keep rising over the next few decades as people drink fewer carbonated drinks worldwide?

Santa Claus flashes a handful of cash.

Image source: Getty Images.

Coca-Cola continues to evolve

Americans drank more soda than water in the 1980s, according to Beverage Digest. But today, the firm estimates that soda consumption rates in the U.S. are hovering near a 30-year low, and that secular decline is cascading across many of Coca-Cola's other top markets as health-conscious consumers avoid sugary drinks.

In response, Coca-Cola diversified away from sodas with new brands of bottled water, teas, fruit juices, energy drinks, coffee, and even alcoholic drinks. It bought a big stake in Monster Beverage (NASDAQ:MNST) in 2014, took over U.K. coffee giant Costa Coffee in early 2019, launched new alcoholic beverages like Lemondo in Japan, and introduced Coca-Cola-branded coffee and energy drinks.

To keep its flagship soda brands afloat, Coca-Cola launched healthier versions with less sugar, smaller serving sizes, and new flavors. It also refranchised its company-owned bottling operations worldwide over the past decade, which boosted its margins by allowing local bottlers to handle the capital-intensive bottling process.

Still a cash-generating machine

All these moves enabled Coca-Cola to consistently grow its free cash flow (FCF) and organic sales, which exclude acquisitions, divestments, and currency fluctuations, over the past three years:

Fiscal Year

2017

2018

2019

Organic Sales Growth

3%

5%

6%

Free Cash Flow

$5.3 billion

$6.0 billion

$8.4 billion

Source: Coca-Cola.

That robust FCF growth gives Coca-Cola plenty of room to repurchase shares and continue its 58-year streak of annual dividend hikes. In 2019, it bought back $1.1 billion in shares and paid out $6.8 billion in dividends.

Coca-Cola's forward dividend yield of 3.2% locks in patient investors, while its buybacks consistently boost its comparable EPS -- which grew 1% in 2017, 9% in 2018, and 1% in 2019. That slow and steady growth explains why it remains a popular stock for conservative income investors.

The pandemic causes some near-term headaches

Coca-Cola started out 2020 in a strong position with several new products in its pipeline, but its sales plunged as restaurants, bars, and other businesses shut down during the pandemic.

In the first nine months of the year, Coca-Cola's organic revenue dropped 11%, its FCF declined 17% to $5.5 billion, and its comparable EPS fell 4%. It didn't provide any guidance last quarter, but analysts expect its revenue and earnings to decline 11% and 10%, respectively, this year.

But next year, analysts expect its revenue and earnings to improve 10% and 12%, respectively, as the pandemic passes, businesses reopen, and it streamlines its business while launching new products.

Investors should always be skeptical of analysts' forecasts, but Coca-Cola has weathered numerous wars, economic meltdowns, and pandemics throughout its 101-year history as a public company -- so it will also likely recover from the current crisis. Investors don't seem too concerned about Coca-Cola's long-term prospects: Its stock only dipped about 6% this year as its revenue and profits tumbled.

But could Coca-Cola still be a millionaire-maker stock?

Coca-Cola could still generate solid returns over the next few decades, but it probably won't replicate its gains over the past 30 years. Coca-Cola generated just $8.3 billion in annual revenue back in 1988, but it's expected to generate $36.4 billion in revenue next year.

The law of large numbers -- along with declining soda consumption rates, competition, and the broader diversification of its portfolio -- all suggest Coca-Cola's revenue won't quadruple again within the next two or three decades. Therefore, Coca-Cola is the wrong stock for investors seeking quick millionaire-making returns. But it's still the right stock for investors who want to steadily grow their wealth with reliable dividends.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.