Calcoid
Finance

Price-to-Earnings (P/E) Ratio Calculator

Calculate trailing and forward P/E, earnings yield, and the PEG ratio from share price, EPS, and an optional growth rate. Compares the multiple against the S&P 500, Nasdaq, Russell 2000, or your own benchmark and flags loss-makers, value, blend, growth, and speculative buckets.

Price-to-earnings inputs

Negative if the company is unprofitable.

Optional. Used for forward PE only.

Optional. Drives the PEG ratio.

Trailing PE

25.00

Fairly valued vs the benchmark (benchmark PE 20.0).

Forward PE
21.43
PEG ratio
2.50
Earnings yield
4.00%
Style classification
Blend (PE 15 to 25)

Frequently Asked Questions about the Price-to-Earnings (P/E) Ratio Calculator

What is the P/E ratio and how is it calculated?
The price-to-earnings ratio divides a stock's market price per share by its earnings per share (EPS). The formula is P/E = share price / EPS. A stock trading at $150 with $6 of trailing twelve-month EPS has a P/E of 25, meaning investors are paying $25 today for every $1 of recent annual profit. The same math runs in reverse as the earnings yield: 1 / P/E expressed as a percent, which lets you compare equities directly against bond yields. A P/E of 25 corresponds to a 4 percent earnings yield.
What is the difference between trailing and forward P/E?
Trailing P/E (often labeled TTM, trailing twelve months) uses the last four reported quarters of GAAP earnings. It is backward-looking but objective, since the numbers have already been audited and filed in 10-Q or 10-K reports with the SEC. Forward P/E uses analyst consensus estimates for the next twelve months of EPS as the denominator. It is more relevant for fast-growing companies, where TTM understates earning power, but it is only as reliable as the estimates themselves. Sell-side consensus tends to be too optimistic at cyclical peaks and too pessimistic at troughs. A useful habit is to look at both: a stock cheap on forward P/E but expensive on trailing P/E is essentially a bet that the growth forecast will be realized.
What is the historical average P/E of the S&P 500?
Robert Shiller's CAPE dataset, which tracks the S&P 500 (and its predecessor indices) since 1881, shows a long-run trailing P/E median of about 16 and a mean closer to 17. The trailing P/E spends most of its time between 12 and 22, with sharp spikes during recessions when the E collapses faster than the P. The long-run cyclically adjusted P/E (CAPE), which averages ten years of inflation-adjusted earnings, is also around 17 historically. The market has traded substantially above those long-run averages for most of the 2010s and 2020s, reflecting low interest rates, higher tech-sector weight, and accelerating share buybacks.
Why do some companies have no P/E ratio?
When trailing EPS is zero or negative, P/E is mathematically undefined or negative, and a negative P/E carries no useful interpretation. Data providers like Bloomberg, FactSet, and Yahoo Finance display N/A or a blank field for any loss-making company. This is common for young growth companies (Tesla had no meaningful trailing P/E for most of its first decade as a public company), biotech firms before drug approval, companies absorbing a one-time write-down, and any business in a cyclical trough. For unprofitable firms, analysts substitute price-to-sales, EV/EBITDA, EV/revenue, or price-to-free-cash-flow ratios to value the equity until earnings turn positive.
What is the PEG ratio and what are the limitations of P/E analysis?
PEG divides trailing P/E by the expected annual earnings growth rate in percent. Peter Lynch popularized the rule in his 1989 book One Up on Wall Street: a PEG near 1.0 suggests the stock is fairly valued, below 1.0 looks cheap relative to its growth, and above 1.0 looks expensive. The bigger issue with P/E itself is that the multiple is not directly comparable across sectors and stages of the business cycle. Cyclicals (autos, banks, materials) print sky-high P/Es at the bottom of an earnings cycle and tiny P/Es at the peak, the exact opposite of what intuition suggests. Accounting choices (stock-based compensation, goodwill impairments, one-time tax items) can also distort GAAP EPS by 20 percent or more in a given year. Always cross-check P/E against EV/EBITDA, free cash flow yield, and the company's own historical multiple range before drawing conclusions.