Both quick service restaurants McDonald's (NYSE:MCD) and Panera Bread (NASDAQ:PNRA.DL) have disappointed investors lately. Shareholders cringed at Mickey D's first annual drop in global same-store sales since 2002. And Panera posted slowing growth and flat profits last year while projecting an even worse earnings performance ahead. Both companies are losing to the market over the past year.

PNRA Chart

PNRA data by YCharts

However, we've seen encouraging signs in each business recently. McDonald's and Panera both reported an uptick in customer traffic in the last few months. And that could mark the beginning of a nice rebound in operations.

So let's look at which stock could make the better buy for long-term investors. Here are a few key stats to start us off:

Metric Panera Bread McDonald's
Market capitalization $4 billion $93 billion
Annual sales $2.5 billion $27 billion
Same-store sales growth 1.1% -1%
Operating margin 11% 29%
Price/earnings ratio 24 20
Price/sales ratio 1.7 3.4

Same-store sales growth is for 2014 fiscal year. Source: Financial filings and

Panera's expensive bets
Investing in Panera right now involves a bet that its expensive strategic adjustments will get sales and profit growth back on track. The company is spending extra cash on everything from food and labor, to cutting prices, to upgrading its supply chain and remodeling stores. 

These costs have been a huge drag on profits. Operating margin fell to 11% of sales in 2014, down from 13% the year before. And Panera expects 2015 to be another year of costly investments: Management sees operating margin dropping further by two percentage points this year.

But the payoff should ultimately show up in same-store sales increases. And since menu prices are being kept low, investors will see a rebound in customer traffic as the first sign that the investments are resonating with guests. By that metric, Panera can already point to some good news. Customer traffic improved by over 1% in each of the last two quarters after falling through 2013.

Source: Company financial filings.

McDonald's financial strength
McDonald's also has a strategy to get more customers in its restaurants. The plan includes simplifying the menu, adding more customization options, and spending billions on store modernizations. 

But buying McDonald's stock is as much about signing up for steady cash returns as it is betting on a rebound in the business. Management delivered $6.4 billion of cash to shareholders last year and is on pace to hit its goal of spending $20 billion, or over 20% of its market capitalization, through 2016. A major part of that return is McDonald's hefty dividend, currently yielding close to 4%. 

And as for the business, ironically, some of the best news for McDonald's lately is that fast food competitors like Burger King are doing well. That success suggests that customers are still interested in fast food, even if they aren't excited about Mickey D's offerings lately. So McDonald's has a shot at winning some of its recent market share losses back if it can make the right improvements to the customer experience.

Foolish takeaway
As impressive as McDonald's financial strength is, though, I believe Panera's stock has the better chance to beat the market over the next five years. Yes, profits will likely shrink this year. But patient investors should be rewarded with higher quality earnings growth ahead. And it's hard not to be impressed with founder and CEO Ron Shaich's dedication to the business. He recently told Barron's magazine that the reason he returned to his company after a brief break was, "I realized the best contribution I could make to the world was through Panera." 

Shaich is ideally suited to lead Panera through this transitional time for the business. And his focus is on long-term investments over quick profit gains, which should give shareholders confidence that he has their best interests at heart.