Home / Academy

Academy · · 10 min · By Álvaro García

P/E Ratio Formula: What It Is and How to Calculate It

The P/E ratio is a share's price over its earnings per share. Learn how to calculate it, trailing vs. forward P/E, PEG and why the S&P 500 P/E fell to 17.1.

P/E Ratio Formula: What It Is and How to Calculate It

Contents

  1. What is the P/E ratio?
  2. How to calculate the P/E ratio: formula and step by step
  3. Trailing P/E and forward P/E
  4. How to interpret the P/E ratio: high or low?
  5. The S&P 500 in 2026: why the P/E falls without the market falling
  6. Earnings yield: the inverted P/E ratio vs. bonds
  7. The PEG ratio: the P/E adjusted for growth
  8. Common mistakes when using the P/E ratio
  9. P/E ratio summary table
  10. Frequently asked questions

In short: the P/E ratio (price-to-earnings ratio) is a share's price divided by its earnings per share (EPS), and it shows how many times over you are paying for a company's annual profit. A P/E of 20 means paying 20 years of current earnings, if those earnings never changed. It only works as a comparison: against the sector, against the company's own history and against expected growth. According to FactSet, the S&P 500 traded at 17.1 times forward earnings on November 20, 2026, below its 10-year average of 19.1.

The P/E ratio of a stock is the share price divided by the company’s earnings per share (EPS): P/E = price ÷ EPS. If a share trades at €50 and the company earns €2.50 per share a year, its P/E is 20. It is the most widely used valuation ratio in the stock market because it quickly answers a key question: how much are you paying for each euro of profit?

In this guide you will see how to calculate the P/E ratio step by step, the difference between trailing and forward P/E, how to interpret it without falling into the usual traps, and a real case: why the S&P 500's P/E fell from 22 to 17 in 2026 even though the index did not collapse.

What is the P/E ratio?

The P/E ratio (short for price-to-earnings ratio, also called the price-earnings ratio) is the relationship between a share's market price and its net earnings per share. It shows how many times over the market is paying for the company's annual profit. A P/E of 15 means the price equals 15 years of current earnings, if those earnings never changed.

The Spanish securities regulator, the CNMV, and the stock market guides of institutions such as CaixaBank define it as the ratio of the share price to earnings per share. It is used to compare valuations, not to tell on its own whether a stock will go up or down.

How to calculate the P/E ratio: formula and step by step

There are two equivalent ways to calculate it:

  • By share: P/E = share price ÷ earnings per share (EPS).
  • By company: P/E = market capitalization ÷ annual net profit.

Both give the same result, because market capitalization is the price multiplied by the number of shares, and EPS is net profit divided by that same number of shares.

Worked example, step by step

Take a fictitious company, Example Corp., with these figures:

  1. Net profit over the last 12 months: €250 million.
  2. Number of shares: 100 million. EPS = 250 ÷ 100 = €2.50.
  3. Share price: €50. Market capitalization = 50 × 100 million = €5,000 million.
  4. P/E = 50 ÷ 2.50 = 20. Check: 5,000 ÷ 250 = 20.

If the share rises to €60 tomorrow and earnings do not change, the P/E goes to 24 (60 ÷ 2.50): you pay more for the same thing. If instead earnings rise to €3 per share and the price stays at €50, the P/E falls to 16.7 (50 ÷ 3): the stock has become cheaper without its price dropping.

To see how much you would gain or lose at different buy and sell prices, you can use our stock profit calculator.

Trailing P/E and forward P/E

When you read a P/E, always check which earnings figure sits in the denominator. It is the most common mistake when comparing figures from different sources.

Type of P/EEarnings usedAdvantageDrawback
Trailing P/E (TTM)Actual EPS of the last 12 monthsAccounting figure already publishedLooks backwards; may include one-off items
Forward P/EAnalysts' consensus EPS estimate for the next 12 monthsReflects expected growthDepends on forecasts that may prove wrong
Shiller P/E (CAPE)10-year average of inflation-adjusted earningsSmooths out the economic cycleReacts very slowly; useful only over the long term

