liveBook · Manning

Price-to-earnings ratio

As explained in Investing for Programmers

A price-to-earnings ratio is a valuation ratio comparing a company's share price with its earnings per share.

The price-to-earnings (P/E) ratio measures how much investors pay for each dollar of a company's earnings. Calculate it by dividing share price by earnings per share (EPS): P/E = share price ÷ EPS. A higher value can indicate that investors expect stronger future growth, but it can also signal overvaluation. section 2.0 section 2.4.4

Interpret P/E comparatively rather than in isolation. Compare a company's ratio with an index baseline, its sector median, its peers, or its own historical average. Industry economics and expected growth can make otherwise similar ratios tell very different stories. section 2.4 section 2.4.4

Use P/E analysis with these checks:

  • Distinguish trailing P/E, based on the most recent twelve months, from forward P/E, based on projected financial performance. section 2.4.4
  • Pair P/E with earnings growth; dividing P/E by EPS growth produces the price/earnings-to-growth (PEG) ratio. section 2.4.4
  • Review other financial metrics and industry peers instead of treating one attractive ratio as proof of company health. section 2.4
  • Treat technology-company P/E values cautiously because reinvested earnings, innovation spending, and expected growth can support higher ratios while increasing risk. section 10.1

Comparing NVIDIA and peers

A P/E of 47.61 for NVIDIA and 10.43 for Pfizer does not automatically make NVIDIA overvalued or Pfizer undervalued. A sector median of 25.31 would make NVIDIA look expensive, but projected growth may change the interpretation. A June 8, 2025 snapshot lists NVIDIA at 44.43 trailing non-GAAP P/E versus a 22.20 sector median, while its forward non-GAAP P/E is 33.14. section 2.4.4

Table 2.7 A snapshot of NVIDIA’s valuation
Sector relative grade
NVIDIA
Sector median
% diff. to sector
NVIDIA 5Y avg.
% diff. to 5Y avg.
P/E Non-GAAP (TTM)
D
44.43
22.20
100.10
63.09
29.59
P/E Non-GAAP (FWD)
C-
33.14
22.64
46.38
47.38
30.05
P/E GAAP (TTM)
C-
45.71
28.17
62.22
83.84
45.49
P/E GAAP (FWD)
C
35.04
29.14
20.24
62.08
43.56
PEG GAAP (TTM)
B
0.56
0.91
-38,45
—
NM
PEG Non-GAAP (FWD)
B+
1.15
1.73
-33.48
1.80
36.21
FWD, forward (future financial performance); TTM, trailing 12 months (most recent 12-month period); NM, nonmeaningful value
Data taken from Seeking Alpha on June 8, 2025 (for the latest data, go to https://mng.bz/Gwm8)

Compare NVIDIA's trailing and forward P/E values with sector medians, historical averages, and PEG ratios in one valuation snapshot. section 2.4.4

How Investing for Programmers covers it

How deep it goes
Defines the formula, compares baselines, distinguishes trailing and forward values, and defers complete judgment to broader analysis.
Examples
Uses NVIDIA, Pfizer, Walmart, Apple, Sempra, and Coca-Cola comparisons plus sector medians and historical averages.
What it assumes
Assumes basic share and EPS concepts, then defines how they form a valuation ratio.
What you can do after
Evaluate relative valuation with P/E, PEG, sector benchmarks, peer comparisons, and historical context without treating one ratio as decisive.
How it connects
Connects P/E with earnings per share, valuation, sector comparison, peer analysis, PEG, and growth expectations.

Also explained in

Compare how 2 books explain price-to-earnings ratio →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Investing for Programmers. The section links point to the parts of the book it draws on.