TL;DR
A P/E ratio calculator divides a stock's price by its earnings per share, and a result near 15 to 25 is a normal range for profitable companies; the number is a starting filter for valuation, never a buy or sell signal on its own.
Key Takeaways
- 1.P/E equals share price divided by earnings per share, so a $150 stock earning $6 per share trades at 25 times earnings.
- 2.Trailing P/E uses the last 12 months of reported profit; forward P/E uses analyst estimates and is only as good as those guesses.
- 3.Earnings yield (1 divided by P/E) lets you compare a stock directly with a 10-year Treasury yield or a savings rate.
- 4.P/E breaks down for cyclical, loss-making and one-off-profit companies, so pair it with PEG, EV/EBITDA or free cash flow.
- 5.You can build a working P/E calculator in Google Sheets in under 10 minutes with the GOOGLEFINANCE function.
A P/E ratio calculator takes a stock's current share price and divides it by earnings per share (EPS) to show how many dollars you pay for each $1 of annual profit. A P/E of 20 means 20 dollars per dollar of earnings. Most profitable large companies land between 10 and 30, and context decides whether that is cheap or expensive.
I use P/E as the first filter in nearly every stock review, because it takes about 30 seconds and it kills bad ideas fast. It also fools people constantly. A low P/E can signal a bargain or a business in decline, and a high P/E can mean a rich valuation or a company whose profits are about to jump. This guide shows the formula, a step-by-step worked example, the difference between trailing and forward numbers, the companion metrics that fix P/E's blind spots, and how to build your own calculator in a spreadsheet so you are not relying on whatever a data site decides to show you. Every example uses round, clearly labeled hypothetical numbers so you can follow the math, and where I cite a historical benchmark I say where it comes from.
What is a good P/E ratio for a stock?
There is no single good P/E ratio. As a rough guide, a P/E between 15 and 25 is common for stable, profitable companies, below 10 often signals doubt about future earnings, and above 30 usually means the market expects fast growth. Compare a stock to its own history and its direct peers, not to a universal number.
The long-run average for the S&P 500 is often cited at roughly 15 to 17 times earnings, depending on whether you use trailing earnings or Robert Shiller's inflation-adjusted CAPE series that starts in 1871. Treat that as a loose anchor. A utility growing earnings 3% a year and a software company growing 25% a year should not trade at the same multiple, and the market knows it.
| P/E range | What it often signals | Typical caution |
|---|---|---|
| Below 10 | Market doubts earnings will last, or the business is cyclical at a peak | Check for falling revenue, heavy debt or one-time gains |
| 10 to 15 | Mature, slower growth or out-of-favor sector | Confirm the dividend and cash flow are real |
| 15 to 25 | Stable profitable company priced near the broad market | Compare with sector peers before calling it fair |
| 25 to 40 | Market is paying for above-average growth | Growth has to show up in the next 4 to 8 quarters |
| Above 40 or negative | Early growth, depressed earnings, or a loss-making business | P/E is close to meaningless here; use sales or cash flow metrics |
Notice what the table does not say: it never tells you to buy or sell. A P/E is a price tag expressed in earnings, and a price tag only matters next to the quality of what you are buying. A 12 P/E on a company whose profits are collapsing is more expensive than a 30 P/E on one doubling earnings.
Quick habit
Always ask two questions after you see a P/E: compared with what, and why. Compared with the same stock five years ago, compared with three direct competitors, and why the gap exists. If you cannot answer why, you have not finished the analysis.
A P/E ratio only becomes a useful valuation signal when you compare it against the same company's own five-year range and its closest peers, not against a universal benchmark.
How do you calculate a P/E ratio step by step?
Divide the current share price by earnings per share for the last 12 months. If a stock trades at $150 and the company earned $6.00 per share over the trailing four quarters, the P/E is 25. You can also divide total market capitalization by total net income, which gives the same answer.
The five-step P/E calculation
- 1
Find the current share price
Use a live quote from your broker, TradingView or Yahoo Finance. Avoid prices from the previous close when the market has moved sharply, since that skews the ratio.
- 2
Get trailing 12-month diluted EPS
Add the diluted EPS from the last four reported quarters, or read the TTM figure on the company's financials page. Use diluted EPS because it counts options and convertibles that could dilute you.
- 3
Divide price by EPS
Example: $150.00 price divided by $6.00 EPS gives a P/E of 25.0. If EPS is zero or negative the ratio is not meaningful, so record it as N/A.
- 4
Flip it into earnings yield
Divide 1 by the P/E. For a P/E of 25 the earnings yield is 4.0%. That is the profit the business generates per dollar of stock price.
- 5
Compare it against a benchmark
Put the 4.0% next to a 10-year Treasury yield or a high-yield savings rate. If a risk-free asset pays 4.5%, you are being paid less than the risk-free rate unless earnings grow.
Here is a second example with a twist. Suppose a company has a market cap of $12 billion and net income of $800 million. Divide the two and you get a P/E of 15. Now suppose $300 million of that income came from selling a building. Strip it out and earnings are $500 million, which pushes the P/E to 24. Same company, same price, and the story changes from cheap to fully valued. That is why I always scan the income statement for one-time gains before trusting a headline multiple.
The most common calculation error is using a stale EPS figure after a company reports. Data providers can lag by a day or two, so when a stock gaps on earnings I recalculate by hand from the press release before I trust any screener.
The correct P/E calculation uses diluted trailing-12-month EPS and a current price, and it should be rechecked by hand whenever a company has just reported or booked a one-time gain.
Trailing P/E vs forward P/E: which should you use?
Use trailing P/E to judge what a company has actually earned and forward P/E to judge what the market expects it to earn. Trailing numbers are audited facts; forward numbers are analyst estimates that are usually revised. The healthiest habit is to look at both and ask why they differ.
| Feature | Trailing P/E | Forward P/E |
|---|---|---|
| Earnings used | Last 4 reported quarters | Next 12 months of analyst estimates |
| Reliability | Audited, but backward looking | Forward looking, but estimates get revised |
| Best for | Mature, stable companies | Growing or recovering companies |
| Main risk | Includes one-time gains and losses | Analysts are often too optimistic |
| Example | $150 price / $6.00 EPS = 25.0 | $150 price / $7.50 EPS = 20.0 |
When forward P/E sits far below trailing P/E, the market expects earnings to jump. In the example above, 25 trailing falls to 20 forward because analysts expect EPS to rise 25%, from $6.00 to $7.50. That is only attractive if the estimate holds. I have watched forward multiples look cheap for two years while the estimates were cut every quarter, and the stock never caught up.
A quick sanity test: divide trailing P/E by forward P/E. In our example 25 divided by 20 is 1.25, meaning the forecast implies 25% earnings growth. If that implied growth is far above what the company delivered over the last three years, treat the forward number with suspicion.
Estimate risk
Forward P/E depends entirely on consensus estimates, and estimates are frequently trimmed after the quarter begins. Check the date of the estimate and whether revisions have been trending up or down before leaning on it.
Trailing P/E tells you what you are paying for earnings already delivered, while forward P/E only helps when the analyst estimates behind it are recent and trending upward.
Which companion metrics fix the blind spots of P/E?
Pair P/E with earnings yield, the PEG ratio and EV/EBITDA. Earnings yield converts the multiple into a return you can compare with bonds. PEG adjusts for growth. EV/EBITDA ignores capital structure differences. Together they cover most of what P/E misses on its own.
The PEG ratio divides P/E by the expected annual earnings growth rate in percent. A P/E of 30 with 30% expected growth gives a PEG of 1.0, which many investors read as fairly priced for its growth, while a P/E of 30 with 10% growth gives a PEG of 3.0, which looks stretched. PEG is popular because it is simple, but it inherits the weakness of the growth estimate you feed it.
| Metric | Formula | Use it when |
|---|---|---|
| Earnings yield | EPS / Price, or 1 / PE | You want to compare a stock with bonds or cash |
| PEG ratio | PE / expected growth % | Comparing companies growing at different speeds |
| EV/EBITDA | Enterprise value / EBITDA | Companies carry very different debt loads |
| Price to sales | Market cap / revenue | Earnings are negative or temporarily depressed |
| Free cash flow yield | Free cash flow / market cap | You distrust accounting earnings and want cash |
For cyclical sectors such as energy, steel and semiconductors, P/E can mislead in the opposite direction. At the peak of a cycle, earnings are huge and the P/E looks low, right before profits fall. At the bottom, earnings collapse and the P/E looks sky high just before the recovery. For those names, smoothing earnings over several years, as the CAPE ratio does with a 10-year average, gives a calmer read.
No single multiple works across every business, so the practical rule is to use P/E for steady earners, PEG for growers, EV/EBITDA for leveraged companies, and cash flow yield whenever you suspect the earnings are not the whole story.
What are the most common P/E ratio mistakes?
The biggest mistakes are comparing P/E across unrelated sectors, trusting a low P/E without checking why it is low, and ignoring negative or one-time earnings. A P/E is only meaningful between similar businesses at similar stages of growth, using clean earnings.
Pros
- Fast to calculate with two inputs you can find anywhere
- Easy to compare across similar companies in one sector
- Converts neatly to earnings yield for bond comparisons
- Works across decades, so history gives you context
Cons
- Distorted by one-time gains, write-downs and accounting choices
- Meaningless when earnings are zero or negative
- Ignores debt, cash and growth unless you add other metrics
- Cyclical companies look cheapest right before profits fall
- Confirm the EPS is diluted and covers the trailing 12 months
- Scan the income statement for one-time gains or write-offs
- Compare against 3 direct peers, not the whole market
- Check the 5-year P/E range for the same stock
- Look at earnings growth before calling a multiple cheap
- Cross-check with free cash flow yield
There is also a behavioral mistake worth naming. A low P/E feels like a discount, so we anchor on it. In my own notes, the trades I regret most were low-multiple stocks where I skipped the question of why the market was unwilling to pay more. The market is usually pricing in something, and your job is to find out what.
A P/E ratio is a clue about what the market thinks, and the investors who use it well treat every unusually low or high reading as a question to investigate rather than an answer.
How do you build your own P/E calculator in Google Sheets?
Use the GOOGLEFINANCE function: =GOOGLEFINANCE("NASDAQ:AAPL","pe") returns the trailing P/E and "eps" returns earnings per share. Then add a column for earnings yield with =1/B2. A one-sheet watchlist with 20 tickers takes about 10 minutes to set up and updates automatically.
Spreadsheet build, 5 steps
- 1
Set up the columns
In row 1 type Ticker, Price, EPS, P/E, Earnings yield, 5-year median P/E and Notes. Keep tickers in column A with the exchange prefix, such as NASDAQ:MSFT.
- 2
Pull price and EPS
In B2 use =GOOGLEFINANCE(A2,"price") and in C2 use =GOOGLEFINANCE(A2,"eps"). Fill both formulas down your watchlist.
- 3
Calculate P/E and yield
In D2 use =IF(C2>0,B2/C2,"N/A") so negative earnings return N/A instead of a misleading number. In E2 use =IF(C2>0,C2/B2,"N/A").
- 4
Add your own history
GOOGLEFINANCE does not return a clean 5-year median multiple, so paste it from a source you trust, and note the date you updated it.
- 5
Flag outliers
Use conditional formatting to shade any P/E more than 30% above its 5-year median in red and 30% below in green, then read the Notes column before acting.
If you want deeper data such as historical multiples and estimate revisions, platforms like Koyfin or TradingView supply them natively, but the spreadsheet keeps you honest about which inputs you are actually using. I keep both: the sheet for my own watchlist logic, and a charting platform for the history.
Data caveat
GOOGLEFINANCE data can lag real-time quotes and some tickers return blanks. Spot-check any number you are about to trade on against the company's latest filing.
A 10-minute Google Sheets calculator using GOOGLEFINANCE gives you a transparent, auto-updating P/E and earnings yield watchlist that you control end to end.
The verdict
Use a P/E ratio calculator as a fast first filter, not a final answer. Compute trailing and forward P/E, convert both to earnings yield, check them against the stock's own history and its closest peers, and then bring in PEG, EV/EBITDA or free cash flow to cover what P/E cannot see. Whenever earnings are negative, cyclical or inflated by a one-off, set P/E aside and lean on other measures.
What to do next: pick five stocks you already follow, calculate trailing and forward P/E for each, and write one sentence explaining why each multiple is where it is. That single exercise teaches more than reading ten articles about valuation, and it builds the habit of treating multiples as questions.
The P/E ratio remains one of the fastest valuation checks available because it needs only a price and earnings per share, but it earns trust only when you cross-check it with growth, cash flow and the company's own history.
Keep reading
Get smarter trades, weekly
One short email every Sunday. AI workflows, tool reviews, and trader productivity tips.
