Consumer spending patterns are always unpredictable, but the outlook is especially cloudy today. Inflation, rising interest rates, and slowing economic growth are all pressuring shoppers' budgets right now.

McDonald's (MCD 0.47%) has navigated those challenges so far, posting excellent sales growth through March along with a double-digit boost in profits. Let's take a closer look at the fast-food giant's early 2023 performance and what it could mean for the stock's path over the next few years.

Excellent growth

If shareholders were pleased with Mickey D's 2022 growth, they must be thrilled with its start to the new fiscal year. Comparable-store sales were up 13% in the core U.S. market and in all other geographies through late March. Comps increased just 10% in the U.S. last quarter and 12% overall.

Rising menu prices are helping, as investors have seen with most other consumer-facing businesses. But McDonald's is also attracting higher customer traffic even as it selectively raises prices. It is this balance that has investors excited about the chain's potential performance through a wide range of economic conditions. McDonald's can attract value-focused shoppers, as well as those looking to indulge their appetites.

Market-leading profits

As you might expect, the combination of strong growth and rising prices lifted earnings. Operating income rose 14% after accounting for currency exchange rate swings, outpacing the 8% reported revenue boost. McDonald's profit margin is headed toward a new high of 45% of sales, nearly three times the level that Chipotle (CMG 1.07%) enjoys.

CMG Operating Margin (TTM) Chart

CMG Operating Margin (TTM) data by YCharts

Sure, a huge part of that performance gap can be explained by the fact that McDonald's operates a highly efficient franchise model that profits from fees and rental charges rather than food sales. Yet it's still great news for shareholders that the company can push its profit margin higher simply by increasing market share and boosting customer satisfaction levels. "Running great restaurants is fundamental to our business momentum," CEO Chris Kempczinski said in a late April press release.

Looking ahead

There's no shortage of risks facing McDonald's business. Beyond the potential for a recession ahead, the chain is increasingly fighting against peers like Chipotle in the lucrative to-go and drive-thru channels. Maintaining its leadership position here requires constantly raising the bar on menu quality, prices, convenience, and customer service. It also frequently demands larger strategic shifts to respond to changing preferences. McDonald's revamped its menu, for example, as fast-food fans demanded fresher ingredients and healthier meal options.

Shareholders can't predict how the consumer and competitive landscape will change over the next few years. But McDonald's has demonstrated its ability to stay ahead of these shifts through a wide range of selling conditions. And its business is currently firing on all cylinders when it comes to growth and profitability.

It's no surprise, then, that the fast-food stock is richly valued today at over 9 times annual sales compared to Chipotle's price-to-sales ratio of 6.4. That valuation raises the risk that investors might overpay for McDonald's. Yet the chain has earned its premium through consistent market share wins, and more success on this score is likely to translate into more positive shareholder returns over the next few years.