I've been asked a number of times to analyze Wal-Mart. My goal here is not to offer stock tips; rather, I want you to be able to do it yourself. Still, I looked at (and bought) Wal-Mart for myself, so here it is:

To preface, investors that comb Morningstar to get owner earnings will have noticed that Wal-Mart's haven't grown much. But with rapidly growing companies that are real estate heavy (a la Wal-Mart), you need to separate the growth spending from the business value numbers.

**According To Morningstar:**

Morningstar reports Wal-Mart's free cash flow as rapidly fluctuating from 1998-2007, ultimately ending up right where it started at $4.5 Billion. At a quick glance, it would appear that there is no consistency in Wal-Mart; but, while we like "easy", we also like "money" and Wal-Mart deserves a little more investigation.

**Capital Expenditures:**

Wal-Mart's capital expenditures (CapEx) have grown rapidly over the past ten years. Then again, so has the number of stores—from 3,373 in 1998 to 6,779 at the end of fiscal year 2007. The question is: How much does Wal-Mart have to spend to keeps its doors open vs. how much it is spending on growth? For this, we dig into Wal-Mart's annual reports.

**From 1998-2007, Wal-Mart spent approximately $2 Mil per existing store in CapEx**. How did we get that? Simple: Number of stores open divided by CapEx for the year. Then, we take a median value because we can't focus on a single year's spending or performance.

**Wal-Mart also spends roughly $4 Mil to open a new store**. To calculate this, we take the change in the number of stores and divide it by the change in CapEx, then take the median value again.

If we backtest that calculation vs. the number of stores open and opened, we see that Wal-Mart (1999-2007) had $110.5 Bil of CapEx according to our calculation and reported $112.6 Bil. Considering that we are rounding all of our numbers and dealing in millions, I'm happy with just a 2% difference and am confident in these numbers.

Now we know roughly how much Wal-Mart's stores are costing to remain open. Let's move on to the cash that they generate:

**Cash From Operations:**

The net cash from operations that Wal-Mart reported from 1998 to 2007 grew steadily—and that is the basis for our owner earnings. In fact, using 5- and 7-year timeframes, Wal-Mart's cash from operations grew at a median rate of 16.9%.

Considering that Wal-Mart's CapEx are pretty much fixed based on the number of stores they have, we can say that Wal-Mart's owner earnings are equal to Cash Flow From Operations minus the cost of keeping existing stores open. Take a look:

**Wal-Mart's Intrinsic Value:**

Discounting those cash flows back to today at 15%, we get a present value of Wal-Mart's future cash at $119,650 Mil. Why 15%? I'll explain tomorrow. For now, let me say that discount rate and margin of safety go hand in hand and that we want a 25% MOS on Wal-Mart at 15% (or we could take a 50% MOS with a 9% discount rate).

Add the $151,193 Mil of net worth to the $119,650 of discounted cash, and we get an intrinsic value of $270,843 Mil...or $65.92 a share. With our margin of safety, Wal-Mart looks great under $49.44 a share.

**What If We Use A Lower Discount Rate:**

Let's look at Wal-Mart if we were to use a 9% discount rate. The future cash would be worth $205,306 and we would get an intrinsic value of $86.77 per share. With a 50% MOS, Wal-Mart would look attractive at $43.38 per share.

**Either Way You Slice It:**

Wal-Mart, underpriced to its value and trading right around where Buffett bought it two years ago, looks pretty darn attractive. The bad news we got earlier this week? It's all part of the business cycle. Let the analysts focus on short-term results; we buy businesses for the long-term.