What is a P/E ratio calculator?
The P/E ratio calculator works out the price-to-earnings ratio of a stock. The P/E ratio is the share price divided by the earnings per share, and it tells you how many rupees investors pay for each rupee of annual earnings. A P/E of 20 means the market pays ₹20 for every ₹1 the company earns in a year. It is the most quoted valuation number in the stock market.
This tool is for stock investors comparing companies, and for beginners learning what a share price actually means. It is also for anyone reading a stock tip and wanting to check whether the price is reasonable. A stock return calculator is the companion for measuring what a stock actually earned you over time.
The calculator takes the current share price and the earnings per share and turns them into the P/E ratio, the earnings yield, and a plain reading of the ratio. The main result is shown first, with the supporting figures underneath, so you can see both the headline number and the working behind it.
Everything runs in your browser. Nothing you type is uploaded to a server, stored, or shared with anyone. You can use the calculator as many times as you like without signing up, and closing the page leaves nothing behind, because nothing was ever saved in the first place.
How a P/E ratio calculator works
The formula is P/E equals share price divided by earnings per share. Earnings per share is the company's annual profit after tax, divided by the number of shares. The division cancels the units and leaves a pure number — the number of years of earnings the price represents, if earnings never grew.
Take the current share price from the market. Take the earnings per share, usually the trailing twelve months' figure from the company's results. Divide the price by the EPS to get the P/E ratio. Divide the EPS by the price and multiply by 100 to get the earnings yield, which is the same information expressed as a percentage return.
There is no hidden magic behind the boxes. The same formula is applied to whatever numbers you type, and the same inputs always give the same output. If you change one input, only the parts of the answer that depend on it will move, which makes it easy to test a what-if.
The results update the moment you change a number. There is no submit button to hunt for and no page to reload. That instant feedback is what makes a calculator useful: you can try three or four scenarios in a minute and see which one works best for you.
The earnings per share explained
Earnings per share is the input that decides everything, and it is the one people take from the wrong place. Use the trailing twelve months' EPS from the company's reported results, not a forecast and not a single good quarter annualised. A single quarter can be distorted by a one-time gain, and annualising it gives an EPS that never actually happened.
Check whether the EPS is standalone or consolidated, too. For a company with subsidiaries, the consolidated EPS reflects the whole group and is the right figure. Using standalone EPS for a group company understates or overstates the earnings, and the P/E that follows is wrong.
The page defaults use a share price of ₹500 and an EPS of ₹25. That gives a P/E ratio of 20.00 and an earnings yield of 5.0%, which is near the average for Indian markets.
The most common error with any calculator is a typing slip. A missing zero or an extra digit changes everything, so glance at your inputs before trusting the output. If a result looks surprising, re-enter the numbers one at a time and watch how each one moves the answer.
A worked example
Let us work through a real example with the page defaults, so you can check the maths yourself. With Share price ₹500, Earnings per share (EPS) ₹25,
Divide a share price of ₹500 by an EPS of ₹25 to get a P/E ratio of 20.00. Divide ₹25 by ₹500 and multiply by 100 to get an earnings yield of 5.0%. The reading is near average for Indian markets.
The calculator gives P/E ratio: 20.00; Earnings yield: 5.0%; Reading: Near average for Indian markets. A P/E of 20 means investors pay for 20 years of current earnings. That is only reasonable if earnings grow — at zero growth, it would take 20 years to earn back the price, which is why the P/E must always be read alongside growth.
Now try a second set of numbers and compare. With Share price ₹1,000, Earnings per share (EPS) ₹40, The result is P/E ratio: 25.00; Earnings yield: 4.0%; Reading: Near average for Indian markets. Changing the inputs this way is the fastest way to build a feel for how the tool behaves.
Why it matters
Investors use the P/E ratio to compare stocks in the same sector. Two banks with similar businesses should trade at similar P/E ratios, so one trading at 12 while the other trades at 25 deserves a closer look — either it is cheaper, or the market knows something is wrong.
It is also used to judge the whole market. When the Nifty trades at a P/E far above its long-term average, the market is expensive by history, and when it trades below, it is cheap. A dividend calculator helps alongside, since a stock's total return is price gain plus dividend, not price gain alone.
Value investors use it as a first filter. They look for companies with low P/E ratios and then check whether the low price is justified by the business or is a genuine bargain. A CAGR calculator shows how fast the company's earnings have actually grown, which is the missing half of the P/E story.
Small differences in rounding can make the last rupee or the last decimal differ slightly from another calculator. That is normal. What matters is the size of the number and the direction it points in, not whether the final digit matches to the paisa.
P/E ratio calculator vs EPS calculator
The P/E ratio calculator and the EPS calculator are two halves of the same calculation. EPS is the earnings per share — the company's profit divided by its shares. The P/E ratio takes that EPS and divides the share price by it. One produces the earnings figure, the other prices it.
Use the EPS calculator when you have the company's profit and share count and want the per-share earnings. Use the P/E calculator when you have the EPS and the share price and want to know whether the price is reasonable. Most investors run both in sequence.
Neither tool is better in general; they answer different questions. Use this calculator when you have the EPS and the share price and want the valuation, and use the other when you have the company's profit and shares and want the EPS. Many people run both and compare the answers before deciding.
This calculator is free to use, with no account and no limit on how often you run it. That matters when you are comparing options, because a real comparison takes several runs: the same figures with a different rate, a different tenure, or a different starting point.
Common mistakes
The first mistake is comparing P/E ratios across sectors. A bank at a P/E of 12 and a software company at 40 are not comparable — the sectors grow at different rates and carry different risks. Compare only within the same sector.
The second mistake is using a single quarter's EPS. A one-time gain or loss can distort a quarter badly. Use the trailing twelve months' EPS, which smooths out the noise.
The third mistake is treating a low P/E as a bargain. A low P/E can mean the market expects earnings to fall, or the business is in decline. A cheap stock can get cheaper, so always check why the ratio is low.
The most common error with any calculator is a typing slip. A missing zero or an extra digit changes everything, so glance at your inputs before trusting the output. If a result looks surprising, re-enter the numbers one at a time and watch how each one moves the answer.
How to use this P/E ratio calculator
Enter the current share price and the earnings per share from the trailing twelve months. The P/E ratio, the earnings yield, and a plain reading appear instantly. Try a higher EPS to see how much earnings growth would be needed to justify the current price.
The results appear as soon as the numbers are in. If you want to compare two options, note the first result down, change the inputs, and compare. There is no history saved, so a pen and paper, or a screenshot, is the way to keep a comparison.
Everything runs in your browser. Nothing you type is uploaded to a server, stored, or shared with anyone. You can use the calculator as many times as you like without signing up, and closing the page leaves nothing behind, because nothing was ever saved in the first place.
P/E ratios must be compared within the same sector. A low P/E can signal a bargain or a business in decline — always check the earnings quality and growth before deciding.