What happened

Shares of Coca-Cola (KO 0.26%) rose 6.3% over the first six months of 2022, according to data provided by S&P Global Market Intelligence, as the beverage maker has deftly navigated a market ravaged by inflation. In comparison, the S&P 500 fell 20.5%, putting it into bear market territory.

Unlike with other consumer products companies, the power of Coca-Cola's brand value enabled the drink master to raise prices to offset its costs without taking much of a hit to sales. 

Rows of red soda cans.

Image source: Getty Images.

So what

CEO James Quincey told analysts during Coke's first-quarter earnings conference call in April that "trying to catch up on pricing in a recessionary environment is very hard, and so we have a bias to action."

In certain markets, like Latin America, where Coca-Cola is far and away the dominant soft drink provider, its pricing actions aren't always followed immediately by the competition, so it can give up some market share in the process. Rivals, though, can eat profits for only so long before they, too, are forced to raise prices, and in the interim Coca-Cola has protected its margins.

While Coca-Cola is kicking the butt of the broad market index at the moment, for too long the soda stock has trailed far behind. Over the past decade, Coke's total return has been 122%, or half the 245% return of the market, and that includes the S&P 500's current loss of a fifth of its value this year. 

At the end of last year, the gap in performance was better than 3 to 1.

Now what

Yet one of the big reasons investors do buy Coca-Cola stock is its dividend, which currently yields 2.8% annually. Big Red has also consistently raised its payout every year for over 60 years, making it a Dividend King, a rarified group of stocks that have increased their dividends annually for 50 years or more.

It's not necessarily a bad idea. Several years ago, J.P. Morgan Asset Management found that stocks that initiated and then raised their payouts over a 40-year period between 1972 and 2012 returned an average of 9.5% annually, versus just 1.6% for non-dividend-paying stocks.

In addition to the dividend, though, Coke investors can enjoy the turnaround its business is witnessing as sales grow, margins are climbing, and it is now producing more free cash flow. That's a trifecta that helped push Coca-Cola's stock higher across the first half of the year.