Whole Foods' (NASDAQ:WFM) stock has been crushed lately, down about 10% in the last month and 50% in the last two years. Is the valuation justified or is this a buying opportunity for long-term investors?

Image source: Whole Foods Market.

Why Whole Foods stock is worth a closer look
A quick glance at Whole Foods' stock offers a number of reasons to investigate further to see whether this represents an opportunity.

First, while its price-to-earnings ratio of 20 shows the market expects this food retailer's earnings to grow meaningfully over the long haul, a close examination of the company's historical growth and continued prospects confirms these expectations are justified. For instance, in fiscal 2016 the company plans to expand its total retail square footage by 7% or more, generate a return on invested capital of 13.5% or higher, and grow sales by 3% to 5%. And putting its money where its mouth is, the company recently increased its authorization for share repurchases to $1.3 billion. 

Further, the company's continued emphasis on social responsibility and treating its stakeholders well is worth giving some weight. This makes Whole Foods an attractive option for investors who want to own socially responsible companies in their portfolio.

Beyond some first impressions, let's look at the numbers.

Is Whole Foods stock undervalued?
While increasing competition has undoubtedly prompted some concern about Whole Foods' ambitious growth plans, the underlying valuation seems to already more than account for these headwinds.

To illustrate how reasonably priced Whole Foods is, compare it to Costco (NASDAQ:COST) on some key metrics.

Company

Trailing-12-Month EPS Growth (YOY)

Trailing-12-Month FCF Growth (YOY)

Price-to-Earnings Ratio

Price-to-Free-Cash-Flow Ratio

Costco

15.5%

(5%)

28.9

35.5

Whole Foods

7%

10.2%

20

11.6

While Costco is growing its earnings faster than Whole Foods, Whole Foods is generating significant free cash flow growth for shareholders. Further, while not shown in the table above, Whole Foods revenue is growing more rapidly than Costco's. Costco's fiscal 2015 sales increased 3%, while Whole Foods' increased 7.1%.

Observing the company's valuation in the context of its recent growth, and compared to Costco, Whole Foods isn't the pricey stock it used to be. On the contrary, it appears to be on a trajectory that will generate at least as much per-share intrinsic value for shareholders as Costco. Yet Costco trades at a significant premium compared to Whole Foods when measured by both price-to-cash-flow and price-to-free-cash-flow ratios.

The Whole Foods sell-off looks like a good time for investors to snap up an excellent company for a good price.

John Mackey, co-CEO of Whole Foods Market, is a member of The Motley Fool's board of directors. Daniel Sparks has no position in any stocks mentioned. The Motley Fool owns shares of and recommends Costco Wholesale and Whole Foods Market. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.