Coca-Cola (NYSE:KO) was the best-performing stock of the 20th century according to some measurements. The company says that if you had bought a single share of Coke for $40 during its IPO in 1919, it would have turned into $9.8 million by 2012 with dividends reinvested.

Coca-Cola grew to fame and fortune in 20th century as it blanketed the world with its trademark beverage and leveraged that distribution network to popularize other brands like Sprite and Fanta. Today, Coke products are sold at drugstores, newsstands, restaurants, bars, cafes -- basically anywhere someone might need a drink.

A selection of Coca-Cola beverage on a counter

Image source: Coca-Cola.

However, the 21st century hasn't been as kind to the soda giant. In the U.S. and elsewhere, soda is seen by many as the new tobacco; the sugary drinks provide no health benefits and lead to obesity, diabetes, and other health problems. Legislators have passed soda taxes at both the local and national levels in countries like Mexico and in Europe, and sales both of regular and diet sodas have declined.

As a result, the stock has significantly underperformed the market over the last five years, failing to benefit from the recent bull run as the chart below shows.

KO Chart

KO data by YCharts

Still, there's always an argument for investing in a timeless stalwart like Coca-Cola. Let's take a look at both sides of the debate to determine if this beverage giant is a buy today.

The buy case

Even as soda has caught the ire of public health officials, politicos, and others, it's still a hugely popular product, and Coca-Cola is the fourth-most valuable brand according to Interbrand, which values it at $69.7 billion. That brand strength gives Coke pricing power, as it means consumers will generally favor it over an unfamiliar competitor, and will pay up to purchase it.

Along with its brand, another key competitive advantage is the company's distribution network: it sells in over 200 countries with millions of points of sale. That network gives the company an edge over smaller brands, which can struggle to get shelf space in supermarkets and convenience stores. It's also been a key component in the company's acquisition strategy as Coca-Cola has sought to bring still-beverage brands into the fold, including VitaminWater, Zico coconut water, and Honest Tea, as that category is growing faster than sparkling drinks. Today the company has 21 billion-dollar brands, showing that it is much more than its namesake soda. 

Finally, Coca-Cola's history offers investors some security. The stock is a Dividend Aristocrat, having raised its dividend for 55 years in a row, and offers a dividend yield of 3.1%. In recent years it's hiked its dividend by about  6%, and the company is expected to raise the quarterly payout again in March. For defensive-minded income investors, Coke has always been a popular choice.

The sell case

Coca-cola stock has underperformed lately for a reason. The trends pressuring soda sales around much of the world are clearly visible in the company's own financial reports, and the market expects them to persist. Through the first three quarters of 2017, organic revenues increased 2%; however, that uptick was entirely based on price, as unit case volume was flat and sales of concentrate declined 1%. In other words, Coca-Cola's revenue has gone up because prices have increased, not because it's selling more product. Comparable currency-neutral pre-tax net income was up 7% over the last nine months. 

Notably, Coca-Cola only sells beverages, which is one big reason it's underperformed rival Pepsico (ETR:PEP) in recent years, which has diversified into snack foods under the Frito-Lay brand and healthier products with Quaker. Though Coca-Cola has considered acquiring a food brand, and reportedly mulled a bid for yogurt brand Chobani, the company has yet to do so. As its recent performance shows, its total dependence on beverages has served it poorly.

Additionally, Coke's valuation isn't cheap for a slow-growing company facing macro challenges: the stock trades at a P/E of 26.5. Considering analysts are only expecting 5% EPS next year, the stock looks overvalued. 

Finally, in today's bull market, Coca-Cola, as a defensive company that sells consumables, seems poised to underperform both faster-growing sectors (like tech) and cyclicals (like industrials and financials) as investors have clearly favored such industries of late.

Free refills?

New CEO James Quincey outlined bold goals at the company's Investor Day conference in November, reiterating long-term targets of mid-single-digit organic revenue growth and high-single-digit earnings-per-share growth, boosted by the company's share buyback program. However, it won't be easy to achieve those goals with the headwinds against soda.

Coke is adjusting its business to changing consumer tastes, both with acquisitions like sparkling mineral water brand Topo Chico and with its own innovations like the recent launch of new Diet Coke flavors like mango and ginger lime, along with Coca-Cola Zero Sugar. However, efforts to stem the tide against soda have not been particularly successful, and despite diversification efforts the vast majority of Coke's business -- about 64% -- is based on sodas.

With its impressive history, global brand, strong profit margins, and reliability as a dividend payer, Coke may be an appealing play for a defensive investor focused on wealth conservation rather than maximizing returns. However, for the average investor Coca-Cola is not a buy. In today's market, the stock looks like it will continue to underperform the S&P 500, and public sentiment against soda is likely to persist, especially as organic and natural foods become more popular. I'd put my money elsewhere.

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.