(Editor's note: We amended this article to reflect that Tom Gardner issued a sell recommendation for Whole Foods in May 2003, locking in gains of 51% versus the market's return of 6.31%.)

Tom Gardner recommended Whole Foods Market (NASDAQ:WFMI) to readers of Motley Fool Stock Advisor in both the June and July 2002 issues before suggesting subscribers sell (primarily on valuation concerns) last May after a combined 51% average return.

The stock has continued to run since then, though, racking up another 23% in gains. Now trading at around $75 with a price-to-earnings ratio above 40, the stock no longer looks like a bargain to many investors.

Is the stock too expensive for long-term investors? Berkshire Hathaway (NYSE:BRK.A) (NYSE:BRK.B) CEO Warren Buffett once commented that when identifying businesses to buy for the long term, his goal is "to find an outstanding business at a sensible price, not a mediocre business at a bargain price." There's no doubt that Whole Foods is an outstanding business. But is $75 per share a "sensible" price? For the long-term investor, there is only one way to answer that question: a discounted cash flow analysis. Ultimately, the value of any company is simply the sum of its future cash flows, discounted at an appropriate interest rate, minus debt.

One analysis of Whole Foods
Some quick analysis of Whole Foods' financial statements provides us with the pieces needed for the discounted cash flow analysis. The company's fundamental business model is pretty clear: It finances growth in stores from the cash flow that it generates. In the last five years, cumulative cash flow from operations has been $923 million. In the same time period, Whole Foods used $877 million to develop new stores, acquire other companies, and upgrade existing stores. The store count has increased from 87 in the beginning of 1999 to 146 today, and square footage has more than doubled from 2.1 million to 4.6 million.

Since 1999, the company has grown sales from $1.5 billion to $3.1 billion, a 16% annual growth rate. Indicating that it has ample cash to fuel the growth of its business, it just initiated a small dividend last year. At $0.60 per share for a total of just over $35 million per year, the dividend is not a significant factor in its valuation, but it does indicate that management feels the operating cash flow is more than enough to fund growth.

Let's assume that Whole Foods continues on this path for the next five years. For the sake of simplicity in our analysis and to be conservative, we'll assume zero dollars in free cash flow for the next five years -- everything is reinvested in the business. And let's also assume that Whole Foods is able to stay on its current growth trend -- 16% per year. After five years, revenues would be $6.6 billion. As a quick reality check, that is still a fraction of the current revenues of Kroger (NYSE:KR), at $51.8 billion, and Safeway (NYSE:SWY), at $32.4 billion.

Next, let's assume that after five years, Whole Foods no longer invests in growth -- all its operating cash flow is paid out to shareholders. In the last five years, store contribution (defined as gross profit less direct store expenses) from comparable stores (i.e., those that have been open for more than one year) has averaged 10.2% of sales. If the company were no longer investing in growth, this is what it could reasonably expect to earn in terms of operating cash flow. Over the last five years, Whole Foods has generated operating cash flow at 8.1% of sales, in an environment in which it's growing rapidly and therefore has a substantial proportion of new stores, which are inherently less profitable than established stores.

Retail market consultant Retail Forward estimates that the organic food business is growing at about 10% per year. Historical comparable-store gains for Whole Foods have been in the high single digits; the 2003 figure was 8.6%. But to be conservative, we will assume that once the growth in stores ends after five years, same-store sales would grow only 5% per year for five years and then growth stops.

Using the company's estimated cost of capital of 9% as of 2004 (which the company uses for economic value-added analysis), and the assumptions above in the discounted cash flow analysis results in an enterprise value of about $6.5 billion. Whole Foods has very little debt on its balance sheet, but after taking that into account to value the equity and dividing by the 60.9 million shares outstanding, the intrinsic value per share is $104. That is a 39% premium over the current share price, using some pretty conservative assumptions. Overvalued? Perhaps not.

Management's forecast
Management is more optimistic. It believes the company can reach $10 billion in sales by the end of the decade. With the same assumptions as above (10% operating cash flow margin, 5% same-store sales growth for five years, then no growth after that) and that forecast, the current intrinsic value of the stock is $136.

There are, of course, risks. Whole Foods will face competition as traditional supermarkets try to expand their natural and organic food offerings. And low-price retailers like Costco (NASDAQ:COST) and Wal-Mart (NYSE:WMT) will continue to lure grocery shoppers away from all supermarkets, including Whole Foods.

On the other hand, as the company's recent acquisition in the U.K. illustrates, international markets offer tremendous opportunity for growth. Whole Foods is also continuing to build its long-term competitive advantage. It has a strong and growing reputation as one of the best companies to work for in America, and it is taking steps to make its business model harder to copy. For example, in Nov. 2003, it announced the acquisition of its leading distributor of fresh seafood and the expansion of its operations in fresh seafood processing and distribution. By controlling the supply chain for fish, Whole Foods is ensuring its ability to provide the highest-quality, freshest seafood to its stores. And it is making it increasingly difficult for potential competitors to duplicate the model.

In one of his letters to shareholders of Berkshire Hathaway, Warren Buffett wrote that "the best business to own is one that over an extended period can employ large amounts of incremental capital at very high rates of return... Unfortunately, this type of business is very hard to find." Whole Foods may well be one of those hard-to-find businesses. Even at a P/E of over 40, this stock may still be far from overvalued.

For long-term investors, Whole Foods may be an opportunity to buy a piece of a great company at a fair price.

What other stocks have David and Tom Gardner recommended to subscribers of Motley Fool Stock Advisor ? You can check it out risk-free for six months.

Fool contributor Salim Haji owns shares of Whole Foods, Costco, and Berkshire Hathaway, but none of the other companies mentioned. He regularly shops at the Whole Foods near his home in Denver. The Motley Fool is investors writing for investors.