P/E Ratio Calculator
Divide a share price by its earnings per share to get the P/E ratio, refusing zero and negative earnings where it is undefined.
What this calculator does
The price-to-earnings ratio compares what a share costs with the profit attributable to it. This page divides the price by EPS.
The result is printed as the price-to-earnings ratio.
How to use it
Enter the price per share and the earnings per share, then press Run.
The inputs are:
- Price per share (starts at 40)
- Earnings per share (starts at 2)
Worked example
Input: 40.00 share price and 2.00 EPS.
Output: P/E ratio = 20.00.
Assumptions and rounding
Price and EPS are per share and use the same period and currency. The ratio prints to two decimal places; no growth, payout or risk adjustment is implied.
What it refuses
A zero or negative EPS is refused because the ratio has no meaningful value there, and a zero or negative price is refused.
Why it runs in your browser
The arithmetic happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.
The price-to-earnings ratio compares what a share costs with the profit attributable to it. This page divides the price by EPS.
Price and EPS are per share and use the same period and currency. The ratio prints to two decimal places; no growth, payout or risk adjustment is implied.
What the result means
A higher P/E means the market is paying more for each unit of current earnings. It is not a valuation verdict, and it is undefined for a loss-making company.
How to use this calculator
Enter the price per share and the earnings per share, then press Run.
Assumptions, rate basis and rounding
Price and EPS are per share and use the same period and currency. The ratio prints to two decimal places; no growth, payout or risk adjustment is implied.
What to Expect
Best for
- Compare the earnings multiple of two profitable companies.
- Checking a quoted number before you act on it.
Not ideal for
- It does not model growth, one-off items, different accounting policies or negative earnings.
- Decisions that need tax, legal or investment advice.
What this tool keeps
- The price and the earnings per share.
- The result is shown immediately; nothing is saved.
What may need cleanup
- Nothing: every run reads the fields fresh.
- Amounts must use one currency; no conversion is done.
Common errors
- A zero or negative EPS is refused because the ratio has no meaningful value there, and a zero or negative price is refused.
- Entering a percentage as a decimal (0.06 instead of 6).
Example use cases
- Compare the earnings multiple of two profitable companies.
- Comparing two scenarios by changing one input at a time.
Sample input
40.00 share price and 2.00 EPS.
Sample output
P/E ratio = 20.00.
Who this is for
- Students and analysts checking a formula.
- Small-business owners and anyone comparing a quoted rate.
Frequently asked questions
What rate basis does this calculator use?
Price and EPS are per share and use the same period and currency. The ratio prints to two decimal places; no growth, payout or risk adjustment is implied.
What input does it refuse?
A zero or negative EPS is refused because the ratio has no meaningful value there, and a zero or negative price is refused.
Why does a loss-making company have no P/E?
Dividing by a negative EPS would produce a negative multiple that is not comparable with a positive one, so the page refuses.
Is this financial advice?
No. It is an arithmetic tool that applies the formula it states to the numbers you enter. It does not know your circumstances and does not recommend a product, a security or a course of action.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.