A slowdown in the U.S. market couldn't stall positive global momentum for McDonald's (MCD 0.38%). That was the main takeaway from the fast-food titan's recent earnings report, which covered the selling period through late June.

To be sure, Mickey D's faced some major challenges in the period. Those included soaring costs and increased pressure on consumer spending from inflation. But the chain's report suggested that McDonald's might easily navigate through this volatile sales environment without sacrificing much in the way of investor returns.

Let's take a closer look.

Sales are up

McDonald's sales trends didn't miss a beat. While reported revenue fell 3%, that decline came entirely from currency exchange rate swings. Revenue rose 3% after accounting for those moves. Comparable-store sales, the chain's core growth metric, grew 10% to mark just a small slowdown compared to the prior quarter's 12% increase.

The U.S market was the weakest major geography with comps rising by less than 4%. But sales trends improved there, edging up by less than a full percentage point. McDonald's  executives highlighted success in the drive-thru and mobile ordering spaces as a key competitive advantage. "By focusing on our customers and crew, enabled by a rapidly growing digital capability," CEO Chris Kempczinski said in a press release, "we delivered global ... growth of nearly 10%."

Market-beating profit margin

Profit results for McDonald's show why many investors have flocked toward this recession-resistant stock. Restaurant-level earnings increased 8% after accounting for currency exchange rate shifts. The fast-food giant's adjusted operating margin rose to a market-leading 44% of sales compared to 43% of sales a year earlier.

Executives said inflation -- including higher input, labor, and transportation prices -- was more than offset by sales growth and higher prices. Cash flow was similarly strong, which suggests McDonald's will have no trouble increasing its dividend yet again in 2023.

The outlook

McDonald's doesn't issue short-term sales guidance, but its comments about the rest of 2022 ought to ease many investors' concerns. Operating profit margin should be a mid-40s percentage, executives confirmed, despite accelerating inflation.

The chain is pouring cash into its modernization efforts, including upgrading U.S. stores to better handle soaring demand for drive-thru and delivery. Its success here helps explain why McDonald's appears to be winning market share against peers like Starbucks, and management is ready to double down on that growth strategy.

There are major risks ahead for the business, of course, including the prospect for slowing economic growth around the world. A recession doesn't typically hit the fast-food industry very hard, but it would likely hurt sales and profit trends in the short term.

In the meantime, investors don't have to worry that McDonald's might be losing its edge as the world emerges from the pandemic. Sales are on pace to rise by around 10% this year after soaring in 2021, and operating profit margin is still perched well above 40% of sales.

Those factors, plus a rising dividend, should have investors feeling optimistic about this growing business despite the shaky consumer spending environment right now. The stock looks more attractive given that the price has dropped slightly since the start of 2022.