> Quick Answer: The Price-to-Earnings ratio tells you how many dollars investors are paying today for every dollar of a company's annual earnings, calculated simply as Share Price divided by Earnings Per Share.
Overview
The Price-to-Earnings ratio, almost always shortened to P/E, is the most widely quoted valuation metric in equity investing. It answers a simple question: for every dollar of profit a company generates per share, how much is the market currently willing to pay to own that dollar? A P/E of 20 means investors are paying $20 today for every $1 of the company's trailing annual earnings per share. All else equal, a lower P/E suggests a cheaper stock relative to its current profits, while a higher P/E suggests the market is pricing in stronger future growth, lower perceived risk, or simply greater optimism.
P/E is popular precisely because it is easy to compute and easy to compare across companies, sectors, and time periods. A retailer trading at 12x earnings and a software company trading at 40x earnings are not automatically mispriced relative to each other; different industries carry structurally different growth rates, capital intensity, and margin profiles, all of which the market prices into the multiple it is willing to pay. The ratio is most useful as a comparison tool, either against a company's own historical P/E range, against direct industry peers, or against a broad market benchmark like the S&P 500.
There are two common variants worth knowing. Trailing P/E uses earnings per share from the most recently reported twelve months, which is what this calculator assumes by default and what most financial data providers display as the headline "P/E" figure. Forward P/E instead uses analysts' projected earnings for the next twelve months, and tends to run lower than trailing P/E for companies expected to grow earnings, since the denominator is larger. Always check which version a source is quoting before comparing two P/E numbers against each other.
How This Is Calculated
The formula is a single division:
$$\text{P/E Ratio} = \frac{\text{Share Price}}{\text{Earnings Per Share (EPS)}}$$
Where Earnings Per Share is a company's net income attributable to common shareholders divided by its weighted average diluted shares outstanding over the measurement period. Most public companies report diluted EPS directly on the income statement each quarter, and trailing twelve-month EPS is simply the sum of the four most recent quarterly figures.
This calculator also derives the earnings yield, the mathematical inverse of the P/E ratio, expressed as a percentage:
$$\text{Earnings Yield} = \frac{\text{EPS}}{\text{Share Price}} \times 100$$
Earnings yield restates the same relationship in a form that is directly comparable to a bond yield or a risk-free interest rate, which is why investors sometimes use it alongside Treasury yields to gauge whether stocks look cheap or expensive relative to fixed income at a given point in the market cycle. All arithmetic runs on arbitrary-precision Decimal values so the division never accumulates binary floating-point rounding error, even at extreme price or EPS values.
Worked Example
Consider a company reporting the following figures:
- Current Share Price: $180.00
- Trailing Twelve-Month EPS: $9.00
Step 1: P/E ratio. $$\text{P/E} = \frac{\$180.00}{\$9.00} = 20.0$$
Step 2: Earnings yield (the inverse, for context). $$\text{Earnings Yield} = \frac{\$9.00}{\$180.00} \times 100 = 5.0\%$$
This stock trades at 20 times trailing earnings, meaning investors are paying $20 for every $1 of annual profit the company generated over the past twelve months, equivalent to a 5.0% earnings yield. A P/E of 20 sits within the long-run historical average range for the broad U.S. stock market, which has typically clustered between roughly 15x and 25x over extended periods, though this range shifts with interest rates, inflation expectations, and overall market sentiment.
What This Does Not Account For
The P/E ratio is a starting point for valuation analysis, not a complete verdict on whether a stock is cheap or expensive. It says nothing about a company's growth rate, so a P/E of 30 can be cheap for a company growing earnings 40% annually and expensive for one growing 3% annually; the PEG ratio exists specifically to address this gap. It ignores balance sheet health entirely, so two companies with identical P/E ratios can carry very different levels of debt and financial risk. It is distorted by one-time gains, write-offs, and accounting charges that inflate or depress reported net income without reflecting the underlying business's ongoing earning power, which is why analysts often adjust to a "normalized" or non-GAAP EPS figure. It cannot be meaningfully calculated for companies with negative or near-zero earnings, since the ratio becomes negative or explodes toward infinity. It also does not capture differences in accounting policy, share buyback activity, or capital structure across companies being compared.
Common Pitfalls
- Comparing P/E ratios across different industries without adjustment. A capital-intensive utility and an asset-light software company have structurally different "normal" P/E ranges; compare within the same sector first.
- Mixing trailing and forward P/E when comparing companies. Always confirm whether a quoted P/E uses historical or projected earnings before drawing conclusions from a comparison.
- Ignoring the effect of one-time items on reported EPS. A large asset sale or litigation settlement can temporarily inflate or crater EPS and distort the P/E ratio for that period alone.
- Treating a low P/E as automatically "cheap." A persistently low multiple can reflect real business deterioration, declining competitive position, or elevated risk rather than an undiscovered bargain.
- Using stale EPS figures after a recent earnings report. EPS should reflect the most recent trailing twelve months; using an outdated figure after a material earnings change misstates the ratio.
Frequently Asked Questions
What counts as a "good" P/E ratio?▸
Why do growth stocks trade at higher P/E ratios than value stocks?▸
Can a company have a negative P/E ratio?▸
What is the difference between trailing and forward P/E?▸
How does the P/E ratio relate to the PEG ratio?▸
Sources
- CFA Institute. Equity Valuation: Applications and Processes, CFA Program Curriculum.
- U.S. Securities and Exchange Commission. Regulation S-K, Item 601 (Earnings Per Share disclosure requirements).
- Financial Accounting Standards Board (FASB). ASC 260, Earnings Per Share.
- Robert Shiller, Yale University. Historical S&P 500 P/E Ratio Dataset (Irrational Exuberance data archive).