Q: Stocks that are growing rapidly often trade at extremely high P/E ratios. Is there a better way to compare these types of companies?

The price-to-earnings (P/E) ratio is perhaps the most commonly used metric to evaluate stocks, but it isn't always useful, especially in the cases of rapidly growing companies. For example, shares of Amazon.com cost roughly 240 times earnings as I write this, and Netflix trades for a P/E of 207, although I wouldn't necessarily call either stock expensive.

An alternative is the price-to-earnings-growth (PEG) ratio, which takes a company's growth rate into account. The math is simple enough: Divide the P/E ratio by the expected earnings growth rate going forward, which should be readily available on major financial websites.

For example, on a recent episode of The Motley Fool's Industry Focus podcast, I discussed comparing Visa (NYSE:V) and Mastercard (NYSE:MA) -- obviously two very similar companies, business-wise. Both trade for approximately 29 times their expected 2017 fiscal year earnings, which not only looks expensive at first glance, but it's exactly the same.

This is where the PEG ratio is useful. Visa is expected to grow its earnings at an annualized rate of 17% over the next five years, which translates to a PEG ratio of 1.7. On the other hand, MasterCard is expected to grow earnings at a 15.3% rate, which corresponds to a PEG ratio of about 1.9. Comparing the two shows that Visa might be more cheaply valued.

The PEG ratio, like any metric, is just one part of a thorough analysis of a stock. However, it can add some clarity to situations where the P/E ratio doesn't tell you much.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.