McCormick (MKC 0.04%) modestly outperformed the wider market in 2022, but the packaged foods specialist's stock still ended the year with a double-digit percentage drop in value. Wall Street wasn't thrilled to see slowing sales growth and weakening profitability as consumers adjusted to more normal mobility patterns.

That stock price decline gave investors an unusually generous valuation for the spice, sauce, and flavorings giant. Let's look at a few reasons why that shift makes the stock an attractive buy in early 2023.

McCormick is now in a tasty market position

Sure, sales trends look weaker right now than they have in recent years. Revenue declined in the core consumer segment through the nine months that ended in late August due to several pressures including soaring growth in earlier phases of the pandemic. McCormick was pinched by weaker demand following some price increases, too.

But step back and you'll see plenty of evidence that this business hasn't missed a step in the bigger picture. Sales have risen in the core U.S. market at a compound annual growth rate of 8%, management estimates, in the last three years.

That level of success implies steady market share gains in a huge and growing global industry. Executives in October highlighted the momentum they are seeing in both the consumer and restaurant services segments over the last several years, notwithstanding the recent flare-up of demand volatility and supply chain issues. CEO Lawrence Kurzius said the strong underlying growth "reflects the strength of our broad global portfolio and the effective execution of our strategies."

Earnings pressures will ease

There are good reasons to believe McCormick will soon return to its more normal profit level, too. While some of the gross profit margin drop was due to consumers trading down to cheaper brands, much of it came from temporary industry challenges like currency exchange rate swings, supply constraints and spiking transportation costs. These issues have combined to push the margin to its lowest rate in years, but they aren't likely to remain as intense through 2023.

MKC Gross Profit Margin Chart

MKC Gross Profit Margin data by YCharts

In fact, McCormick is planning aggressive price increases through the next year that likely outpaces inflation. Combined with cost cuts and easing supply chain pressures, these moves should help annual earnings growth to again start reaching a double-digit rate.

Cash returns

McCormick announced a boost to its dividend in late 2022, revealing on Nov. 29 that the quarterly payout will increase to $0.39 per share from $0.37 per share in 2023.

While modest, that raise marks the 37th consecutive annual increase in McCormick's dividend. That fantastic track record is one more great reason to like this stock today. At current prices, the yield is roughly 1.8% and could move further toward 2% with the higher quarterly payout that starts in January.

It will be worth watching sales and gross margin trends in McCormick's late January quarterly announcement for signs of the improvements that management has been predicting. But investors who appreciate the business don't have to wait for that clarity. They can buy the stock now for about 3.5 times annual sales, whereas that valuation sat at nearly 5 times sales in late 2020.