McDonald's (MCD -0.31%) and Shake Shack (SHAK -1.31%) don't have much in common as investment choices – apart from the fact that they both sell burgers. With 36,000 locations, Mickey D's dominates the global fast food industry. Its $100 billion market capitalization is the result of several decades of steady growth that have produced a business that throws off mountains of cash even during operating slumps.

Shake Shack, meanwhile, hopes to cross a total 100 locations this year, the majority of which haven't even been open for two full years -- yet it is growing its tiny sales footprint by leaps and bounds.

With those major differences in mind, let's stack the two restaurant chains against each other to see which could make the better investment right now.

Here are a few statistics to set the stage.

Metric

McDonald's

Shake Shack

Market cap

$99 billion

$1 billion

Sales growth

1.5%

13%

Profit margin

19%

3%

Dividend yield

3.1%

N/A

Forward P/E

19

63

Sales growth is at existing restaurants for the past complete fiscal year. Data sources: Company financial filings and S&P Global Market Intelligence.

Shack Shack's exciting brand

The best thing Shake Shack has going for it is its intense brand appeal. In fact, new locations drum up so much business within their first year that the second year of operations frequently suffers a traffic decline. Growth eventually recovers, but the incredible demand around a store's launch is the main reason why the company doesn't add a shack to its comparable-store base until it has been open for at least two years.

Image source: Shake Shack.

Investors shouldn't underestimate the value of this brand excitement. Shake Shack boasts key elements of what McDonald's wants its brand to morph into. The fast food titan's broad vision, it says, is to "become a modern, progressive burger company" that appeals to customers' current appetites.

Shake Shack, with its fast-casual dining approach, already has that appeal. "We embrace our fine-dining heritage and are committed to sourcing premium, sustainable ingredients, such as all-natural, hormone- and antibiotic-free beef, chicken and bacon, while offering excellent value to our guests," the company explains in its 10-K report.

Another attractive aspect of Shake Shack's business is its huge opportunity for growth. The company just boosted its target for new restaurant openings to 18 from 16 this year, which should help it improve revenue by 34% in 2016. McDonald's, meanwhile, is projected to see sales shrink by about 4% this year.

McDonald's cash-rich model

By purchasing McDonald's, though, investors get a ton of dependable cash flow in exchange for that slower growth profile. With over 80% of stores currently owned by franchisees (on the way to a 95% long-term goal), the company produces high volumes of rent, royalty, and franchise fees, which protect profits even during downturns. Last year, for example, the $6.5 billion of operating cash was nearly $5 billion over and above what McDonald's needed to spend on its business.

As a result, the company was able to fund $9.4 billion of cash returns to shareholders -- mainly through stock buybacks -- up 47% over the prior year.

An investment in McDonald's isn't just about financial returns, either. Comparable-store sales growth is looking healthier lately, with comps up 5% through the first six months of the year compared to a 2% decline over the same period last year.

That rebound helps explain why Shake Shack is valued at such a discount to McDonald's right now -- despite the growth pace gap. Investors can buy Shake Shack for less than 3 times last year's sales, compared to 4 times for McDonald's. Both valuations have dipped lately as growth in the industry slows, suggesting this could be a good time to start a position.

MCD PS Ratio (TTM) Chart

MCD PS Ratio (TTM) data by YCharts.

McDonald's is clearly the safer choice, as it has proven that it can withstand a wide variety of market slumps. Investors shouldn't ignore Shake Shack, though. Its tiny current footprint could easily expand significantly, and the fact that it just set a new operating margin high suggests the business model could produce huge returns over the coming decade.