For what seemed like an eternity, Whole Foods Market (WFM) essentially had the entire national organic niche to itself. And emerging from the Great Recession, it proved to be an amazingly profitable niche to occupy. But with that success came competition -- from traditional grocers and specialty shops alike. One of those specialty shops was Sprouts Farmers Market (SFM 0.09%).

The last three years haven't been kind to these players. As bigger grocers like Costco, Wal-Mart, and -- perhaps most importantly -- Kroger have entered the scene, shoppers have found cheaper and more convenient alternatives for getting their organic goods.

Green shopping cart in frozen foods aisle

Image source: Getty Images.

Does that mean that these stocks make compelling buys at these prices? And if so, which is the better choice?

Financial fortitude

When companies have a long runway for growth, investors usually like to see management putting sales right back into the company. Whole Foods and Sprouts believe that there's potential for at least a doubling of store counts in the future -- and the organic industry has stood the test of time: It's here to stay.

But it's also wise for management to keep a cash cushion on hand -- and avoid too much debt. That's because every company -- at one point or another -- is going to endure tough economic times. Those that have resources on hand will be able to withstand the squeeze, and those that are debt heavy likely won't.

Here's how Whole Foods and Sprouts stack up in terms of financial fortitude.

Company

Cash

Debt

Net Income

Free Cash Flow

Whole Foods

$852 million

$1 billion

$507 million

$400 million

Sprouts

$50 million

$320 million

$135 million

$87 million

Data source: Yahoo! Finance.

Until recently, Whole Foods took a very prudent stance toward debt: It didn't carry any. Even today, new store openings are financed through free cash flow (FCF). Instead, the debt was taken on to finance share repurchases because interest rates were so low.

Without a doubt, Whole Foods is in better financial shape than Sprouts. While Whole Foods is valued at three-and-a-half times the size of Sprouts, it has 17 times more cash on hand, and a much healthier cash-to-debt ratio.

Sustainable competitive advantages

If you're going to spend an hour evaluating a stock, I suggest you devote at least 45 of those minutes to investigating the underlying company's sustainable competitive advantage. That's because in my history as an investor, this -- often referred to as a "moat" -- has easily been the variable that correlates the most with my overall returns.

In the simplest sense, a company's moat is what separates it from the pack, what makes it special and unique, and keeps customers coming back year after year.

For a long time, Whole Foods made up a large portion of my family's holdings. They were simply offering the best organic goods for the best prices in the industry. But that moat has shriveled up over time -- due to the aforementioned competition. The company is now experimenting with a new, cheaper store format -- dubbed 365 -- in the face of that competition.

Whole Foods 365 is very similar to a Sprouts store, which typically smaller format. I don't think either of these companies have very impressive moats -- as just about any store these days can offer organic goods, and it's a race to offer the lowest prices.

Valuation

While valuation isn't an exact science, there are some straightforward metrics that give an idea of how expensive a stock is.

Company

P/E

P/FCF

PEG Ratio

Dividend

FCF Payout Ratio

Whole Foods

20

25

2.8

1.8%

44%

Sprouts

22

32

1.5

N/A

N/A

Data source: Yahoo! Finance, E*Trade. P/E represents figures from non-GAAP earnings.

Based on the PEG Ratio alone -- which factors in the potential for future growth -- Sprouts appears to be priced at a 45% discount to Whole Foods. But based on FCF, Whole Foods is the cheaper stock -- and its worth noting that the company's FCF is depressed due to the fact that new stores are financed from FCF, not from issuing debt. Add in the fact that Whole Foods offers a very sustainable dividend, and it's tough to argue that either has a clear valuation advantage.

And the winner is... Whole Foods

I'm a huge fan of the healthy eating/eco-conscious movement. In fact, I'm typing these words from an organic coffee farm in Costa Rica where my family lives half of the year.

But as far as these companies go, they don't have a monopoly on organic goods. That's great for consumers, but bad for Whole Foods and Sprouts. While I believe Whole Foods has a brighter future relative to Sprouts -- thanks in large part to its balance sheet -- I'm not particularly optimistic when it comes to either stock.