Skip to main content

    Value investing calculator

    Margin of Safety Calculator

    This margin of safety calculator shows how far a stock's price sits below your own estimate of what a share is worth, as a percentage of that estimate. Set a target margin to get the buy-below price, the most you would pay, plus buy prices at margins of 10-50%. Enter a ticker to fill in its most recent close.

    Free to use. No account or sign-up needed.

    Your numbers

    Fills in the stock's most recent close and its date. Your value estimate and target stay as you set them.

    What you think one share is worth, from your own DCF, dividend model or other method.

    The price you could buy at now.

    The discount to your estimate you want before you buy.

    Enter both amounts per share, in the same currency.

    Results

    ResultValue
    Margin of safety20.00%
    Buy-below price at your 25% target$75.00
    Upside to your estimate+25.00%

    A price of $80.00 against your $100.00 estimate gives a margin of safety of 20.00%. Your 25% target calls for a price of $75.00 or less, so the price would need to fall 6.25% to reach it.

    Buy prices by margin

    MarginBuy belowUpside to estimateChange from price
    10%$90.00+11.11%+12.50%
    20%$80.00+25.00%0.00%
    30%$70.00+42.86%-12.50%
    40%$60.00+66.67%-25.00%
    50%$50.00+100.00%-37.50%

    Each row is the most you would pay for that margin of safety. Upside is the gain from that price to your estimate, and the change compares it with the share price you entered.

    Margin of safety formula

    The margin of safety formula compares a stock's price with your own estimate of what it is worth: margin of safety = (estimated value - price) / estimated value. Multiply the result by 100 to read it as a percentage. A stock you value at $60 that trades at $45 has a 25% margin of safety.

    To find the most you would pay, turn the formula around: multiply your estimate by 1 minus the margin you want. With a $60 estimate and a 30% target, the buy-below price is $42.

    The margin is measured against your estimate, so it can never go above 100%. A price above your estimate gives a negative margin: there is no cushion, and the price already assumes more than your estimate does.

    A worked example

    Say your own research puts a stock's value at $100.00 a share, and it trades at $80.00. The price is $20.00 below your estimate, and $20.00 divided by $100.00 gives a margin of safety of 20.00%.

    For a target margin of 25%, multiply the estimate by 0.75, which is 1 minus 25%. That gives a buy-below price of $75.00, so at $80.00 the price would need to fall 6.25% to reach it.

    If the price later rose from $80.00 to your $100.00 estimate, the gain would be 25.00%. Upside comes out larger than the margin of safety because it is measured against the lower price.

    Now say the price is $110.00. The margin of safety turns negative at -10.00%: you would pay more than your estimate, and the $75.00 buy-below price sits 31.82% under that price.

    Choosing a target

    The idea comes from Benjamin Graham, who called the margin of safety the central concept of investment in The Intelligent Investor. Every value estimate rests on guesses about growth, profit margins and risk, and the margin is the room left for those guesses to be wrong.

    There is no fixed rule. As common rules of thumb, many value investors look for about 20-30% on large, steady businesses they know well, and 40-50% on small, cyclical or hard-to-value companies, where an estimate is more likely to miss.

    A bigger margin also means more upside if your estimate is right. Bought at a 20% margin of safety, a stock gains 25% if it rises to your estimate. At a 50% margin it would have to double to get there, a 100% gain.

    Your value estimate

    The value estimate is always your own number, and the calculator never supplies one. Common ways to reach one are a discounted cash flow model, a dividend discount model for steady dividend payers, a multiple of earnings or free cash flow you think is reasonable, or the Graham number for defensive stocks.

    Start from cautious inputs. A margin of safety on top of a hopeful estimate protects less than its size suggests, so many investors use modest growth and a higher discount rate before they apply the margin.

    To build an estimate from cash flows, use the DCF calculator.

    For a steady dividend payer, try the dividend discount model calculator.

    In accounting

    In accounting, the margin of safety measures how far sales can fall before a business reaches its break-even point: (actual sales - break-even sales) / actual sales. A company with $2,000,000 of sales and a $1,500,000 break-even point has a 25% margin of safety, or $500,000 of sales to spare.

    The break-even point is fixed costs divided by the contribution margin ratio, the share of each sales dollar left after variable costs. The idea matches the investing version: the cushion between where things stand and the point where the numbers stop working. This calculator is set up for share prices.

    What the calculator assumes

    • Your value estimate and the price are per share, in the same currency.
    • The margin of safety is measured against your value estimate, and upside against the price.
    • The ticker fill brings in the stock's most recent close and its date, not a live quote. You can type any other price.
    • The fill changes only the price. Your value estimate and target stay as you set them.
    • Taxes, trading costs and dividends are left out.
    • A margin of safety leaves room for error in an estimate. It does not make the estimate right.

    Margin of safety calculator FAQ

    What is margin of safety?

    In investing, it is how far a stock's price sits below your estimate of its value, as a percentage of that estimate. Paying $75 for a stock you think is worth $100 gives a 25% margin of safety, room for your estimate to be wrong.

    What is the margin of safety formula?

    Margin of safety = (estimated value - price) / estimated value. Multiply by 100 for a percentage. A stock you value at $50 that trades at $40 has (50 - 40) / 50 = 20%. A price above your estimate gives a negative margin.

    How do you calculate a buy price with a margin of safety?

    Multiply your value estimate by 1 minus the margin you want. For a 30% margin on a stock you value at $100, the buy-below price is $70, since $100 multiplied by 0.7 is $70. The calculator also lists buy prices at margins of 10-50%.

    What is a good margin of safety?

    There is no single rule. As rules of thumb, many value investors want about 20-30% on steady businesses they understand well, and 40-50% on small, cyclical or hard-to-value companies, where an estimate is more likely to be wrong.

    What does a negative margin of safety mean?

    The price is above your value estimate, so you would pay more than you think the stock is worth. At $110 against a $100 estimate the margin is -10%, and the true value would have to be at least 10% above your estimate for that price to be fair.

    Is margin of safety the same as upside?

    No. The margin is measured against your value estimate and upside against the price. A stock you value at $100 that trades at $50 has a 50% margin of safety, and it would gain 100% if it rose to your estimate.

    What is the margin of safety in accounting?

    It is how far sales can fall before a business breaks even: (actual sales - break-even sales) / actual sales. With $500,000 of sales and a $400,000 break-even point, the margin of safety is 20%, or $100,000 of sales.

    Is this margin of safety calculator free?

    Yes. It runs in your browser with no account and no sign-up. A free GNG account adds the Research Terminal stock screener and My Watchlists, where you can follow the stocks you plan to buy.

    Screen stocks and keep watchlists of the companies you want to buy with a free GNG account.

    Sign Up Free

    This calculator is for education and is not investment advice. Results depend on the numbers you enter, and the value estimate is always your own. Read our disclosures.