What happened

McCormick (MKC -1.31%) investors beat a rising market this week. The spice and flavorings specialist's stock rose 11% through Thursday trading compared to a 2% boost in the wider market, according to data provided by S&P Global Market Intelligence. Yet McCormick shares are still underperforming the S&P 500 so far in 2023, down 3% compared to the market's 5% increase.

This week's rally was sparked by positive news on the earnings front.

So what

McCormick announced fiscal first-quarter results on Tuesday, and investors found plenty of things to like in that report. Sales rose 7% after accounting for currency exchange rate swings and the divestment of its "kitchen basics" segment. That result marked a solid acceleration as compared to the prior quarter, when revenue grew at a roughly 4% pace on that basis.

Profitability trends improved as well, with gross profit margin declining less than 1 percentage point after falling by nearly 4 percentage points in late 2022.

Management celebrated the progress on both the sales and earnings fronts. "We delivered solid first quarter results which reflect strong demand and early results from our actions to increase our profit realization in 2023," CEO Lawrence Kurzius said in a press release.

Now what

Investors are hopeful that these results mean that McCormick is past the worst of its profit challenges that hurt earnings in 2022. Spiking costs, plus a few supply chain bottlenecks, caused earnings to fall last year even as sales inched higher.

The consumer staples company's 2023 outlook is calling for sales to rise by about 6% while earnings expand at a close to 10% rate. These figures align well with management's long-term goals surrounding total investor return.

That's why it makes sense that the stock would rebound this week. Assuming no major new economic pressures develop, McCormick is on track to return to its prior impressive pace of earnings generation this fiscal year.