Margin of Safety Calculator for Value Investing

Calculate the margin of safety, dollar discount, and estimated shares from intrinsic value, market price, and an intended investment amount.

Enter intrinsic value, market price, and an investment amount to calculate margin of safety, dollar discount, and estimated shares.

Margin of safety estimate
Enter per-share intrinsic value, market price, and dollars to invest to calculate discount and share count.

About margin of safety in value investing

A margin of safety calculator restates Benjamin Graham’s idea as a pair of numbers: how far the market price sits below your estimate of intrinsic value, in percent and in dollars per share. Margin of safety equals (intrinsic value − market price) ÷ intrinsic value × 100. Discount per share is the dollar gap. Estimated shares equal investment amount divided by market price, or an em dash if price is zero. If you value a share at $100 and it trades at $70, the margin of safety is 30% and the discount is $30.00. A $80 value versus a $60 price is a 25% margin and a $20.00 discount. Investing $1,000 at a $40 price buys 25 shares. A negative margin means the price is above your value estimate—you are paying a premium, not buying a discount. Intrinsic value is an opinion, not a quote. Discounted cash flow, asset values, and earnings power can all produce different estimates, and small changes in growth or discount rate swing the gap. The calculator does not value the business; it only measures the distance between the two prices you type. A 30% margin on a fragile model is not the same as a 30% margin on a conservative net-current-asset figure. Share count is a sizing helper, not a broker ticket. It ignores commissions, lot size, and whether you will scale in. Investment Amount can be 0 if you only need the percent and dollar discount. Keep intrinsic value, market price, and investment in the same currency. Fractional shares are allowed in the math; some brokers still require whole shares. Use the margin of safety calculator to screen a 30% discount, a $20 gap, or a 25-share ticket. Require a larger percent when the value estimate is uncertain, the balance sheet is levered, or the business is cyclical. Recalculate when the quote moves, and do not treat a high margin of safety as a guarantee against loss.

Margin of safety = (intrinsic value − market price) ÷ intrinsic value × 100; discount per share = intrinsic value − market price; shares = investment ÷ market price.

Margin of safety examples

These worked examples use the same discount and share-count formulas as the margin of safety calculator.

InputOutputNote
$100 intrinsic value; $70 market price30.00%A $30.00 per-share discount is a 30.00% margin of safety when estimated value is $100 and the quote is $70.
$80 intrinsic value; $60 market price$20.00Discount per share is $20.00; the percentage margin of safety is 25.00% on the $80 value estimate.
$50 intrinsic value; $40 market price; $1,000 investment25Margin of safety is 20.00% with a $10.00 discount; $1,000 at $40 buys 25 estimated shares.

How to calculate margin of safety

  1. Enter Estimated Intrinsic Value per Share from your own valuation work.
  2. Enter Current Market Price per Share from the quote you would actually pay.
  3. Enter Investment Amount if you also want an estimated share count, or 0 to skip sizing.
  4. Select Calculate to see margin of safety, dollar discount, and estimated shares.

Margin of safety calculator FAQ

Is margin of safety the same as a stock’s discount to 52-week high?

No. The percent is the gap versus your intrinsic-value estimate, not versus a past high. A cheap-looking quote against last year’s peak can still sit above a conservative value, which would show a negative margin of safety.

What margin of safety do value investors often look for?

Many practitioners talk about 20% to 50% depending on the quality of the business and the confidence in the model. The margin of safety calculator does not pick a hurdle; it only reports the gap you implied with the two prices.

How are estimated shares calculated?

Investment amount is divided by current market price. The figure can be fractional. If market price is 0, shares cannot be computed and the calculator shows an em dash.

Does a large margin of safety mean the stock is a buy?

Not by itself. The percent is only as good as the intrinsic value you entered. Errors in cash-flow assumptions, accounting, or share count can erase an apparent discount. Use the figure as a screen, then re-check the valuation.

Can margin of safety be negative?

Yes. If market price exceeds intrinsic value, the percent and the dollar discount are negative, which means you would be paying a premium to your own estimate rather than buying with a buffer.