Image source: Shake Shack.

It's easy to be spun around in pitting Shake Shack (SHAK -0.45%) against Habit Restaurants (HABT). After all, if you had to guess which of the two chains had the most outlets you'd bet on market darling Shake Shack. You would be wrong. Habit runs 142 mostly company-operated burger joints. Shake Shack has 84 locations, but 35 of them are licensed overseas.

If you were to ask which of the two concepts has been singled out in a consumer taste test, topping 20 other rivals in a Consumer Reports survey two summers ago, it would be tempting to go with Shake Shack's legendary burger. You would be wrong, again. Habit came out on top, though -- to be fair -- Shake Shack wasn't one of the 21 chains in the survey. However, beating out cult faves In-N-Out and Five Guys is no minor achievement. 

You're probably 0-for-2 so far, so let's wrap up this pop quiz by asking you which company commands the larger market cap? You may be more familiar with Shake Shack, but with Habit having far more company-owned locations -- 137 vs. 44 -- and winning national accolades on burger quality it would be hard to fathom Habit carrying a lower price than Shake Shack. Well, it isn't even close. Habit may run more than three times as many eateries, but it's Shake Shack packing a market cap of $1.4 billion that's more than three times that of Habit at $440 million. 

This might lead one to assume that Shake Shake carries the loftier market valuation, and while that is technically true you can't base your investing decision on a unit count and a publication's survey of tens of thousands of fast food buffs. Shake Shack's valuation is pretty steep, but the two companies aren't as far away in register tallies as you might think. For starters, Shake Shack runs the burger concept with the highest volume of sales per location. Its $190.6 million in sales last year are surprisingly close to Habit at $230.6 million despite closing out the year with less than a third as many company-operated units.

Love Shack, baby
Both outfits are posting healthy double-digit percentage growth, but Shake Shack is growing considerably faster. Shake Shack's sales soared 61% last year on the strength of brisk expansion and an impressive 13.3% surge in comps. Habit clocked in with a respectable 32% surge in revenue, also primarily the handiwork of opening new locations. However, its comparable-restaurant sales gain of 6.4% isn't anything to sneeze at. Habit has now rattled off 12 consecutive years of comps growth. 

Shake Shack is growing twice as quickly as Habit, but that will change. Both concepts are decelerating, but analysts see sales growing 27% at Shake Shack this year with a healthy 25% growth forecast for Habit. Wall Street pros see both chains growing at a 24% clip in 2017.

Building out company-owned chains isn't cheap, and in both cases we see profitability held back as a result of the heady expansion. This leads us to some pretty chunky valuations on an earnings-basis. Habit trades at 54 times this year's profit target, and that's actually a bargain compared to Shake Shack at 99 times this year's earnings forecast. Habit, naturally, packs the much more reasonable price-to-sales multiple, too. 

Hard Habit to break
Neither stock is cheap, but both concepts have several years of double-digit percentage growth at the unit level before exhausting their expansion possibilities. Shake Shack just opened its first location in California earlier this year while Habit finally broke into the East coast two years ago. 

Shake Shack is the sexy name in the "better burger" niche, but both companies have clear paths to vibrant futures. Both stocks are trading well below their post-IPO highs, and that provides an opportunistic entry point for investors eyeing the long-term potential of either chain.