What this calculator shows
This calculator puts up to four hypothetical companies side by side. For each one you enter a name, a share price and earnings per share (EPS) for the last four quarters, and, if you like, a forward EPS estimate and an expected yearly EPS growth rate. It returns the trailing P/E, the forward P/E, the earnings yield and the PEG ratio, and a table you can sort by any of them. It has no market data: every number is one you type in.
How the numbers are worked out
- Trailing P/E = share price ÷ trailing EPS.
- Forward P/E = share price ÷ forward EPS.
- Earnings yield = EPS ÷ share price, shown as a percent (1 ÷ P/E).
- PEG = trailing P/E ÷ expected growth, with growth written as a whole number, so 10% growth divides by 10.
When EPS is zero or negative the P/E has no meaning, so the tool shows "n/a" with the reason instead of a number; the earnings yield is still shown, as a negative figure for a loss. PEG is also n/a when growth is zero or negative or left empty. Sorting puts the lowest number first and every n/a last.
Worked example (hypothetical)
- A share at $60 with trailing EPS of $3 has a P/E of 60 ÷ 3 = 20 and an earnings yield of 5%. With 10% expected growth its PEG is 20 ÷ 10 = 2.
- Peers at the same $60 price with EPS of $4 and $2.40 have P/Es of 15 and 25, and earnings yields of 6.67% and 4%.
- If a one-off write-down cuts trailing EPS to $0.50, the P/E jumps to 120 even though the business did not change.
Limits of this model
- A lower ratio is not a verdict. These ratios ignore growth quality, debt, cyclicality and one-off items, and the sorted order is not a ranking.
- Debt and cash are counted in Enterprise value (EV), explained, and a business valued from its future cash flows in DCF step by step. The formulas and examples come from Trailing P/E (price / earnings).
- Forward EPS and growth are your own estimates, not forecasts, and this is education, not a recommendation about any security.
For educational purposes only. This material does not provide investment advice.