Although both McDonald's (MCD -0.91%) and Starbucks (SBUX 0.47%) have seen their share prices rise about 50% in the past five years, neither business has produced a better return than the S&P 500, which is up some 65% during the same time. This might be discouraging for investors.

However, not all hope is lost. These two companies possess favorable traits that might make them worthy investments over the long term. So, is McDonald's or Starbucks a better restaurant stock to buy? Let's look at each in greater detail before coming to a decision.

The case for McDonald's

It's hardly a surprise that McDonald's would be thriving during a time of heightened economic uncertainty, high interest rates, and inflationary pressures. The fast-food burger chain crushed expectations by posting revenue of $6.7 billion and net income of $2.3 billion in the three-month period that ended Sept. 30.

Global same-store sales jumped 8.8%, a clear sign that consumers are finding value by choosing to eat at McDonald's locations. This attractive value proposition should benefit the business if a severe recession happens.

The great Warren Buffett once said, "The best business is a royalty on the growth of others." As a franchise operator, McDonald's fits the description here, as third parties provide the capital to fund store growth. Almost 90% of its restaurants in the U.S. aren't company-owned. And this has helped result in incredibly high gross and operating margins.

Mcdonald's shares currently sell at a forward price-to-earnings (P/E) multiple of 23.9. This represents a slight discount to the average valuation over the past couple of years. Investors might find this P/E ratio too high to pay for such a mature and established company.

But it's worth considering that in the past three years, revenue and diluted earnings per share have increased at compound annual rates of 7.3% and 10.5%, respectively, which are healthy clips. Between 2022 and 2025, Wall Street consensus estimates call for sales to rise at an annualized rate of 7.3%, with diluted EPS increasing at an 18.1% clip.

These figures would point to strong growth still ahead for McDonald's, which can justify its current valuation.

The case for Starbucks

Starbucks also was able to beat Wall Street estimates in its most recent fiscal quarter (Q4 2023, ended Oct. 1). Revenue was up 11.4%, with net income soaring 38.8%. What's very encouraging is that both traffic and the size of average tickets rose in the quarter.

Without a doubt, the coffeehouse giant's most important trait is its powerful brand recognition. The business has done a wonderful job at turning a commoditized product like coffee into something that people are willing to pay premium prices for now. Starbucks resonates with consumers, a standing that all companies want.

As of this writing, Starbucks shares trade at a forward P/E ratio of 24.4, about the same multiple as McDonald's. This represents a sizable discount to the trailing-two-year average of 31.2.

Additionally, Starbucks has registered impressive growth since the pandemic rattled its business. Between fiscal 2020 and 2023, revenue and diluted EPS rose at compound annual rates of 15.2% and 65.5%, respectively. Over the next five fiscal years, sales are expected to rise 10% per year, with diluted EPS increasing at an 18.3% clip.

It's hard not to get excited about these forecasts. Also bolstering Starbucks is an expanding store base. Management sees the potential for 55,000 locations worldwide by 2030, up from about 38,000 today.

Plus, the company's ability to lean heavily on its fantastic tech foundation and thriving rewards program, now with more than 75 million members globally, is a key competitive asset that helps drive engagement and informs strategic decisions around product and marketing initiatives.

And the winner is...

Both McDonald's and Starbucks are resilient restaurant concepts that possess strong brands, impressive growth metrics, and durable competitive positions. This means that they should be on the radar of all long-term investors.

But because I have to choose just one as the winner, I'm going to go with Starbucks. By paying a valuation similar to McDonald's, investors gain exposure to a business that has proven pricing power and greater growth potential.