What do stores like Wal-Mart (NYSE:WMT), Home Depot (NYSE:HD), Target (NYSE:TGT), and Lowe's (NYSE:LOW) have in common? Their inventory needs must be massive. How do we go about analyzing their inventories as a measure of performance? By determining the company's cash conversion cycle and inventory turnover.

Although it would take some grade-A imbecility to get there, it's entirely possible under the accrual system in accounting for a company to go bankrupt while showing operating profits. Why? Because you can't pay your vendors with "profits"; you must pay them with cash. A company that does a poor job of bringing in cash, even if it's selling lots of stuff, should be avoided. Let's break this down by components.

1. Days inventories outstanding (DIO)
What we want to know is the number of days it takes for a company to "turn" its inventory. Let's compare the fiscal 2006 and 2005 annual results for Motley Fool Inside Value pick Home Depot.

Home Depot

2006 (\$ in Millions)

2005 (\$ in Millions)

Cost of Goods Sold

\$54,191

\$48,664

COGS Per Day (Annual COGS/365)

\$148

\$133

Inventories

\$11,401

\$10,076

DIO (Inventories/COGS Per Day)

77

76

*Data provided by Capital IQ, a division of Standard & Poor's.

See how that works? Let's do the same thing with the other two components.

2. Days sales outstanding (DSO)
DSO is the amount of time it takes the company, on average, to receive money after it has sold a good or service.

Home Depot

2006 (\$ in Millions)

2005 (\$ in Millions)

Revenues

\$81,511

\$73,094

Revenues Per Day (Annual Revs/365)

\$223

\$200

Receivables

\$2,396

\$1,499

DSO (Receivables/Revs Per Day)

11

7

*Data provided by Capital IQ, a division of Standard & Poor's.

3. Days payables outstanding (DPO)
Finally, we have to subtract from this total the number of days the companies hold onto cash after they pay for something. So we must also know the DPO.

Home Depot

2006 (\$ in Millions)

2005 (\$ in Millions)

Cost of Goods Sold

\$54,191

\$48,664

COGS Per Day (Annual COGS/365)

\$148

\$133

Accounts Payable

\$6,032

\$5,766

DPO (Accounts Payable/COGS Per Day)

41

43

*Data provided by Capital IQ, a division of Standard & Poor's.

Finally, to come up with the cash conversion cycle, you simply add the three numbers for DIO, DSO, and DPO. Be careful, though: DPO is a negative number.

Thus, Home Depot's cash conversion cycle in 2006 is: 77 + 11 - 41 = 47 days. Compare this to Home Depot's cash conversion cycle in 2005: 76 + 7 -43 = 40 days.

So, even with all of that inventory, Home Depot is still able to convert its own expenditures back into cash in only 47 days. Granted, this number has increased from the 40-day cash conversion cycle of 2005, but it's still pretty good for a company that relies on large inventories. You can also calculate these numbers on a quarterly basis (taking care to divide by 90 instead of 365) to have a more sensitive tool for determining the trend toward faster or slower cash conversion.

Cash conversion cycles don't translate well from industry to industry, so comparing companies that don't directly compete may not be helpful. Still, you can watch these cycles closely on a company-to-company basis, since they might warn of weakening business fundamentals that don't show up elsewhere.

Both Home Depot and Wal-Mart are Motley Fool Inside Value recommendations. To discover other companies with great long-term opportunities, try the Inside Value newsletter free for 30 days.

Shruti Basavaraj , Adrian Rush , and Katrina Chan contributed to this article, which was originally written by Bill Mann. Shruti, Adrian, and Katrina don't shares of any company mentioned above. The Motley Fool has a disclosure policy that will not convert anytime soon.