🧰 UtlKit

P/E Ratio Calculator: How to Calculate the P/E and P/B Ratios, the Fair Value From Two Industry Averages, and the Margin of Safety Before You Buy a Stock

Compute the P/E ratio, the P/B ratio, and the fair value from two industry averages in the browser: a price of 150 on EPS of 5 is a 30 times P/E against an 18 times industry, a 1.88 times P/B against 2.5, a market cap of 150.00 million from one million shares, fair values of 90 and 200 averaging 145, a plus 66.7 percent earnings premium, a minus 25.0 percent book discount, and an overvalued verdict at minus 3.4 percent.

Valuing a stock from its price is one division away: the price divided by the earnings per share, and the price divided by the book value per share, are the two ratios every quote screen prints next to the last trade. At the defaults of the tool in question, a price of 150 on earnings of 5 is a 30 times P/E, and the same price against book value of 80 is a 1.88 times P/B. The P/E P/B Valuation tool runs in the browser and uploads nothing: the current price, the earnings per share, the book value per share, the shares outstanding, and two industry averages go in, and the page returns the P/E, the P/B, the market cap, a fair value built from two references, and a verdict. The position numbers never leave the tab.

This post walks the six numbers a real buy decision needs, in order: the 30 times P/E and the 1.88 times P/B from the six inputs, the 150.00 million market cap behind them, the plus 66.7 percent earnings premium and the minus 25.0 percent book discount against the industry, the fair value of 145 and the overvalued verdict at minus 3.4 percent, and how that verdict becomes a position with a size and an entry plan.

What the P/E Actually Measures: one division, two lenses

The P/E ratio divides the price by the earnings per share. At the defaults, 150 divided by 5 is 30, which the card prints as 30.00x. Read it as the earnings multiple: you pay 30 dollars of price for every 1 dollar of annual earnings. The P/B divides the same price by the book value per share: 150 divided by 80 is 1.875, printed as 1.88x, so the market pays 1.88 for every dollar of net assets on the balance sheet. The two numbers share the price in the numerator and put a different anchor in the denominator, which is why they can say two different things about the same stock.

The division also sets its own guard. When the earnings per share is zero or negative, the tool prints 0 instead of a multiple, because a negative P/E has no ordering: a stock at 150 on negative earnings of 5 does not trade at a discount of minus 30 times, it simply has no earnings multiple that day. The P/B still works on book value, and that is the second lens for exactly the companies the first lens drops.

Six Inputs, Three Headline Numbers

The six inputs are the current price, the earnings per share, the book value per share, the shares outstanding, the industry average P/E, and the industry average P/B. The first three produce the ratios; the shares outstanding produce the market cap, which is price times shares: 150 times 1,000,000 is 150.00 million on the gray card. The Market Cap Calculator does that one multiplication across a full scale from millions to trillions, so the same price on a billion-share company reads as 150.00 billion instead of 150.00 million, and the ratio you are comparing against the industry is the ratio of the same company, not a slice of it.

The two ratio cards carry the industry averages under them: 18x under the P/E and 2.5x under the P/B, so the comparison sits on the card, not in a note. The reset button returns all six inputs to the defaults and clears the result, which is the way to check that a number you typed and a number you forgot did not mix. The market cap card is the only one with no industry line, because scale is not a quality question and does not get a premium column.

The Premium Table: plus 66.7 percent on earnings, minus 25.0 percent on book

The premium column subtracts the industry average from the stock ratio and divides by the industry average. The P/E row: 30 against 18 is (30 minus 18) over 18, plus 66.7 percent, printed in red, the stock trades two thirds above the sector multiple. The P/B row: 1.875 against 2.5 is (1.875 minus 2.5) over 2.5, minus 25.0 percent, printed in green, the stock trades a quarter below the sector multiple. One stock, two verdicts, because the two ratios price two different claims on the same balance sheet.

The P/E premium is the market charging you for earnings power: brand, pricing, growth. The P/B discount is the market discounting the book: the assets on the balance sheet are not where the value sits. Which one to trust depends on where the value sits, and the P/E line has one more knob for growth. The P/E & PEG Ratio Calculator divides the P/E by the earnings growth rate to get the PEG: at a 30 times P/E with a 15 percent growth, the PEG is 2, the price paid per point of growth, and two companies at the same 30 times P/E rank differently the moment their growths differ. The CAGR Calculator is where the growth rate itself comes from: take the earnings of year zero and year n, raise their ratio to one over n, and the annual growth is a number you can plug in instead of a quote from a research note.

Fair Value: two references, one average, one verdict

The fair value banner is the average of two reconstructed prices. The earnings reference multiplies the earnings per share by the industry P/E: 5 times 18 is 90, what the stock would be worth if it traded at the sector multiple. The book reference multiplies the book value per share by the industry P/B: 80 times 2.5 is 200, what it would be worth at the sector book multiple. The average is (90 plus 200) over 2, which is 145.00 on the banner, the one number the verdict is made against.

