Image credit: Getty Images.

For a while, Chipotle Mexican Grill (CMG 0.17%) was putting up the type of numbers many didn't think were possible. A mature restaurant with over 1,000 locations putting up comparable-store sales growth (comps) of near 20%? Impossible!

And yet, there was everyone's favorite burrito maker, breaking all of the rules.

And then, the disaster of foodborne illness hit. That has been followed by criminal investigations, plummeting sales, a jettisoning of a co-CEO, and a stock that has lost almost half of its value in little more than a year. Surely after such a collapse, Chipotle represents a compelling buy, right?

Well, to test that theory, we're going to put the company up against another industry favorite, Starbucks (SBUX 1.09%). We don't know what either stock will do in the future, but there are three lenses through which we can view this competition. Let's see how they stack up.

Financial fortitude

Having lots of cash is very important. While shareholders might like to see a war chest returned to them in the form of dividends and buybacks, having a sizable cash stash is crucial.

That's because hard times will hit every organization at some time or another. Companies that have lots of cash have options, while those that don't often struggle to make ends meet and are at the whim of their creditors.

Chipotle is a great example of this. The company had almost $1.3 billion in cash and investments on hand at the end of 2015, and without that, it would have been in dire straits. So, where does these two companies stand now?

Company

Cash

Debt

Net Income

Free Cash Flow

Chipotle

$0.6 billion

$0

$0.075 billion

$0.11 billion

Starbucks

$3.4 billion

$3.2 billion

$2.8 billion

$3.14 billion

Data source: SEC filings. Net income and free cash flow reported on trailing-12-month basis.

Without a doubt, Chipotle's lack of long-term debt is a huge boon. But as you can see, the company has burned through almost half of its cash in just nine months in an attempt to battle slowing sales as customers forgo their burritos for fear of food poisoning.

While Starbucks has a much higher debt level than Chipotle, the company's free cash flow makes the company far superior in terms of financial fortitude.

Winner = Starbucks

Sustainable competitive advantages

If I had to choose one variable that's the most important to wrap your head around, this would be it. Often called a "moat" in investing circles, a company's sustainable competitive advantage is what sets it apart from the throngs of competitors chomping at its heels.

For both of these companies, the powers of (1) brand, and (2) scale are paramount. On both levels, I believe Starbucks has the upper hand.

Chipotle's brand has been severely sullied by the foodborne illness episodes of earlier this year. Add to that the fact that its new burger-concept -- Tasty Made -- has decided to use conventionally raised beef instead of something more in line with the company's "food with integrity" motto, and you can see how Chipotle may be messing with the very ingredients that differentiated it from the competition for the past decade. Chipotle is also not noticeably bigger than any of its other fast-food or fast-casual competitors.

Starbucks, on the other hand, is at least twice as large as its closest competitor -- Dunkin' Brands -- giving it a massive advantage of scale. And it also benefits from a reputation for responsible practices -- both with the farmers who provide the coffee for the chain and the employees who serve it up. Chairman and CEO Howard Schultz aimed to provide a "third place" for customers outside of home and work, and he's done that.

Winner = Starbucks

Valuation

Finally, we have valuation. While this isn't an exact science, there are some straightforward metrics we can consult to give us an idea of how expensive each stock is.

Stock

P/E

P/FCF

PEG Ratio

Dividend Yield

FCF Payout Ratio

Chipotle

160

105

10.9

N/A

N/A

Starbucks

30

26

1.5

1.8%

38%

Data sources: Yahoo! Finance, E*Trade. P/E represents figures from non-GAAP earnings. P/E price-to-earnings ratio. P/FCF = price-to-free cash flow. PEG = price/earnings to growth ratio. FCF = free cash flow.

By a staggering margin, Starbucks is a better deal. While there's no doubt Chipotle's numbers are somewhat inflated and will likely come down over the course of the next year, it's impossible to tell where they'll land. Some believe that buying now could be a steal, but when compared to Starbucks, it looks astronomically expensive.

Given that Starbucks offers a healthy and sustainable dividend to boot, there's no question who wins this one.

Winner = Starbucks

Final call = Starbucks

So, there you have it. Even though Chipotle's shares have fallen mightily, while Starbucks' have trended largely upward ever since the Great Recession, Starbucks is definitely the better deal. It's worth noting, too, that my money is where my mouth is: I recently sold shares of Chipotle based on these observations, while Starbucks remains a position that occupies 7% of my family's real-life holdings.