Skip to content
BedrockCalculator
Figures cited to primary sourcesWritten by Aapt Dubey, MBA (Marketing & Banking), ISB 2 primary sourcesLast updated

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

Divide share price by EPS to see what you pay for each dollar of annual earnings. Get the P/E, the earnings yield it implies, and how the valuation reads.

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.

Your inputs

Computed
$
$

Preset scenarios

P/E Ratio
20
Earnings Yield
5.00%
Relative Valuation Signal
In line with the long-run historical market average (~15-25x)
Share Price (Input)
$180.00
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.

What does this calculator do?

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 is this calculated?

The formula is a single division:

P/E Ratio = (Share Price)/(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:

Earnings Yield = EPS/(Share Price) × 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.

P/E = $180.00/$9.00 = 20.0

Step 2: Earnings yield (the inverse, for context).

Earnings Yield = $9.00/$180.00 × 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 does this calculator 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.

What mistakes do people make with this?

  • 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?

There is no universal good or bad P/E; it depends entirely on context. Historically, the S&P 500's average P/E has ranged roughly between 15x and 25x over long stretches, though periods of low interest rates or high growth expectations have pushed the broad market meaningfully above that range. The most useful comparison is a company's P/E against its own historical range and against its direct industry peers, not against an arbitrary universal number.

Why do growth stocks trade at higher P/E ratios than value stocks?

Investors are willing to pay more today for a dollar of current earnings when they expect that dollar to grow substantially in future years. A high P/E is essentially the market pricing in a stream of expected future earnings growth, discounted back to the present. If that growth fails to materialize, the multiple typically compresses sharply.

Can a company have a negative P/E ratio?

Mathematically the formula produces a negative number when EPS is negative (the company reported a net loss), but this figure is not meaningful for valuation purposes and financial data providers typically display "N/A" instead. Analysts use alternative metrics such as price-to-sales or price-to-book to value unprofitable companies.

What is the difference between trailing and forward P/E?

Trailing P/E divides the current price by the last twelve months of actual reported earnings. Forward P/E divides the current price by analysts' consensus estimate of the next twelve months of earnings. Forward P/E is inherently an estimate and can be wrong if actual results diverge from projections, while trailing P/E is based on confirmed historical results.

How does the P/E ratio relate to the PEG ratio?

The PEG ratio takes the P/E ratio one step further by dividing it by the company's expected annual earnings growth rate, producing a metric that adjusts valuation for growth. A stock with a high P/E but also very high growth can show a low, attractive PEG ratio, while a stock with a moderate P/E but stagnant growth can show a high, less attractive PEG ratio.

Sources

  • Financial Accounting Standards Board, Statement of Financial Accounting Standards No. 128, Earnings per Share (February 1997), the standard now codified as ASC Topic 260: the definitions of basic and diluted earnings per share. storage.fasb.org/fas128.pdf
  • U.S. Securities and Exchange Commission, Investor.gov, the official authority for the investing this calculator relates to. investor.gov

Also consulted: 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).

Did this calculator answer your question?

How this calculator is tested

This calculator is checked by 3 automated test cases: specific inputs whose correct result is known in advance, and rules the output must always obey. They run on every change to the site. See the testing and corrections policy.

Show the test cases
  • Baseline vector: price=$180.00, EPS=$9.00
  • throws for zero or negative EPS
  • flags a high multiple correctly

Add This Website as Preferred Source on Google

See Bedrock Calculator first in your Search results & AI Overviews