Coca-Cola (KO 0.65%) is probably not the most exciting stock to watch. With its iconic soda and the more than 200 beverage brands it owns, its stock has traded since 1919, making it the definition of a mature company.

However, Warren Buffett's Berkshire Hathaway began adding positions in the stock in the late 1980s, eventually accumlating 400 million shares. Even though Berkshire has neither bought nor sold its shares since 1994, it remains a closely watched position, and its performance may help explain why.

Bottles of Coca-Cola in a refrigerator.

Image source: Getty Images.

Coca-Cola since 1995

A $1,000 investment in Coca-Cola 30 years ago would have grown to around $9,030 today.

KO Chart

KO data by YCharts.

This is primarily not because of the stock, which would be worth around $4,270. The remaining $4,760 comes from cumulative dividend payments over the last 30 years. Coca-Cola is a Dividend King, with 63 consecutive years of payout hikes.

Despite those returns, it may surprise investors that $1,000 invested in the S&P 500 over the same period would be worth approximately $20,000 today, more than double the return in Coca-Cola. Investors should note that Berkshire purchased shares before this time period, meaning Buffett has likely outpaced the S&P 500 with his Coca-Cola holding.

Moreover, since at least 1994, Buffett has not used the dividend proceeds to buy more Coca-Cola shares. Given today's price-to-earnings (P/E) ratio of 24, it is likely that Berkshire does not view Coca-Cola as a value play at current levels.

This does not mean that Coca-Cola stock is not a fit for income investors. Aside from the track record of increases, the current dividend yield of 2.9% is significantly above the S&P 500 average of 1.2%, making it attractive to that type of investor.

Nonetheless, investors cannot ignore the fact that Coca-Cola has underperformed the S&P 500 over the last 30 years. Unless one focuses exclusively on dividend income, Coca-Cola stock is probably not a suitable choice for investing one's cash.