Investing & Returns · Formula v1.0

P/E Ratio Calculator

Calculate a stock's price-to-earnings ratio and earnings yield from its price and earnings per share.

LAST REVIEWEDSeptember 24, 2026Inputs stay in your browser
Live calculation

Enter your numbers

Calculated result
Price-to-earnings ratio25.00×
Earnings yield4.0%
Sensitivity check

What if share price changes?

-10% input22.50×
0% input25.00×
+10% input27.50×

Answer first

What this calculator tells you

Calculate a stock's price-to-earnings ratio and earnings yield from its price and earnings per share. Compare what you pay for a dollar of earnings against the same company's history and its peers. Formula: P/E = share price ÷ earnings per share; earnings yield = earnings per share ÷ share price. At the worked-example inputs, the price-to-earnings ratio is 25.00×. Holding every other input steady, moving share price from $120 to $180 moves the result from 20.00× to 30.00×.

FreeNo sign-upInputs stay in-browserCSV exportReviewed September 24, 2026

Transparent method

The formula

P/E = share price ÷ earnings per share; earnings yield = earnings per share ÷ share priceEnter share price in dollars and earnings per share (trailing 12 months) in dollars.

Compare what you pay for a dollar of earnings against the same company's history and its peers.

Worked example

Price-to-earnings ratio25.00×
Earnings yield4.0%

Example inputs

Share price$150
Earnings per share (trailing 12 months)$6.00

How to interpret the result

A P/E ratio says how many dollars the market pays for one dollar of a company's yearly profit. At a $150 price and $6 of earnings, that is 25 times, or a 4 percent earnings yield if you flip it over. The flip is useful: it puts a stock's profit return on the same footing as a bond's interest rate, which makes the price feel less abstract.

At the worked-example inputs the price-to-earnings ratio is 25.00×. It rises with share price and falls as earnings per share (trailing 12 months) increases.

Interpretation boundary

Investment returns are uncertain; taxes, fees, volatility and cash-flow timing can materially change results.

Before you rely on it

What to check

Confirm which earnings sit under the ratio: last twelve months, the last fiscal year or a forecast. Each gives a different P/E for the same price.

The common error

Where people go wrong with p/e ratio calculator

Calling a low P/E cheap by default. Earnings that are about to fall make a low ratio a warning, and a company earning almost nothing shows a huge one that means little.

Sensitivity evidence

How share price changes the price-to-earnings ratio

Holding every other input at the worked-example value, moving share price from $120 to $180 moves the price-to-earnings ratio from 20.00× to 30.00×: a spread of 10.00×, or 40% of the worked-example result.

P/E Ratio Calculator: price-to-earnings ratio and earnings yield across a range of share price, every other input held at the worked-example value.
Share pricePrice-to-earnings ratioEarnings yield
$12020.00×5.0%
$13522.50×4.4%
$150worked example25.00×4.0%
$16527.50×3.6%
$18030.00×3.3%

Every input, tested

Which input moves the price-to-earnings ratio most

Of the 2 inputs, share price moves the price-to-earnings ratio most (5.00× across the range tested) and earnings per share (trailing 12 months) moves it least (5.05×).

P/E Ratio Calculator: price-to-earnings ratio with each input moved on its own, every other input held at the worked-example value.
InputTested fromToPrice-to-earnings ratio at each endSwing
Share price$135$16522.50× to 27.50×5.00× (20%)
Earnings per share (trailing 12 months)$5.40$6.6027.78× to 22.73×5.05× (20%)

Two variables at once

Price-to-earnings ratio by share price and earnings per share (trailing 12 months)

Across the grid the price-to-earnings ratio runs from 16.67× to 37.50×. Moving share price from $120 to $180 shifts it by 10.00× at the middle column, and moving earnings per share (trailing 12 months) from $4.80 to $7.20 shifts it by 10.42× at the middle row, so earnings per share (trailing 12 months) is the bigger lever here.

P/E Ratio Calculator: price-to-earnings ratio at each combination of share price (rows) and earnings per share (trailing 12 months) (columns).
Share price \ Earnings per share (trailing 12 months)$4.80$6.00$7.20
$12025.00×20.00×16.67×
$13528.13×22.50×18.75×
$15031.25×25.00×20.83×
$16534.38×27.50×22.92×
$18037.50×30.00×25.00×

