PepsiCo (PEP -2.97%) and McCormick (MKC 0.44%) shares both delivered market-beating returns to shareholders in 2022. Wall Street loves the two packaged foods specialists, which have attractive growth outlooks despite slowing economic growth trends. Their pricing power looks solid, too, implying strong earnings through inflation.

But which one is the better buy in early 2023? Let's dive right in.

PepsiCo is growing

Pepsi has the stronger growth momentum today, and it isn't even close. Sales were up a blazing 16% in its fiscal third quarter, which ended in early September, and are up 14% through the first three quarters of the year. McCormick, on the other hand, just reported a 6% sales increase and is expecting to reach roughly 4% for the full 2022 year.

PepsiCo raised its short-term outlook in its most recent earnings update. "We are very pleased with our results," CEO Ramon Laguarta said in the earnings release. McCormick, in contrast, cited several pressures on its business through late 2022, including supply challenges and demand problems sparked by rising prices. If growth is your main priority, then PepsiCo seems like the clear choice here.

McCormick is more profitable

On the other hand, McCormick has a more attractive profit profile. While margins have dropped in recent quarters, its portfolio leans more toward higher-priced sauces and condiments, which is reflected in its profitability.

MKC Operating Margin (TTM) Chart

MKC Operating Margin (TTM) data by YCharts

Look for this factor to improve even more as 2023 progresses. McCormick's management team is planning rounds of price increases through the year that begin to recapture all of the extra costs the company incurred as costs skyrocketed through late last year. "Our price increases are catching up with the pace of inflation," CEO Lawrence Kurzius told investors in early October. "We plan to fully offset inflation over time," he added.

The better price

PepsiCo seems like the better value today with shares trading at 2.9 times sales compared to McCormick's 3.4 ratio. Pepsi is growing more quickly and showing stronger earnings growth, too.

The valuation gap makes sense if you believe McCormick is poised to generate faster sales gains in 2023 after having worked through its supply chain challenges. The bullish thesis for this stock also assumes that gross profit margin will quickly start climbing back toward 40% of sales by late 2023.

Yet Pepsi already has many of the strong metrics that investors are hoping McCormick will start showing in a few quarters. The snack food and beverage giant is winning market share across several consumer staples food niches. It has demonstrated its pricing power, and its business is flush with cash. Toss in a growing dividend, and you've got a recipe for excellent long-term returns.

Both of these businesses will likely be setting new operating records in a few years, and they each can thrive through a recession, should one strike in 2023. But Pepsi is valued at a discount that doesn't seem to reflect its massive competitive advantages and gushing cash flows. That's why investors should consider buying the stock as a great way to add more growth and income to their portfolios.