"Don't buy that stock," you may hear at a cocktail party. "The P/E ratio is too high."

It might be. It might not be. A stock's price-to-earnings ratio -- or P/E -- is the most common measuring stick used to gauge an investment's valuation. It's certainly a valuable metric, but like a cleaver in the kitchen or a paintbrush against an easel, it's a tool that's useful in the hands of someone that's knowledgeable and dangerous in the hands of everybody else.

A P/E ratio is simple enough to figure out. Take a stock's market capitalization -- the product of its share price and the number of fully diluted shares outstanding -- and divide that by the sum of a company's earnings over the past four quarters. You can also land roughly in the same ballpark if you divide a stock's current price by the sum of earnings per share in the four most recent quarters.

If a company with a market cap of $10 billion has earned $1 billion over the past 12 months it would command a P/E of 10. Put another way, the market's valuing the company at 10 times what it earned over the past year.

Most investors don't even need to do that kind of heavy lifting. Most financial websites offer quotes that include a stock's P/E. Is a P/E of 10 high or low? Here is where this popular valuation tool can get messy. There is no straight answer since it depends on factors beyond a simple number.  Investors leaning on the oft-cited ratio to make valuation calls need to dig deeper.

How to use the P/E ratio

A low P/E is cheap and a high P/E is expensive, in theory, but there are several factors that must be taken into consideration. Investors need to make sure that the earnings figure isn't inflated by one-time events. They will also want to consider the likelihood of the company improving on its trailing earnings since fast-growing companies warrant higher multiples.

Shares of St. Joe (NYSE:JOE) were fetching a P/E of 3.9 in early 2015. That's unusually low, even for a once sleepy company that got its start as a paper producer before making the most of its massive tracts of land across Florida to become a real estate developer. Diving deeper into its 2014 results shows a big one-time gain from the sale of 380,000 acres of non-strategic timberlands and rural land. The trailing results are inflated by that one-time windfall. It's not going to happen again. There may be plenty of good reasons to buy into St. Joe, but a low P/E is not one of them.

Another P/E trap to watch for is to remember that it's only a snapshot of the past. Investors may buy stocks with low P/Es that go on to crash or dismiss stocks with high P/Es that go on to soar even higher. A company may be coming off a great year, but is is sustainable in the future?

Seadrill (NYSE:SDRL) shares were fetching a P/E of 1.2 in early 2015. Yes, the offshore oil rig provider was commanding a market cap barely above what it had generated in profitability over the prior year. The catch here is that with oil prices tanking in late 2014 and business starting to dry up that analysts have been lowering Seadrill's near-term profit projections.

P/E is just a number

Chipotle Mexican Grill (NYSE:CMG) has never been cheap. The popular burrito roller began 2015 at nearly 50 times Wall Street's profit target for 2014. However, that multiple drops to 39 when we consider what analysts see the chain earning through 2015. That's still not necessarily a bargain, but companies growing quickly will see their multiples contract faster over time. 

In the end, a P/E is a fair starting point to begin evaluating a stock's worth, but it should never be the final destination. Investors should always verify the quality of the trailing earnings and assess a company's earnings growth prospects.

Keep all of that in mind the next time someone at a party relies on a stock's P/E as the sole basis of a bullish or bearish argument.

1 great stock to buy for 2015 and beyond

This is shaping up to be another great year for stocks. But if you want to make sure that 2015 is your best investing year ever, you need to know where to start. That's why The Motley Fool's chief investment officer just published a brand-new research report that reveals his top stock for the year ahead. To get the full story on this year's stock -- completely free -- simply click here.


Rick Munarriz has no position in any stocks mentioned. The Motley Fool recommends and owns shares of Chipotle Mexican Grill and Seadrill. Try any of our Foolish newsletter services free for 30 days. We Fools don't 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.