Investors often rely on earnings multiples to gauge a stock's valuation. Comparing price-to-earnings (P/E) multiples is a good way to see how expensive one stock is relative to another. But that can sometimes lead you on a dangerous path, especially if a company had a strong profit in the past year that was inflated due to a one-time gain. And on the flip side, one bad quarter could deflate the bottom line and make a stock's valuation look incredibly expensive. These are some of the things investors need to take into account when looking at earnings multiples.

Tech giant Alphabet (GOOG 9.96%) (GOOGL 10.22%) looks cheap right now based on its P/E ratio, but that can be a little misleading. Although its valuation has taken a beating, the stock still isn't a bargain buy.

Alphabet is trading at a much lower valuation than in years past

Shares of Alphabet are down 31% year to date, and the stock looks like it could potentially be a bargain buy. Trading at 18 times its trailing earnings, and even on a forward basis, its P/E multiple looks incredibly cheap at 16. The S&P 500 averages nearly identical multiples. But for a top tech stock like Alphabet that possesses some attractive assets, including YouTube and Google's search engine, and that has more than doubled its profits over the past two years, it would stand to reason that investors would pay a premium for its business. Alphabet has historically traded at more than 30 times its profits, and its current valuation does suggest it is heavily undervalued:

GOOG PE Ratio Chart

GOOG PE Ratio data by YCharts

Why investors shouldn't give too much weight to these multiples

At first glance, it looks as though the business is a bargain buy. However, with Alphabet coming off some strong quarterly results, its earnings per share (EPS) figure is incredibly high. And a high EPS deflates the P/E multiple. Here's a look at how the company's EPS has looked over the trailing 12 months:

GOOG EPS Diluted (TTM) Chart

GOOG EPS Diluted (TTM) data by YCharts

This chart (along with all other EPS numbers noted here) is adjusted for the company's stock split earlier this year, and it shows that since 2021, profits have been soaring. The reality is that businesses are doing worse right now amid inflation and they are cutting back on advertising expenditures. My hesitation in relying on the current EPS figure is that it simply may not be sustainable. Alphabet is already starting to see some of that softness as it reported EPS of $1.21 for the period ending June 30, which is an 11% reduction from the $1.36 EPS it posted in the prior-year period. YouTube revenue grew at a rate of only 5% during the period versus 84% a year earlier.

And the average analyst projection is that Alphabet will generate EPS of $5.91 next year -- even higher than what it achieved in 2021 when its EPS was $5.61.

Investors need to factor in a margin of safety

Having a margin of safety is something billionaire investor Warren Buffett preaches. In effect, it's a buffer so that in case a prediction doesn't pan out, your investment can still be OK. In Alphabet's case, the forecast is an EPS mark of $5.91. And if you need the EPS to actually come in at that level to justify your investment in the business, then you're leaving yourself no margin of safety.

Instead, if you were to expect a softer EPS number of say $5, which would factor in a decline in earnings to account for the possibility of a recession, you would have a buffer, knowing that it can fall that low and the stock would still be a good buy based on your calculations. But at a forward EPS of $5, Alphabet's stock would now trade at a forward P/E of 20. And if you're anticipating a deeper decline in the business that sends EPS down to $4, you have even more of a buffer, but now the forward P/E is up to 25.

Analyst estimates at this point don't factor in a big downturn in 2023 even though there are growing concerns about a recession. Investors need to take into account their own expectations to adjust for that and do their own calculations. Simply looking at the current P/E multiples can give you a misleading picture of the stock's valuation.

Is Alphabet a buy at its current price?

Alphabet's trailing P/E numbers may not be entirely useful right now, but there's no doubt the stock is cheaper than it has been in the past. At a P/E of only 18, unless there's a catastrophic downturn in the markets, Alphabet's stock could still be available at a decent valuation and well below its five-year average P/E of more than 32.

Yet given that forecasts could get trimmed after earnings season and another underwhelming quarter, investors may be better off waiting as Alphabet's stock could fall still further in the months ahead.