How the P/E ratio calculator works
The price-to-earnings (P/E) ratio is
Stock Price / Earnings Per Share (EPS) — it tells you how much investors are paying for
each dollar of a company's current earnings. For a deeper look at what makes a P/E ratio "good" or
"bad" in context, see our guide:
How to Read a P/E Ratio. This calculator focuses on
computing the numbers themselves, plus a few ways to put a single P/E figure in context.
Earnings yield is simply the P/E ratio flipped over:
Earnings Yield = (EPS / Stock Price) × 100. It expresses the same relationship as a
percentage, which some investors find more directly comparable to bond yields or other
percentage-based return measures.
The PEG ratio divides the P/E ratio by the expected annual earnings growth rate:
PEG = P/E / Growth Rate. It's a way of asking "is this P/E justified by how fast
earnings are growing?" — a higher P/E can still result in a low (attractive) PEG if growth is fast
enough, and a low P/E can result in a high (unattractive) PEG if growth is slow or negative.
Finally, the calculator compares your P/E to an industry average you provide:
% Difference = (P/E − Industry Average P/E) / Industry Average P/E × 100. A difference
beyond ±10% is labeled a premium or discount to the industry average; anything closer is labeled "in
line."
Worked example
Suppose a stock trades at $150 per share, with $6 in earnings per share, in an industry that averages a 20 P/E, and analysts expect 15% annual earnings growth.
P/E ratio = 150 / 6 = 25.00. Earnings yield = (6 / 150) × 100 = 4.00%. PEG ratio = 25 / 15 ≈ 1.67.
Compared to the industry average of 20, this stock's P/E is +25.00% higher — beyond the ±10% band, so the calculator labels it as "Trades at a premium to industry average." Whether that premium is justified depends on factors this simple comparison doesn't capture, like superior growth, margins, or competitive position — the PEG ratio of 1.67 is one data point toward answering that, not a final verdict.
Common mistakes to avoid
1. Comparing P/E ratios across different industries
A software company and a utility company can have very different "normal" P/E ratios for structural reasons — growth rates, capital intensity, and risk all differ by industry. Always compare a stock's P/E to its own industry average, not to the broad market or an unrelated sector.
2. Treating PEG below 1.0 as automatically "cheap"
PEG near or below 1.0 is a popular rule of thumb, but it relies entirely on the growth rate you enter being accurate — an overly optimistic growth estimate will make almost any stock's PEG look attractive. Stress-test your growth assumption before trusting the PEG figure too much.
3. Not checking whether EPS is trailing or forward-looking
A P/E calculated from trailing (already-reported) earnings can look very different from one using forward (estimated) earnings, especially for a company whose earnings are expected to change quickly. Know which EPS figure you're entering before comparing your result to a P/E you saw quoted elsewhere.