PepsiCo (PEP 1.08%) and Coca-Cola (KO 2.14%) stocks did not really participate in the rally that pushed markets higher in the first few weeks of 2023. The consumer staples giants lag the S&P 500 through mid-February as Wall Street shifts some of its attention back toward growth and tech stocks.

That underperformance presents an opportunity for investors looking for attractive stocks that can add stability, income, and growth to a balanced portfolio. But which one of these two beverage giants is the better stock buy today? Let's dive right in.

Growing through challenges

Both companies closed out a strong fiscal 2022 on a positive note. PepsiCo said in early February that organic sales growth was a blazing 15% through late December as consumers continued purchasing its beverages and snacks even as prices rose. Coke announced on Feb. 14 that it increased sales by 15% in fiscal 2022, too. Both companies are winning market share and adding to strong sales results from earlier phases of the pandemic.

There are warning signs in the latest reports, though. PepsiCo's volume trends turned negative in the second half of 2022, and so did Coca-Cola's. Yet those modest declines were easily offset by raised prices and a shift toward more expensive beverage and snack innovations. "Our growth culture is leading to new approaches, more experimentation, and improved agility," Coke CEO James Quincey said in a press release.

Cash and profits

Coca-Cola wins the matchup with respect to earnings. The soda titan kept its market-leading operating margin at roughly 29% of sales in 2022, while Pepsi's declined to 13% of sales.

KO Operating Margin (TTM) Chart

KO Operating Margin (TTM) data by YCharts

PepsiCo executives said that they aim to boost profitability toward a mid-teens percentage, with continued help from cost cuts and its highly profitable Frito-Lay snack segment. Yet big gains here might take at least another year to show up, while Coke is already showing excellent earnings growth. Both companies are cash-generating machines, with over $20 billion of annual free cash between them.

Outlook and valuation

Both companies are targeting roughly 9% higher earnings in 2023 (after accounting for currency exchange rate shifts). Coke forecasts slightly faster growth, with organic sales rising between 7% and 9% compared to PepsiCo's 6% projection. PepsiCo stock is paying out a 10% higher dividend in 2023, and that hike was double the rate of Coke's most recent boost. Income investors can expect to see further aggressive dividend increases from Pepsi over the next several years.

You'll also have to pay a large premium for Coke's shares compared to Pepsi's. The stock is trading for over 6 times sales, or about twice Pepsi's valuation. Sure, that premium reflects a few serious advantages that Coke has, including higher profitability and less exposure to supply chain challenges. But value-focused investors are still going to gravitate toward PepsiCo.

In any case, the two companies' recent earnings updates show that their consumer staples businesses are as strong as ever across key metrics like market share, pricing power, and cash flow. Those assets haven't translated into big gains for their stock prices in the past year. However, it is likely only a matter of time before Wall Street rewards these high-performing businesses with market-beating stock returns.