The margin of safety formula

The margin of safety formula is (intrinsic value minus market price) divided by intrinsic value. At an intrinsic value estimate of 100 per share and a market price of 70, the margin of safety is (100 − 70) / 100, or 30 percent. The denominator is intrinsic value, not price. That single choice is what makes the output a measure of downside protection rather than a measure of expected return.

Written out, how to calculate margin of safety comes down to three quantities and one division:

Margin of Safety (%) = (Intrinsic Value − Market Price) / Intrinsic Value
Margin of safety

The discount of market price to estimated intrinsic value, expressed as a fraction of intrinsic value. It answers a specific question: how far can the estimate prove wrong before the purchase stops preserving capital.

The reason the denominator matters is that it fixes what the percentage is protecting. Dividing by intrinsic value expresses the gap as a share of what the business is worth, which is the quantity exposed to loss if the estimate turns out to be optimistic. Dividing by price instead would express the same gap as a share of what you are paying, which answers a different question entirely. The margin of safety formula is deliberately anchored to value, and keeping that anchor is the difference between a downside measure and a return forecast. The concept behind the discount, and how wide it should be for different kinds of businesses, is covered in the [operational definition of margin of safety](https://investviable.com/blog/margin-of-safety-operational-definition); this article stays on the arithmetic.

A worked example, step by step

A single intrinsic value figure is rarely honest, so the disciplined version of the calculation runs against a range. Suppose the primary filings support a bear-case intrinsic value of 90 per share, a base case of 110, and a bull case of 130. The stock trades at 70. The margin of safety calculation is not run against the base case. It is run against the bear case, the value that must hold for capital to survive if the assumptions prove optimistic.

Where the margin sits between price and value

The margin is measured as a share of intrinsic value; the same gap measured against price is a different, larger number.

A horizontal scale showing a market price of 70 below a bear-case intrinsic value of 90, with the 20-point gap labeled as a 22 percent margin of safety when divided by value and a 29 percent upside when divided by price
Illustrative. The margin of safety is the gap between price and intrinsic value expressed as a share of intrinsic value. The same gap expressed as a share of price is the upside, and it is always the larger figure.

Running the arithmetic on the bear case: (90 − 70) / 90 = 0.222, a margin of safety of about 22 percent. Against the base case of 110, the same 70 price would show (110 − 70) / 110, or 36 percent, and against the bull case it would look wider still. The three results describe the same stock at the same price. The disciplined figure is the smallest one, because it is the only one that survives a bad outcome. Building the bear-to-bull span itself is a separate skill, covered in [valuation ranges and fundamental analysis frameworks](https://investviable.com/blog/valuation-ranges-fundamental-analysis-frameworks); the point here is that the margin you report should name which case it was computed against.

Margin of safety is not the same as upside

The most common error in the calculation is not a mistake in the subtraction. It is dividing by the wrong number. Margin of safety divides the price-to-value gap by intrinsic value. Upside, or discount-to-fair-value stated as potential return, divides the same gap by price. The two describe the same distance from opposite ends, and they are never equal.

The relationship is exact. If the margin of safety is m, the corresponding upside is m divided by (1 − m). A 30 percent margin of safety is a 30 / 0.70 = 42.9 percent upside. A 50 percent margin is a full 100 percent upside. The wider the margin, the larger the gap between the two figures, which is precisely when confusing them does the most damage. An investor who computes the upside, calls it the margin, and compares it to a 30 percent threshold is clearing a bar that is far lower than the one they think they set.

A margin of safety and its matching upside are different numbers

Values follow from the identity upside = m / (1 − m), where m is the margin of safety.

Paired bars comparing margin of safety to its corresponding upside at five levels: 10 percent margin equals 11 percent upside, 20 percent equals 25 percent, 30 percent equals 43 percent, 40 percent equals 67 percent, and 50 percent equals 100 percent upside
Values follow from the identity upside = m / (1 − m). The gap between the two figures widens as the margin grows, which is when mislabeling one as the other is most costly.

Keeping the two apart is easier when the terms are used precisely, which is the subject of [stock market price versus value](https://investviable.com/blog/stock-market-price-vs-value). For the margin of safety calculation, the rule is short: the denominator is always intrinsic value.

From a required discount to a maximum purchase price

Most of the time the practical question runs the other way. You do not have a price and want the margin; you have a required margin and want to know the highest price you can pay. Invert the formula:

Maximum Purchase Price = Intrinsic Value × (1 − Required Margin of Safety)

If your bear-case intrinsic value is 90 and you require a 30 percent margin, the maximum acceptable price is 90 × (1 − 0.30) = 63. At any price above 63 the required discount does not exist and the purchase does not clear your own rule. The two arithmetic errors that break this step are predictable. The first is subtracting the discount from the price rather than from the value, which anchors the ceiling to the quote you were trying to judge. The second is applying the discount to the base case, which quietly halves the protection, because the cushion then only works if the base case is right.

The maximum purchase price is only as sound as the intrinsic value that feeds it, so the estimate deserves the real effort. Discounted cash flow is the usual route, and the mechanics of building one are in the [stock valuation methods and DCF guide](https://investviable.com/blog/stock-valuation-methods-dcf-guide). The [InvestViable Valuator](https://investviable.com/valuator) estimates intrinsic value with a discounted cash flow model built from three explicit, user-controlled inputs: a cash-flow growth path, a discount rate, and a terminal growth rate. It produces the intrinsic value figure; the margin of safety arithmetic above is the step you run on top of that output to reach a price ceiling.

Calculating the current margin of safety on a stock you hold

The same formula measures the margin that exists right now on a stock already on your watchlist or in the portfolio. Substitute the live quote for the market price and read the result:

Current Margin of Safety = (Intrinsic Value − Current Price) / Intrinsic Value

At an intrinsic value estimate of 100 and a current price of 115, the calculation returns (100 − 115) / 100 = −0.15, a margin of safety of negative 15 percent. A negative result is not an error in the arithmetic. It records that the market price sits above your estimate, so the stock trades at a 15 percent premium to what you think it is worth, and no discount is available at today's quote. This is a reading, not an instruction. The margin of safety is an entry measure. It governs the price at which a position is worth starting. It says nothing about whether to hold or exit a position already owned, a distinction developed in the [operational definition of margin of safety](https://investviable.com/blog/margin-of-safety-operational-definition). Recomputing the current margin is useful mainly for deciding whether to add, not for deciding whether to sell.

Three ways the calculation goes wrong

The subtraction is trivial. The errors live in the inputs and the denominator, and three of them recur often enough to name.

  1. Dividing by price instead of intrinsic value. This is the upside-versus-margin confusion in its arithmetic form. It always produces a larger number than the true margin, so it flatters every candidate and is the most dangerous of the three. Anchor the denominator to intrinsic value and the error disappears.
  2. Running the formula against a single point estimate. A lone intrinsic value figure hides the uncertainty that the margin is meant to absorb. Compute the margin against the bear case of a range, and state which case you used, so the number carries its own context.
  3. Trusting a borrowed or stale intrinsic value. The formula is arithmetic, so it will return a clean percentage from any number you feed it, including a figure copied from elsewhere or left unrevised after the last filing. A precise margin computed on a weak estimate is still a weak margin. Damodaran's teaching materials on intrinsic valuation and the CFA Institute Research Foundation equity-valuation literature are useful references for pressure-testing the estimate before the margin is computed.

Where the number fits

The calculation is one step in a sequence, and it is not the first. Estimate intrinsic value as a bear-to-bull range from primary filings. Set a required discount calibrated to how predictable the business is, which the operational definition of margin of safety treats in depth, rather than defaulting to a single number. Convert the bear-case estimate and that threshold into a maximum acceptable price with the inverted formula. Compare that ceiling to the live quote and decide whether the market is offering the discount. The idea that the discount belongs to the price of entry traces back to Graham. Buffett extended it across the Berkshire Hathaway shareholder letters, where business quality narrows the forecast band the discount has to cover.

Two arithmetic habits carry most of the weight. Keep intrinsic value in the denominator, and apply the discount to the bear case. Get those right and the margin of safety calculation reports what it is supposed to report: the size of the cushion protecting the purchase, stated honestly enough to act on.

InvestViable does not publish buy or sell recommendations on individual securities. All analysis is based on public financial data and a transparent, documented methodology. The figures used above are illustrative and are provided to demonstrate the arithmetic, not as a view on any specific stock.