The gap can be huge. In the FactSet Earnings Insight report of November 20, 2026, the S&P 500 had a trailing P/E of 22.9 and a forward P/E of 17.1. Both are correct; they simply measure different things. The fact that the forward figure is much lower tells us analysts expect earnings to grow strongly: for CY 2027, FactSet projects EPS growth of 16.4%, after an estimated 33.7% for 2026.

How to interpret the P/E ratio: high or low?

There is no universal "good" P/E. A P/E of 25 can be cheap for a company that is doubling its earnings and expensive for a utility that barely grows. To interpret it, always compare it with three references:

  • Its sector: banks, oil companies and utilities usually trade on low P/Es; consumer, software and healthcare companies on higher ones.
  • Its own history: the company's or index's average P/E over 5 or 10 years.
  • Its expected growth: the faster earnings grow, the higher the P/E the market is willing to pay.

Average P/E ratio by sector today

FactSet data from November 20, 2026 show how different P/Es can be within the same index:

S&P 500 sectorForward P/E (Nov. 20, 2026)Earnings yield (1 ÷ P/E)
Consumer discretionary24.24.1%
Consumer staples23.34.3%
Industrials21.34.7%
S&P 500 (overall)17.15.8%
Financials14.46.9%
Energy11.58.7%

Source of the P/E figures: FactSet. The earnings yield column is an Audited Traders calculation (1 ÷ P/E, rounded).

The fact that energy trades at 11.5 times does not mean it is "half as cheap" as consumer discretionary: oil companies' earnings depend on the price of crude and are far more cyclical, so the market pays less for them.

The S&P 500 in 2026: why the P/E falls without the market falling

The data in this section is a snapshot as of November 20, 2026; the mechanism it explains applies to any stock or index. This year offers a textbook example of how the P/E moves. According to John Butters, a FactSet analyst, the forward P/E of the S&P 500 was 22.0 on December 31, 2025 and fell to 17.7 on November 5, 2026, its lowest level since November 2023. Over that period the index price had risen 7.4%, but expected earnings per share had risen 33.6%.

You can check it yourself with the formula: 22.0 × 1.074 ÷ 1.336 = 17.7. In other words, the P/E fell because the denominator (earnings) grew much faster than the numerator (price). The direct calculation with that day's data also adds up: a close of 7,353.73 points divided by forward EPS of $415.82 gives 17.7.

Later, between 30 September and 20 November, the index fell 6.2% while estimated EPS rose 4.4%, and the P/E went from 19.0 to 17.1 (19.0 × 0.938 ÷ 1.044 = 17.1). Here the drop combines a falling price with rising earnings estimates. FactSet will publish its next report on December 4, 2026.

What it means for the investor: a P/E that falls because earnings rise is very different from one that falls because the price collapses. In the first case the market keeps "paying" the same for a business that earns more; in the second, it demands a bigger discount for some risk. And in both cases the forward P/E is only as reliable as the analysts' forecasts: if those earnings do not arrive, the real P/E will be higher.

Earnings yield: the inverted P/E ratio vs. bonds

Invert the P/E and you get the earnings yield: 1 ÷ P/E. With a forward P/E of 17.1, the S&P 500 offers expected earnings equivalent to 5.8% of its price (1 ÷ 17.1 = 5.85%).

This figure is useful for comparing with government bond yields. The 10-year US Treasury yield rose above 5% (5.046%) on December 1, 2026. The gap between the two is under one percentage point: stocks offer little extra earnings yield for taking on their higher risk. With the trailing P/E (22.9), the earnings yield falls to 4.4%, below the bond.

Be careful with conclusions: a company's earnings can grow over the years and a bond's coupon cannot, so the comparison is not exact. But it explains why high interest rates put pressure on P/Es: when the bond pays more, investors demand to buy stocks cheaper. We also cover this in our piece on bond duration and rising rates.

