How do you calculate the P/E ratio?
Divide the share price by earnings per share: P/E = price per share / earnings per share. The answer is a multiple: how many dollars, pounds or dirhams the market is paying for each one of yearly profit. The default inputs use a price of $50 and earnings of $2.50 a share, so the P/E is 50 / 2.50 = 20.
The same ratio can be built three ways, and all three agree when the inputs describe the same company at the same moment:
| Route | Formula | Example | P/E |
|---|---|---|---|
| Per share | Price / EPS | $50 / $2.50 | 20 |
| Company totals | Market cap / net income | $2,000,000,000 / $100,000,000 | 20 |
| Inverse of the yield | 1 / earnings yield | 1 / 5% | 20 |
The Market cap and profit tab opens on a different company, worth $2,000,000,000 and earning $80,000,000, so it shows a P/E of 25 rather than 20.
Trailing P/E vs forward P/E
A trailing P/E uses earnings that have already been reported, usually the last four quarters or the last full year. A forward P/E uses a forecast of the next 12 months. The price is the same; only the earnings change.
With the default price of $50, trailing EPS of $2.50 and a forecast of $2.80, the trailing P/E is 20.00 and the forward P/E is 50 / 2.80 = 17.86. The forecast assumes earnings grow 12%, from $2.50 to $2.80, and the forward multiple is lower only because of that assumption. If the forecast is missed, the forward P/E was describing earnings that never arrived.
When you compare companies, compare like with like: trailing with trailing and forward with forward, on forecasts made the same way.
P/E from market cap and net income, and what counts as EPS
Market capitalization is the share price times the shares in issue, and net income is the year's profit for ordinary shareholders. Dividing one by the other cancels the share count, so P/E = market cap / net income gives the same multiple as price over EPS. On the second tab, $2,000,000,000 / $80,000,000 = 25, an earnings yield of 4%.
The two routes can differ slightly in practice because reported EPS uses an average share count. IAS 33 Earnings per Share, the international standard, describes basic EPS as the profit or loss attributable to ordinary equity holders of the parent divided by the weighted average number of ordinary shares outstanding in the period. Diluted EPS also allows for shares that convertible instruments, options and warrants could add. Market cap uses today's share count. A company that bought back or issued many shares during the year can therefore show two slightly different P/E figures.
Earnings yield: the P/E ratio turned upside down
Earnings yield is EPS / price, or 1 / P/E, written as a percentage. A P/E of 20 is an earnings yield of 5%; a P/E of 25 is 4%; a P/E of 18 is 5.56%.
The yield has two practical uses. It stays defined when earnings are negative, where the P/E does not, and it puts a share on the same scale as an interest rate. It is not cash paid to you: a company can pay out part of its earnings as dividends and keep the rest, and the yield counts both.
Because the yield is 1 / P/E, each extra point of P/E lowers it by less than the last. Going from a P/E of 20 to 21 takes the yield from 5% to 4.76%, a drop of 0.24 points; going from 40 to 41 takes it from 2.5% to 2.44%, a drop of 0.06 points.
What is a good P/E ratio?
There is no single good number, and this page does not quote one. A P/E compares price with one year of profit, so the same multiple can mean different things for a company whose profit is expected to grow fast, one whose profit is shrinking, and one whose profit swings with the economy. Interest rates matter too, because an earnings yield can be set beside the rate on bonds or savings, and that comparison shifts whenever rates move.
A P/E becomes useful when it is compared with something measured the same way:
- The same company's own history, on the same earnings basis.
- Similar companies in the same industry, using the same trailing or forward period.
- An earnings yield against a bond yield, remembering that profit can change and bond coupons do not.
A high P/E is not proof that a share is expensive, and a low one is not proof that it is cheap. A low P/E can reflect a profit that the market expects to fall.
Why is P/E not meaningful when earnings are negative?
If a company makes a loss, there are no earnings to divide by. Price divided by a negative EPS gives a negative number, and a negative P/E cannot be ranked against positive ones: a share with a large loss would look cheaper than one with a small loss. For that reason the calculator reports the P/E as not meaningful when EPS or net income is zero or below.
It still shows the earnings yield, which keeps its meaning. A share at $12 with a loss of $0.40 a share has an earnings yield of -3.33%. Measures built on sales or cash flow stay defined for a loss-making company, and on the first tab the calculator still works out a forward P/E if you enter a positive forecast.
Worked examples in pounds, dirhams and euros
| Example | Inputs | P/E | Earnings yield |
|---|---|---|---|
| A UK share | Price £8.75, EPS £0.54 | 16.20 | 6.17% |
| A Gulf share, with a forecast | Price AED 3.90, EPS AED 0.26, forecast EPS AED 0.30 | 15.00 trailing, 13.00 forward | 6.67% |
| A euro company, totals | Market cap €4.2 billion, net income €310 million | 13.55 | 7.38% |
In the dirham example the forecast assumes EPS rises 15.38%, from AED 0.26 to AED 0.30, which is what pulls the forward P/E down to 13. The ratio itself has no currency: a P/E of 15 in dirhams and a P/E of 15 in pounds describe the same relationship between price and profit, and the calculator never converts one currency into another.
What share price does a P/E imply?
Turn the formula around: price = P/E x EPS. On the Price from a P/E tab, a multiple of 18 on earnings of $2.50 gives a price of $45.00. One point of P/E is worth exactly one EPS, so a multiple of 19 gives $47.50 and a multiple of 17 gives $42.50.
This is the arithmetic behind turning a multiple into a price, and the answer is only as good as the two numbers you put in. Choosing the multiple is a judgment about the company and the market, and the calculator does not make it for you. The result is arithmetic on your assumptions, not a fair value. For a value built from cash flows instead of a multiple, see the DCF calculator.
How to calculate P/E in Excel, and common mistakes
With the price in B1 and EPS in B2, enter =IF(B2>0,B1/B2,"n/m") for the P/E and =B2/B1 for the earnings yield, formatted as a percentage. For company totals, divide the market cap cell by the net income cell in the same way.
- Mixing periods. Pairing a forward price target with trailing earnings, or one quarter's EPS with a yearly ratio. Use 12 months of earnings.
- Mixing currencies or share classes. A price quoted in pence over EPS reported in pounds is out by a factor of 100.
- Using adjusted earnings without saying so. A P/E on a company's own adjusted profit can differ from one on reported EPS.
- Reading a negative P/E as cheap. It is not meaningful.
- Treating a one-off gain as normal profit. A large disposal gain can make the P/E look low for one year only.
Glossary
P/E ratio: price per share divided by earnings per share. EPS: profit attributable to ordinary shareholders divided by the weighted average number of ordinary shares. Trailing P/E: uses reported earnings for the last 12 months. Forward P/E: uses forecast earnings for the next 12 months. Earnings yield: EPS divided by price, the inverse of the P/E. Market capitalization: share price times shares in issue. Diluted EPS: EPS allowing for shares that options, warrants and convertibles could create.
Frequently asked questions
How do you calculate the P/E ratio?
Divide the share price by earnings per share. A share at $50 with EPS of $2.50 has a P/E of 20. You get the same answer by dividing market capitalization by net income.
What is the difference between trailing and forward P/E?
Trailing P/E uses reported earnings for the last 12 months; forward P/E uses a forecast for the next 12. At a $50 price, trailing EPS of $2.50 gives 20 and a forecast of $2.80 gives 17.86.
What is a good P/E ratio?
There is no single good figure. A P/E is meaningful only next to the same company's history or similar companies measured the same way, and it depends on how profit is expected to change and on interest rates.
What does a P/E of 20 mean?
Investors are paying 20 times one year's earnings for the share. Put the other way, the earnings yield is 1 / 20 = 5% of the price.
Can a P/E ratio be negative?
Dividing by a loss gives a negative number, but it has no useful meaning and cannot be compared with positive P/E ratios. The calculator reports it as not meaningful and shows the earnings yield instead.
What is earnings yield?
Earnings per share divided by the share price, as a percentage. It is the P/E turned upside down, so a P/E of 25 is a yield of 4%. It stays defined when earnings are negative.
How do you find the price from a P/E ratio?
Multiply the P/E by earnings per share. A multiple of 18 on EPS of $2.50 gives $45.00, and each extra point of P/E adds one EPS, $2.50, to the price.
Is P/E calculated with basic or diluted EPS?
Either can be used, but say which. Diluted EPS allows for extra shares that options, warrants and convertibles could create, which can lower EPS and so raise the P/E on the same share price.
Why does market cap divided by net income differ from price divided by EPS?
Market cap uses today's share count, while reported EPS uses the average share count over the year. If the company issued or bought back many shares, the two P/E figures drift apart slightly.
How do I calculate the P/E ratio in Excel?
With the price in B1 and EPS in B2, use =IF(B2>0,B1/B2,"n/m") so a loss shows as not meaningful. Use =B2/B1 for the earnings yield.
Courses behind valuation ratios
Fundamental Analysis Online Crash Course
Introductory course on evaluating companies before investing, covering fundamental analysis, business performance, market value, and practical stock selection methods.
See what the course coversStock Selection Using Fundamental Analysis
Structured approach to selecting stocks using fundamental analysis, comparing intrinsic value with market price to identify long-term investment opportunities.
See what the course coversAdvance Fundamental Analysis Online Course
In-depth fundamental analysis course covering basic concepts through advanced valuation techniques used by professional investors to select stocks for long-term decisions.
See what the course coversSources and review
Last reviewed 14 November 2026 by the NIFM Academy editorial team. Next review by 14 May 2027.
- IFRS Foundation, IAS 33 Earnings per Share, standard summary page on ifrs.org, basic EPS is based on profit or loss attributable to ordinary equity holders of the parent and the weighted average number of shares outstanding; diluted EPS allows for convertible instruments, options and warrants. Checked 14 November 2026.
- P/E, earnings yield and implied price arithmetic, P/E = price / EPS = market cap / net income; earnings yield = EPS / price = 1 / P/E; implied price = P/E x EPS; worked in the tables and the working under every result. Checked 14 November 2026.