Coca-Cola (NYSE:KO) has struggled to grow in recent years as shifting consumer preferences have gone against sugary sodas. The iconic beverage brand has had to transform itself, and recent earnings results have shown promising results. After five years of underperforming the broader market, Coca-Cola's stock price is up 7% year to date, ahead of the S&P 500's 3% return.

Let's weigh the pros and cons of the company's strategy to determine whether the stock is worth buying today.

KO Chart

KO data by YCharts.

Fighting headwinds

Coke's biggest problem in recent years has been the public's growing concern about sugar consumption. A few years ago, a survey by Nielsen Holdings found that 22% of Americans are reducing their sugar intake, while 52% said they are actively trying to avoid artificial sweeteners. The politicos are circling the wagons, as well, with the soda tax. These trends make it very difficult for Coke to grow revenue since soft drinks make up 69% of Coke's unit case volume. 

Coke has been struggling with slowing revenue growth for a while. Around 2014, growth was slowing to the low single digits, which prompted management to initiate a new plan to get the company growing faster. This involved refranchising its bottling operations to effectively separate these low-margin businesses from Coke's financial statements, a move intended to improve margins and allow both entities to focus on what they do best. 

Along the way, Coke made the strategic decision to become the "total beverage company." The company has expanded into juices, teas, energy drinks, and coffee. So far, the results are encouraging: Adjusted revenue growth slightly accelerated to about 5% this year. 

Additionally, the refranchising of its bottling operations and other cost-saving efforts have paid off, with operating margin up 6 percentage points in the third quarter. Analysts expect Coke to grow earnings per share 8.9% in 2018 -- not bad at all for a company that has been around since 1886. 

The only downside with management's total-beverage strategy is that non-soda products could put pressure on the company's margins over time. While energy drinks and coffee present growth opportunities for Coke, these markets are more competitive. Coke's highest-margin business is making Coca-Cola syrup, which it sells to its bottlers -- a business that makes up 51% of Coke's annual revenue. 

The company has generated high returns on invested capital for decades because of the attractive economic characteristics of this core business. It's those high returns that prompted Warren Buffett to initially buy the stock in 1988; Buffett's Berkshire Hathaway is still a major shareholder to this day. 

The uncertainty as to whether Coke can maintain its sky-high 30%-plus operating margin may be enough reason to avoid the stock for now. But here's why investors should consider buying the stock.

Coke's strengths

Coke is steady and fairly predictable in its annual performance, which is why Coke stock is considered a "defensive" holding when things get rough in the broader economy. Even with the tides moving against soda consumption, there are still a lot of people around the world who love Coke given that the company ships 13 billion Coca-Cola branded products every year worldwide. This allows the company to consistently pump out free cash flow, and the company distributes all of it to shareholders every year in the form of dividends and share repurchases. 

A Coca Cola red sitting on a brick walkway with a scenic view in the background.

IMAGE SOURCE: COCA-COLA.

Even if teas and coffee put pressure on Coke's margins over the long term, the company can use its massive distribution network and marketing muscle to drive higher growth with new products. Plus, Coke still has a lot of pricing power due to its brand strength, which it can use along with cost-saving efforts to keep margins up.

Also, Coke is demonstrating it can adapt to shifting consumer preferences. In the third quarter, the company reported double-digit growth in its Coca-Cola Zero Sugar beverage, an encouraging sign.

Should you buy the stock?

Even with the headwinds discussed above, I believe Coke still has a place in an investor's nest egg, but only at the right price. Right now, the shares fetch an expensive-looking forward P/E of 22 times next year's earnings estimates. That's a lot to pay for a company that is only growing in the single digits.

Although the stock offers an above-average dividend yield of more than 3% currently, I would wait for better prices before buying shares of Coca-Cola.

John Ballard has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Berkshire Hathaway (B shares). The Motley Fool has a disclosure policy.