Restaurants and coffee shops had a difficult time earlier this year as the coronavirus outbreak forced locations to temporarily close. Stay-at-home orders kept potential customers home even after some restaurants reopened. To make matters worse, many consumers continue to avoid public places even now. For restaurants and coffee shops, this isn't a recipe for success.

But fast-food giant McDonald's (MCD -0.23%) and coffee chain Starbucks (SBUX -0.86%) managed to weather the crisis. And earnings reports show both are well into the recovery phase. As we approach the new year, which one represents the better buy right now?

A young woman holds a burger in one hand and eats a fry with the other hand.

Image source: Getty Images.

McDonald's

Most McDonald's restaurants in the U.S. remained open in recent quarters with drive-thru and take-out options. While that helped the company to a certain degree, U.S. comparable sales still fell 8.7% in the second quarter, and global comparable sales sank by 23.9%.

Since, recovery is happening -- thanks to McDonald's' marketing efforts and the way the company is handling customers' preferences for social distancing. McDonald's this fall launched its "Famous Orders" campaign, first with Travis Scott and then with J Balvin. The idea was to feature each musician's favorite meal combination. The Scott meal was so popular that some McDonald's locations even ran out of ingredients. McDonald's said its digital, delivery, and drive-thru platforms also helped bring customers back.

This showed in third-quarter numbers. Total third-quarter comparable sales only fell 2.2%, and U.S. comparable sales rose 4.6%. And even better news: Improvement has been steady. Sales recovered sequentially from month to month throughout the second and third quarters. And diluted earnings per share climbed 5% to $2.22 in the third quarter, surpassing analysts' estimates.

Starbucks

Starbucks suffered a lot more than McDonald's from temporary closures. The company closed all of its U.S. stores in April except those offering drive-thru service. Earlier in the year, Starbucks lost sales due to store shutdowns in China, its second-biggest market behind the U.S.. Global comparable-store sales for the period ended June 28 fell over 40%. In the most recent quarter, that measure declined only 9%. The company swung from a loss per share of 46 cents in the previous quarter to earnings per share of 51 cents.

Importantly, 90-day active members in Starbucks' loyalty program rose 10% in the recent quarter to 19.3 million. That's nearly at the pre-crisis level of 19.4 million. How is Starbucks kick-starting its recovery? The company is focusing on what customers want right now -- and likely well into the future. And that is contactless delivery and pick-up options. Back in June, the company said it would accelerate its development of Starbucks Pickup stores as well as the expansion of its drive-thru and curbside pick up services. Further, 10% of new Starbucks stores in China next year will be express retail shops.

Looking ahead, Starbucks forecasts fiscal 2021 non-GAAP earnings per share in the range of $2.70 to $2.90. And as of the fiscal year 2023, Starbucks expects annual same-store sales growth for company-operated shops of 4% to 5%.

So, will it be a burger or a cup of coffee?

McDonald's and Starbucks are on the right path and have shown they have what it takes to make it through the biggest of storms. Both companies are likely to reward investors with share gains over time. However, if I had to choose one to buy right now, I would go for McDonald's. Looking over the past five years through 2019, McDonald's net income and profit margin have grown more steadily than those of Starbucks.

MCD Net Income (Annual) Chart

MCD Net Income (Annual) data by YCharts

There isn't a guarantee that chart will continue to look the same next year. But McDonald's track record and investment in marketing make me optimistic.

I also think McDonald's is a stronger bet right now due to its share price. Starbucks stock is up 17% this year and has nearly reached Wall Street's 12-month price forecast. McDonald's shares have increased about 7% this year. If McDonald's sales figures continue their month-to-month improvement, those gains should support further share price appreciation in the months to come.