Everybody likes a deal. Whether it's clothes, electronics, or cars, people prefer to take advantage of a bargain whenever possible. The same goes for stocks -- finding undervalued companies can pay off hugely for investors because they offer high return potential.

Investing in undervalued stocks has a handful of benefits, but most notably, it offers a greater margin of safety since stocks only need to reach their intrinsic value for investors to profit. Investors can use many different metrics to analyze stocks and their valuations, but here are two of the most important ones.

Two people across from someone showing them a tablet.

Image source: Getty Images

Price-to-earnings ratio

Using the price-to-earnings (P/E) ratio is probably the most common way to assess a stock's value. To find a company's P/E ratio, you divide its share price by its earnings per share (EPS), typically from the trailing-12-month period. You can find a company's EPS by dividing its trailing net income by the number of outstanding shares.

For example, if a company has $500 million in net income and 125 million outstanding shares, its EPS would be $4.00. If its stock price is $100, that would make its P/E ratio 25. This means you're paying $25 for each $1 of its earnings.

A company's P/E ratio alone won't always tell you if it's undervalued or overvalued; you should compare it to similar companies in its industry. A "typical" P/E ratio can vary widely because different industries have different profit margins, growth prospects, and capital structures.

The tech industry is known for having high P/E ratios, just as the utilities industry is known for having low ones. You wouldn't want to compare Apple's P/E ratio to ExxonMobil's, nor would you want to compare McDonald's to Visa's.

If you're comparing similar companies in the same industry and one has a noticeably lower P/E ratio than the others, that could be a sign it's undervalued. Let's take General Motors, for example.

GM PE Ratio Chart

Data by YCharts.

General Motors has a noticeably lower P/E ratio than comparable automakers, highlighting that it could potentially be undervalued.

Price/earnings-to-growth ratio

The price/earnings-to-growth (PEG) ratio is similar to the P/E ratio, but it also factors in a company's future earnings growth. You can calculate a company's PEG ratio by dividing its P/E ratio by its earnings growth rate (EGR) over a specific timeframe.

Continuing our earlier example, if a company has a P/E ratio of 25 and an expected EGR of 20%, its PEG ratio would be 1.25. A PEG ratio of 1 generally means a company has a balanced relationship between its market value and projected earnings growth, so any PEG ratio less than 1 is a sign it may be undervalued, and vice versa.

Imagine a scenario where two similar companies have P/E ratios of 15 and 10. Simply looking at the P/E ratios would imply the company with the lower P/E ratio is undervalued (and a better investment). However, if their EGRs are 20% and 10%, respectively, the first company would be the preferred choice based on the PEG ratio:

  • Company 1: 15 ÷ 20 = 0.75 PEG ratio
  • Company 2: 10 ÷ 10 = 1.00 PEG ratio

The PEG ratio offers a more comprehensive view of a company's value relative to its growth potential, which is important considering investing is about the future, not the past.

These metrics are only one piece of the puzzle

Although both methods can be great for finding undervalued stocks, they should make up just one part of your decision-making process, not all of it. Relying solely on one or even two metrics when investing can be misleading because it doesn't always account for the why behind a company's valuation.

A company with a low P/E ratio could still be a bad investment if its prospects are poor. Similarly, a company with a high PEG ratio might look overvalued at first, but that doesn't consider the company's cash position, market share, or other elements that could fuel future growth.

The best strategy is to pair these metrics with both company-specific and industry-specific details to identify undervalued stocks. The extra effort will pay off down the road.