Coca-Cola's (KO) business and stock price have been moving in opposite directions this year. While the beverage giant has consistently posted strong sales and earnings results, its shares have underperformed the wider market, falling slightly through late July, compared to a 19% surge in the S&P 500.

There are some potentially good reasons for that gap, including the slowing sales volume trends that the company revealed in its recent Q2 update. But Coke is also achieving some wins that imply excellent shareholder returns from here. Let's take a closer look.

The volume slowdown

The headline growth number in Coke's Q2 report wasn't much changed from the prior quarter. Organic revenue rose 11%, compared to a 12% increase in Q1.

However, that boost relied entirely on rising prices as there was no increase in sales volume. Last quarter, Coke achieved a better balance between rising prices and increased volume, suggesting moderating demand trends heading into the second half of 2023.

Yet management said they were encouraged by the broader growth results, which have put Coke on track for slightly faster organic sales gains this year. Executives now say they see revenue rising between 8% and 9% in 2023, up from the prior target range of 7% to 8%. "We are executing efficiently and effectively," CEO James Quincey said in a press release .

The green flags

Two big positive factors stand out in this report, though. Coke's finances are sparkling, for one. Its non-GAAP profit margin has increased to a blazing 32% of sales from 31% a year ago, thanks to the combination of several positive trends including cost cuts, price increases, and demand for products like sparkling water.

Free cash flow is impressive, too, at $4 billion over the past six months. That success is giving management plenty of resources to apply toward growth initiatives or toward direct shareholder returns, like dividends and stock buyback spending.

And Coke is winning market share in most of its biggest industry niches. These include core soda brands in the U.S., but also high-growth segments, like energy drinks, sports drinks, and sparkling water.

Good prices

Given those positive trends, investors might consider the stock an attractive buy at today's prices. You can own Coke for just over 6x annual sales right now, translating into a modest discount, compared to the valuation that investors were paying in early 2023.

There are cheaper alternatives in the industry, to be sure. PepsiCo is valued at below 3x revenue, for example. But a Coke investment comes with valuable factors, including industry-leading growth, profitability, and cash flow.

The stock pays a robust dividend, too, which yields just under 3% right now. Investors can view that dividend payment as a solid bonus to owning this stock, one that delivers immediate income while shareholders wait to accumulate capital gains.

Nothing in this latest earnings update threatens that bright long-term outlook for Coke, which can realistically target more sales growth and rising margins over the years to come.