Fast-food restaurants are finally seeing sales increase as dine-in rates gradually improve. While they're still showing declines when compared against pre-pandemic levels, many restaurant companies have seen their stock drops erased as investors take note of improving performance.

McDonald's (MCD -1.23%) and Shake Shack (SHAK 0.28%) both had massive declines in the second quarter, but their share prices are both up more than 15% year to date. As investor confidence increases, let's see which one is the better buy.

Burger, fries, and cola.

Image source: Getty Images.

The leader vs. the up-and-comer

McDonald's franchises and operates over 36,000 restaurants, with a presence in almost every country in the world, and almost half of these are in the U.S. CEO Chris Kempczinski said that this was a key point while dining rooms were closed, as customers ordered from restaurants they know and love. 

Shake Shack has only 280 U.S. and 95 global locations. It was born with the branding of a 1950's-style roadside burger shack, mixed with premium-quality ingredients. 

The table below shows some interesting comparisons for sales and comps growth on a year over year basis.

Company Q2 2020 Q1 2020 Q4 2019 Q3 2019
McDonald's sales (30)% (6)% 4%  1% 
Shake Shack sales (39)%  8%  22%  32%
McDonald's comps (24) (3.4)% 6% 6%
Shake Shack comps (49)% (12.8)% (3.6)% 2%

Data source: McDonald's and Shake Shack quarterly reports.

Comps measure sales from existing stores, and that's clearly not what's driven Shake Shack's fantastic pre-pandemic sales growth. Rather, new stores brought the company higher revenue while sales from existing stores dropped. On the other hand, McDonald's grew much more slowly, but existing stores generally see higher sales each quarter.

A miserable quarter for restaurants

McDonald's comps fell 24% in the second quarter, and total revenue dropped 30%. Sales improved sequentially throughout the quarter, and nearly all restaurants were open by the end, operating with drive-thru and delivery, while some now have open dining rooms. Customer satisfaction scores increased, and drive-thru service time improved.

In a pre-release update, McDonald's said that comps are up 4.6% in the U.S. and down only 2.2% in total, which means it's getting very close to turning positive.

Shake Shack comps decreased 49% in the second quarter and sales fell 39%. There was an $18 million net loss, and the company ended the quarter with just under $200 million in cash, as opposed to McDonald's $1 billion. Digitally driven sales, such as ordering via the app, increased 75% and represented 62% of the total July sales, even as stores began to reopen. 

Carving out more market share

McDonald's developed a new growth strategy called the velocity growth plan in 2017 to improve sales through better products and a digital transformation. This came into play during the pandemic, when having a digital strategy meant higher sales while customers couldn't dine out.

Despite its ubiquitous presence, the fast-food king still feels it has more room to grow. It held onto cash during the first half of 2020 and is planning on investing that money in its growth strategies for the second half of the year. In particular, it's using the three Ds: drive-thru, delivery, and digital as a springboard for expanding its business.

With its small number of stores, global presence, and general popularity, Shake Shack certainly has plenty of growth potential ahead. It's remained solvent throughout the pandemic and has opened nine new stores in the first half of 2020, with up to another 11 planned for the rest of the year.

Shake Shack stock has gained 108% over the past three years, while McDonald's has increased 39%. The former is trading at 100 times trailing 12-month earnings, and the latter is trading at a much more reasonable 36. McDonald's is certainly a safe pick for value, and it pays a dividend.

Shake Shack has to work out its comps problem, which CEO Randy Garutti attributed to various issues, such as the need to improve the product line or a particularly solid quarter the year before that's hard to match.

In the short term, as customers venture out to eat and Shake Shack continues to launch new restaurants, it will see revenue recover. While it still has many markets to open new stores, it needs to figure out how to improve sales at existing stores. If it does, it will end up being the better buy long term.