The verdict compares the price to that average: at 150 against 145, the price sits above, the banner turns red, and the line under it reads overvalued at minus 3.4 percent, the margin of safety as a number: (145 minus 150) over 145. Move the price to 130 and the banner turns green, undervalued at plus 10.4 percent, because (145 minus 130) over 145 is 10.34. The Margin of Safety Calculator does that last division as a standalone: given the value and the price, it returns the cushion or the gap as a percent, so the verdict on this page and the position rule in your notes use the same definition of safe.

When the Two Ratios Disagree

At the defaults they disagree on purpose: the stock earns a plus 66.7 percent premium on earnings and a minus 25.0 percent discount on book. That is not a bug, it is the shape of an earnings-heavy, asset-light company, the business that owns little but its income stream. A bank runs the opposite shape, ordinary on the earnings and cheap on the book. Reading one ratio alone is reading half the stock, and the direction of the disagreement is information: a premium on both says the market pays up for everything, a discount on both says the market pays for nothing, and a split says the market is paying for the income and not for the assets behind it.

The disagreement also has a third number that settles part of it. The EV/EBITDA Valuation tool prices the company on earnings before interest, taxes, depreciation, and amortization, against a market value that includes the debt, which moves the anchor away from both the share price and the balance sheet book. A stock that looks expensive on the P/E because the earnings are depressed by one-off charges can look ordinary on the EBITDA multiple, and vice versa. The two-lens verdict on this page is the fast screen, and the third multiple is the check for the day the screen says buy and the notes say wait.

From a Verdict to a Position

The verdict is pre-cost and pre-time: it says where the price sits against a value built from two industry averages, not where the price will sit in a quarter. The position math starts after the buy. The Stock Profit/Loss Calculator takes the entry, the share count, and an exit price, and returns the dollars and the percent of the stake, so the 150 entry has a number attached to the 145 line the tool just drew: at 1,000 shares, a close at 145 is a loss of 500, the same minus 3.4 percent the banner already printed, now in dollars.

When the verdict is overvalued, the plan is not a pass, it is a pace. The Dollar-Cost Averaging Calculator spreads the stake over fixed intervals and returns the average entry the plan actually produces, so a position in a 150 stock that the tool values at 145 can be built in slices whose average the math will defend. Read the output in the order the decision runs: the ratios are the screen, the premium table is the reason, the fair value is the line, the verdict is the percent to the line, and the position tools are the price of standing there. Every number was computed in the tab that holds the decision, and none of it was sent anywhere. The calculator does not buy the stock; it makes the stock a number you can refuse.

Related Tools

Frequently Asked Questions

Does the P/E P/B Valuation tool upload my stock data to a server?

No. Every figure is computed inside the browser tab from the six inputs on the page: the P/E, the P/B, the market cap, the fair value, and the verdict are local arithmetic. Nothing leaves the tab, which makes it the right fit for the holdings you would not paste into a third-party service.

How is the P/E computed, and what happens when the earnings per share is zero or negative?

Price divided by the earnings per share: at the defaults, 150 over 5 is 30, printed as 30.00x on the card. When the earnings per share is zero or negative, the tool prints 0 instead of a multiple, because a negative P/E has no ordering: a stock at 150 on negative earnings of 5 does not trade at minus 30 times, it simply has no earnings multiple that day. The P/B still works on the book value, and it is the lens that picks up exactly the companies the P/E drops.

How is the fair value of 145 built from the two industry averages?

Two reconstructed prices, averaged. The earnings reference multiplies the earnings per share by the industry P/E: 5 times 18 is 90. The book reference multiplies the book value per share by the industry P/B: 80 times 2.5 is 200. The average is (90 plus 200) over 2, which is 145.00 on the banner. The verdict compares the price to that number: at 150 against 145 the banner reads overvalued at minus 3.4 percent, and at 130 it turns green and reads undervalued at plus 10.4 percent.

Why does the stock trade at a plus 66.7 percent P/E premium but a minus 25.0 percent P/B discount at the same time?

Because the two ratios price two different claims on the same balance sheet. The P/E premium is the market charging for earnings power, brand, pricing, growth; the P/B discount is the market discounting the book, saying the assets on the balance sheet are not where the value sits. At the defaults, 30 against an 18 industry P/E is two thirds above, and 1.875 against a 2.5 industry P/B is a quarter below. That split is the shape of an earnings-heavy, asset-light company, not a bug: a bank runs the opposite shape, and a premium on both sides would say the market pays up for everything.

Does the fair value include growth, debt, or buybacks?

No. It is built from the two industry multiples applied to this earnings and this balance sheet, a snapshot before cost and before time. Growth is a separate knob, the PEG Ratio calculator divides the P/E by the growth rate, at 30 times P/E and 15 percent growth the PEG is 2. Debt moves the anchor to the EV/EBITDA valuation, which prices earnings before interest, taxes, depreciation, and amortization against a market value that includes the debt. Read the verdict as the pre-cost, pre-time number.

Related Articles