For the past few years, McDonald's (MCD -0.60%) has been able to generate strong results amid inflation. The fast-food restaurant giant has been growing despite challenging economic conditions. It has raised prices without really having to feel a drastic impact on its top line.

But as inflation has continued to become a problem, investors and analysts have been wary that it may only be a matter of time before consumers start to push back against higher prices. And based on the company's most recent quarterly results, demand may indeed be slowing down.

Recent results were underwhelming

On April 30, McDonald's released its first-quarter results for the first three months of the year. Revenue of $6.17 billion surpassed analyst expectations of $6.15 billion, but adjusted earnings per share of $2.70 fell slightly below Wall Street's target of $2.72.

More concerning, however, was that same-store sales growth, a key metric for restaurants, was just 1.9%. A year ago, same-store sales were up a remarkable 12.6%. The company cited a "difficult macro environment" as a reason for its struggles, with consumers now being more price conscious than in the past.

While the company has still reported 13 consecutive quarters of comparable sales growth, the big concern is whether that growth rate will decline further down the road. Price increases have been a key part of McDonald's strategy and a way for the company to grow its numbers. But it may not be able to do that without impacting overall demand.

The stock's price is harder to justify

A slowing growth rate is a cause for concern with McDonald's stock because investors may be looking to pay a discount rather than a premium, for its shares. The stock has dipped since the earnings results came out and at a price-to-earnings multiple of 23, it's trading around the S&P 500 average.

McDonald's stock was trading at an all-time high earlier this year but as investors have become concerned about macroeconomic conditions, including not just inflation but boycotts in Israel, there have been warning signs that the company's results may worsen. And with the U.S. jobs report last week showing that there were fewer jobs added than expected, that may exacerbate worries about the state of the domestic economy as a recession may also be on the horizon.

Although McDonald's stock may not technically be overpriced, at a low-single-digit growth rate, it may end up commanding a lower earnings multiple than it has in the past in order to compensate for its less impressive numbers.

Is McDonald's stock still worth buying?

McDonald's is still a quality stock to own for the long term, particularly for dividend investors. Its dividend, which yields 2.5%, remains safe, and in the long run the company will bounce back and its growth rate should recover. McDonald's plans to continue expanding and reach 50,000 restaurants by 2027 (currently it has more than 40,000 locations), during what it calls the "fastest period of growth" in its history.

The recent results highlight a challenging period for the company but they don't suggest that the business is broken by any stretch. Investors should temper their expectations for the stock this year as with many forces potentially negatively impacting its operations, it could make for a bumpy ride and its near-term gains may be limited. But as long as you're willing to hang on to the stock for years, McDonald's can still make for an excellent investment.