For more than 25 years, Coca-Cola (NYSE:KO) stock has been a centerpiece of Warren Buffett's investment portfolio at Berkshire Hathaway (NYSE:BRK-A) (NYSE:BRK-B). Many people have described this as one of Buffett's signature investments. Indeed, Buffett bought his Coke stock at a fraction of today's share price.

However, almost all of Buffett's gains came in the first decade of his Coca-Cola investment. In April 2013, I pointed out that Coke stock had barely budged in the last 15 years. Even factoring in dividends, the total return was just 45% from April 1998 to April 2013.

KO Chart

Coca-Cola Stock Performance, 4/8/1998-4/8/2013; data by YCharts.

Not much has changed since then. Once again, Coca-Cola has underperformed the market in the past year and a half. And declining interest in both regular and diet soda due to health concerns is likely to continue weighing on Buffett's investment results.

A great decade and a long run of underperformance
In the decade between April 1988 and April 1998, the S&P 500 soared more than 300%. However, by latching on to Coke stock instead, Buffett in that 10-year period achieved a mind-boggling gain of more than 1,500% -- before the impact of dividends!

KO Chart

Coca-Cola vs. the S&P 500, 4/8/1988-4/8/1998; data by YCharts.

However, by 1998, investors had become a little too excited about Coca-Cola. The company's run of strong earnings growth was about to end, yet Coke stock traded for about 50 times trailing earnings in early 1998.

As a result, Coca-Cola began to slide well before the rest of the market unraveled in 2000-2001. As shown in the first chart, it took 15 years for the stock to return to its all-time high.

The recent history of Coke stock
The last 20 months have been no better for Coca-Cola shareholders than the preceding 15 years. There have been ups and downs, but as of Thursday morning, Coke stock was very close to its April 2013 price. The S&P 500 has again left it in the dust.

KO Chart

Coca-Cola stock performance, 4/8/2013-present; data by YCharts.

Stagnant demand for soda continues to be at the root of Coca-Cola's problems. In October, the company acknowledged that it would miss its profit targets in 2014 and 2015 as its global soda volume growth had fallen to zero. Coca-Cola also lowered its long-term growth target in response to the ongoing sales slowdown.

The main thing keeping Coke stock afloat is management's promise to cut $3 billion in costs over the next few years. Some investors also hope Berkshire Hathaway will go all-in and lead a leveraged buyout alongside 3G Capital, the firm that Buffett recently partnered with to take Heinz private.

So many missed opportunities
Buffett hasn't lost any money from holding on to his Coke stock since it peaked in 1998. However, as the long-term growth story that he bought into has fallen apart over the last 10-15 years, the wisdom of keeping this $16 billion stake has become increasingly dubious.

Indeed, Buffett so routinely finds successful investments that he almost certainly would have done better by redeploying his capital from Coca-Cola to other opportunities. Alternatively, he could have used the proceeds from selling his Coke stock to buy back shares of Berkshire Hathaway, which has consistently provided investors a better total return than Coca-Cola.

KO Total Return Price Chart

Coca-Cola vs. Berkshire Hathaway Total Return, 4/8/1998-present; data by YCharts.

Berkshire Hathaway shareholders clearly can't complain about how they have fared under Warren Buffett's management. But they can certainly wonder about how much Buffett might have left on the table by being a bit too loyal to Coca-Cola.

Adam Levine-Weinberg has no position in any stocks mentioned. The Motley Fool recommends Berkshire Hathaway and Coca-Cola. The Motley Fool owns shares of Berkshire Hathaway and has the following options: long January 2016 $37 calls on Coca-Cola and short January 2016 $37 puts on Coca-Cola. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.