The highlighted cell is the worked example: 25.00×.

Step by step

The worked example, input by input

Worked-example inputs and the results they produce for the p/e ratio calculator.
InputValue usedWhat it means
Share price$150Enter the share price used in this calculation.
Earnings per share (trailing 12 months)$6.00Net income divided by shares outstanding, from the company's income statement.
Price-to-earnings ratio25.00×
Earnings yield4.0%

Inputs, definitions and assumptions

Share price

Enter the share price used in this calculation. The prefilled worked-example value is $150.

Earnings per share (trailing 12 months)

Net income divided by shares outstanding, from the company's income statement. The prefilled worked-example value is $6.00.

How to use this calculator

  1. 1Verify the inputs. Gather share price and earnings per share (trailing 12 months) from your own documents; the prefilled values are examples.
  2. 2Save a baseline. The worked example puts the price-to-earnings ratio at 25.00×. Store your own version of it as Scenario A.
  3. 3Test one change. Start with share price, the input with the biggest effect here: moving share price from $135 to $165 takes the price-to-earnings ratio from 22.50× to 27.50×, a swing of 20% of the worked-example figure.
  4. 4Check the extremes. At half the example share price ($75) the price-to-earnings ratio is 12.50×; at double ($300) it is 50.00×.

People also ask

Frequently asked questions

How do you calculate p/e ratio?

P/E = share price ÷ earnings per share; earnings yield = earnings per share ÷ share price. Enter share price in dollars and earnings per share (trailing 12 months) in dollars. At the worked-example inputs the price-to-earnings ratio is 25.00×.

What does the p/e ratio result mean?

Compare what you pay for a dollar of earnings against the same company's history and its peers. At the worked-example inputs the price-to-earnings ratio is 25.00×. It rises with share price and falls as earnings per share (trailing 12 months) increases.

How much does share price change the price-to-earnings ratio?

Holding every other input at the worked-example value, moving share price from $120 to $180 moves the price-to-earnings ratio from 20.00× to 30.00×, a spread of 10.00×.

What are the limits of this p/e ratio calculator?

Investment returns are uncertain; taxes, fees, volatility and cash-flow timing can materially change results. The tables on this page test share price only from $120 to $180; a value outside that range is not tabulated here.

Which input moves the price-to-earnings ratio most in the p/e ratio calculator?

Ranked by how far each moves the price-to-earnings ratio across the range tested: share price (5.00×, 20%) and earnings per share (trailing 12 months) (5.05×, 20%).

If I double share price in the p/e ratio calculator, does the price-to-earnings ratio double?

Doubling it from $150 to $300 takes the price-to-earnings ratio from 25.00× to 50.00×, which is 2.00 times the worked-example figure. So the result scales almost exactly in proportion. Halving it to $75 gives 12.50×.

How much does earnings per share (trailing 12 months) matter in the p/e ratio calculator?

The worked example uses $6.00. Holding every other input at its worked-example value, moving earnings per share (trailing 12 months) from $5.40 to $6.60 takes the price-to-earnings ratio from 27.78× to 22.73×, a swing of 20% of the worked-example figure.

Which inputs change the earnings yield in the p/e ratio calculator?

At the worked-example inputs it is 4.0%. Share price takes it from 4.4% to 3.6% and earnings per share (trailing 12 months) takes it from 3.6% to 4.4%.

How should my allocation change as I get older?

The common approach reduces exposure to volatile assets as the horizon shortens, because there is less time to recover from a decline and, once withdrawals begin, sequence of returns starts to matter enormously. The right path depends on when the money is needed and what other income exists, not on age alone.

All investing & returns questions answered

Sources and evidence

Free Calculators Online is independent and is not affiliated with or endorsed by the source organizations. Educational estimates only.

Background reading

Guides that use this calculator

Definitions

Terms used on this page

Dividend yield : glossary term
Annual dividends as a percentage of share price. It rises when the price falls. So a high yield can signal a falling price. It is not always a generous distribution.
Dollar-cost averaging : glossary term
Investing a fixed amount on a recurring schedule regardless of market price.
Sharpe ratio : glossary term
Excess return divided by total return volatility for the same measurement period.
Expense ratio : glossary term
An investment fund’s annual operating expenses expressed as a percentage of assets.