The PEG ratio: the P/E adjusted for growth

To compare companies growing at different speeds, investors use the PEG (Price/Earnings to Growth): PEG = P/E ÷ expected annual EPS growth (in percentage points).

  • Company A: P/E 30 and expected growth of 30% a year → PEG = 1.0.
  • Company B: P/E 12 and expected growth of 4% a year → PEG = 3.0.

Although A has a P/E more than double B's, you pay only a third as much for each point of growth. As a rule of thumb, a PEG close to 1 is considered reasonable, but it still depends on forecasts that may not come true. Investors such as Peter Lynch popularized this ratio; in our guide on how to invest like Warren Buffett you will see why the price paid matters as much as the quality of the business.

Common mistakes when using the P/E ratio

  1. Comparing P/Es across different sectors. A bank at 10 and a tech company at 30 cannot be compared directly.
  2. Mixing trailing and forward P/E. 22.9 and 17.1 can describe the same index on the same day.
  3. Trusting a very low P/E. It can be a "value trap": the market anticipates that earnings will fall, and then the real P/E will be higher.
  4. Using the P/E for loss-making companies. If EPS is negative, the P/E makes no sense; look at sales, cash flow or EBITDA instead.
  5. Forgetting one-off items. An asset sale can inflate a year's earnings and artificially sink the P/E.
  6. Ignoring the cycle. In cyclical companies (oil, steel, automotive), the P/E is usually lowest right at peak earnings, when the risk of a fall is greatest.
  7. Using it as a buy or sell signal. The P/E measures valuation, not market timing. An expensive stock can get more expensive for years.

P/E ratio summary table

ConceptFormula or ruleExample
P/EPrice ÷ EPS€50 ÷ €2.50 = 20
Company-level P/EMarket capitalization ÷ net profit€5,000M ÷ €250M = 20
Earnings yield1 ÷ P/E1 ÷ 20 = 5%
PEGP/E ÷ EPS growth (%)30 ÷ 30 = 1.0
Forward P/EPrice ÷ 12-month estimated EPSS&P 500: 17.1 (Nov. 20, 2026)
Trailing P/EPrice ÷ EPS of the last 12 monthsS&P 500: 22.9 (Nov. 20, 2026)
Loss-making companiesNot applicableUse sales, cash flow or EBITDA

The P/E is an analysis tool, not a guarantee: investing in shares carries a risk of loss and no figure is guaranteed. If you trade CFDs or use leverage, the risk is multiplied; read our risk warning. To complement the P/E with a stock's market risk, look up what a stock's beta is, and follow index news in our stock market section.

Frequently asked questions

What is a good P/E ratio for buying a stock?

There is no universal figure. A P/E is considered low or high only in comparison with its sector, with the company's own historical average and with its expected growth. As a reference, the S&P 500 has had an average forward P/E of 19.1 over the last 10 years, according to FactSet.

What does a P/E of 15 mean?

It means the share price equals 15 times its annual earnings per share. Put another way, if earnings stayed the same, the company would take 15 years to generate earnings equal to what you pay for it today. Its earnings yield would be 6.7% (1 ÷ 15).

Can the P/E ratio be negative?

Mathematically yes, if the company makes losses (negative EPS), but in practice it is considered "not applicable". In those cases analysts use other ratios, such as price/sales or enterprise value/EBITDA.

Where can I find a stock's P/E ratio?

It appears on the quote page of most brokers and financial portals. Always check whether it is trailing (TTM) or forward, because they can be very different. You can also calculate it yourself by dividing the current price by the EPS in the annual accounts the company publishes.

What is the difference between the P/E ratio and the Shiller P/E?

The normal P/E uses earnings from a single year (past or estimated). The Shiller P/E, or CAPE, created by Nobel laureate Robert Shiller, divides the price by the average of the last 10 years of inflation-adjusted earnings, to smooth out the ups and downs of the economic cycle. It is used mainly to value whole indices over the long term.