One of the most common metrics used to gauge a stock's value is its price-to-earnings (P/E) ratio. It's the multiple of earnings you're willing to pay for a business -- the current price divided by the company's earnings per share. It's a good way to get a rough idea of whether a stock is cheap or expensive, but Fools shouldn't rely entirely on the P/E for their value assessments.

How the P/E works
(NASDAQ:GOOG) has a P/E ratio of about 54, implying that investors are currently willing to pay $54 for every dollar of earnings Google generates. Similarly, Wal-Mart's (NYSE:WMT) P/E ratio of around 16 implies that investors are currently willing to pay $16 for each buck Wal-Mart makes.

For a different perspective, try flipping the P/E ratio to an E/P ratio, commonly referred to as the earnings yield. Like a yield on a bond, this number shows a company's annual earnings as a proportion of its market value. Buying one share of Google at $687, with EPS of $12.78, equates to an earnings yield of approximately 1.86% ($12.78 divided by $687). For Wal-Mart, the earnings yield is 6.37%, because each share of Wal-Mart stock, currently trading at $48, is expected to generate $3.06 in earnings per share. In the long run, Wal-Mart investors theoretically should earn a better rate of return than Google investors for each dollar invested.

Yet for the three-year period ended September 2007, Wal-Mart returned -14.3%, while Google gained 271%. (Returns have varied since.) I did use a very extreme, and to some degree unfair, comparison, since Google is currently enjoying the "amazing growth" portion of its lifecycle. It's an apples-to-oranges comparison between a technology company and big-box retailer. Like Google, Wal-Mart's stock-price performance was downright astonishing during its early years. So what gives?

Avoid the pitfalls
Does the difference in P/E ratios alone make one company a better investment than the other? Not really. Although useful, P/E ratios have limitations. Yet investors tend to rely excessively on this one variable in determining an investment's attractiveness.

Most investors tend to agree that in general, businesses with lower P/E ratios tend to outperform high-P/E-ratio companies in the long run. However, that premise alone does not imply that all companies sporting single-digit ratios are superior investments. Just look at Countrywide Financial (NYSE:CFC) over the past year. Before the mortgage mess hammered the company, Countrywide had a very low single-digit P/E ratio. But new investors at the time are now sitting on losses. At best, Countrywide faces an uncertain future, and its P/E ratio means very little at this point.

Quality, not quantity
Fundamental problems exist with the P/E ratio. First, the "P" only refers to the equity price of a business; it doesn't consider debt. That's fine for companies without debt, like Google or Microsoft (NASDAQ:MSFT), but it's meaningless when there is debt involved. For instance, a business with a market cap of $5 billion, with $1 billion of net debt on the balance sheet, has an economic (or enterprise) value of $6 billion. If this company earns $500 million in profit in a given year, the P/E ratio would be 10; but in reality, investors should see it as 12.

The "P" also ignores any appropriate adjustments on the balance sheet that would change the value of the company. Land value is usually understated on the balance sheets, a trend the P/E ratio ignores. Just the same, failure to mark-to-market certain items carried at cost could severely impair value. Investors in Merrill Lynch (NYSE:MER) know what I mean; the company's asset writedowns surged from nearly $4.5 billion to nearly $8 billion when it announced earnings. Yet the company's P/E ratio does not take this into account.

The "E", or the per-share net income of a company, also poses problems. Creative accounting decisions, such as changing depreciation schedules or including non-recurring gains at certain points in time, can manipulate this figure. We all know that management has a considerable incentive to meet earnings expectations, so you should always examine earnings with a healthy dose of skepticism.

Most investors employ a host of investment considerations when assessing the value of a business. While the P/E ratio is a very useful resource, its often-ignored limitations can sometimes catch smart investors off guard. Use it carefully and prudently, and you'll be a lot less likely to fall into costly situations.

For further related Foolishness:

Fool contributor Sham Gad is managing partner of the Gad Partners Fund, a value-centric investment partnership operating in similar fashion to the 1950s Buffett Partnerships. He has no stakes in the companies mentioned. Microsoft and Wal-Mart are Inside Value recommendations. The Fool has a priceless disclosure policy.