The price-to-earnings ratio — almost always shortened to the P/E ratio — is the single most cited number on a stock quote. It tells you how much investors are willing to pay for every dollar of a company's annual earnings. A stock trading at a P/E of 25 means buyers are paying $25 today for $1 of earnings per year. That single comparison is the quickest way to sense whether a share looks cheap, expensive, or roughly fair relative to its profits.
This calculator computes four related figures at once: the trailing P/E from the last twelve months of earnings, the forward P/E from next year's estimated earnings, the earnings yield (the P/E flipped upside down), and the PEG ratio that adjusts the P/E for growth. Enter a share price and earnings per share and every figure updates instantly, so you can compare two companies or stress-test your own assumptions.
How to Use
- Type the Current Share Price — the latest traded price per share. This is the "price" half of the ratio.
- Enter EPS (Last 12 Months) — trailing earnings per share pulled from the most recent four quarters. This is the "earnings" half.
- Optionally add Forward EPS (Next Year Est.) — the consensus analyst estimate for the coming twelve months. Leaving it blank simply hides the forward P/E line.
- Optionally set Expected EPS Growth Rate — the annual growth rate you expect earnings to compound. The calculator uses it to derive the PEG ratio.
- Read the result card: the Trailing P/E (TTM) is highlighted as the headline number, followed by the forward P/E, earnings yield, and PEG ratio.
A low P/E can signal a value stock, but it can also signal a business in decline. A high P/E can signal overvaluation, but it can also signal a fast grower the market expects to keep compounding. The trailing, forward, and PEG figures are designed to be read together rather than judged in isolation.
The P/E Formula
The ratio is about as simple as valuation math gets:
P/E = Share Price ÷ Earnings Per Share
Where:
- Share Price is the current market price for one share of common stock.
- Earnings Per Share (EPS) is net income attributable to common shareholders divided by the weighted-average number of shares outstanding.
Worked example on a stock trading at $150 with trailing EPS of $6: the trailing P/E is 150 ÷ 6 = 25.0. If next year's estimated EPS is $7.50, the forward P/E is 150 ÷ 7.5 = 20.0. Because earnings are expected to grow, the forward multiple sits below the trailing multiple — exactly the pattern you want to see in a healthy grower.
The earnings yield is the same information rearranged: EPS ÷ Price × 100. On the numbers above that is 6 ÷ 150 × 100 = 4.0%. The earnings yield makes P/E comparable to bond yields and dividend yields: a 4.0% earnings yield, for instance, is easy to stack against a 4.5% risk-free rate.
The PEG ratio adjusts P/E for growth: P/E ÷ Expected Annual EPS Growth. On a P/E of 25 with 12% expected growth, PEG is 25 ÷ 12 = 2.08. Peter Lynch popularized the rule that a fairly valued growth stock trades at a PEG near 1.0 — below 1 looks cheap, above 2 looks priced for perfection.
A caution on zero or negative earnings: if EPS is zero or negative, the division produces an error or a meaningless ratio. A company losing money has no P/E in the traditional sense, which is why this calculator rejects non-positive EPS and tells you so rather than printing a nonsense number.
Examples
Example 1 — The textbook grower. A tech share trades at $150, earned $6.00 per share over the last year, and is forecast to earn $7.50 next year on a 12% growth path. The trailing P/E is 25.0, the forward P/E is 20.0, the earnings yield is 4.0%, and the PEG is 2.08. The forward multiple below the trailing multiple tells you earnings are catching up to the price, but a PEG above 2 says the market has already priced in a lot of that growth.
Example 2 — A deep-value candidate. A mature industrial trades at $300 with trailing EPS of $12 and forward EPS of $15 on a more modest 8% growth rate. Trailing P/E is 25.0, forward P/E is 20.0, earnings yield is 4.0%, and the PEG works out to 3.12. The same headline P/E as Example 1, but the slower growth pushes the PEG higher — a reminder that P/E alone cannot tell you whether the price is justified.
Example 3 — A very high-priced share. Berkshire-style shares can trade near $1,000,000 with EPS around $40,000. Trailing P/E is 1,000,000 ÷ 40,000 = 25.0, and with forward EPS of $44,000 the forward P/E is 22.73, earnings yield 4.0%, and PEG 2.50. The absolute dollar price looks enormous, but the ratio — what you actually pay per dollar of earnings — is ordinary. Always read the multiple, not the sticker price.
FAQ
What is a good P/E ratio?
There is no universal "good" number. A reasonable P/E depends on the industry, growth expectations, and interest rates. A utility might trade at 12–16 times earnings, while a fast-growing software company might trade at 30–40 times. Compare a stock's P/E to its own five-year average and to its direct peers rather than to a single magic threshold.
What is the difference between trailing and forward P/E?
Trailing P/E uses actual earnings from the last twelve months (TTM). Forward P/E uses analyst-estimated earnings for the next twelve months. When forward P/E is lower than trailing P/E, the market expects earnings to grow; when it is higher, earnings are expected to slow or decline.
Why does my P/E show an error when EPS is zero or negative?
A P/E ratio is only meaningful when a company is profitable. If EPS is zero, dividing by zero is undefined. If EPS is negative, the company is losing money, and a negative P/E does not represent a valuation multiple — it means the "E" is absent. Such companies are better valued with price-to-sales, enterprise-value-to-EBITDA, or discounted-cash-flow methods.
What is the earnings yield?
The earnings yield is earnings per share divided by share price, expressed as a percentage: EPS ÷ Price × 100. It is the inverse of the P/E ratio. It is useful because it can be compared directly to bond yields, interest rates, and dividend yields that are also quoted as percentages.
What is a PEG ratio and is 1.0 fair value?
The PEG ratio is the P/E ratio divided by the expected annual EPS growth rate. Popularized by investor Peter Lynch, the rule of thumb is that a PEG around 1.0 means the stock's growth fairly justifies its P/E, below 1.0 suggests possible undervaluation, and above 2.0 suggests expectations are running high. It is only as good as the growth estimate you feed it.
Does a high P/E always mean a stock is overvalued?
No. A high P/E often reflects strong expected growth — investors pay up now because they expect earnings to rise and pull the multiple down over time. Conversely, a low P/E can trap investors in "value" stocks whose earnings are about to collapse. Always read the trailing and forward P/E together with the PEG and the industry average.
Disclaimer
This P/E ratio calculator is provided for informational purposes only and does not constitute investment, financial, tax, or accounting advice. The ratios it produces are mechanical calculations based on the price and earnings-per-share figures you enter; they do not account for debt, cash, one-time charges, dilution, or industry differences. Analyst forward EPS and growth inputs are estimates and may prove wrong. Never make an investment decision based solely on this calculator — conduct your own research or consult a licensed financial advisor before buying or selling any security.