b2KIT

Margin of Safety Calculator

Calculate the margin of safety percentage between intrinsic value and market price for value investing analysis and stock screening.

Tested tool guide Tested browser tools Checked August 16, 2026

What Margin of Safety Calculator does, with a checked example

Compare an investment's current market price with your estimate of its intrinsic value. The calculator expresses the difference as a percentage of intrinsic value, making discounts easier to compare across securities with different prices. When intrinsic value is positive, a positive result means the market price is below the entered valuation, zero means they are equal, and a negative result means the price exceeds the valuation. Nonpositive intrinsic values are invalid for this interpretation. The common mistake is treating intrinsic value as an observed fact. It is an estimate, so the result is only as reliable as the valuation entered.

Worked example

A concrete input and expected output from the current implementation.

Input

Intrinsic value per share: $100
Market price per share: $70

Expected output

Margin of safety: 30%

The price is $30 below the $100 intrinsic value. Dividing $30 by $100 and multiplying by 100 gives a 30% margin of safety.

How the result is produced

1

Percentage calculation

The calculation is (intrinsic value - market price) / intrinsic value x 100. Intrinsic value is therefore the percentage base. For example, a $30 gap from a $100 valuation is 30%, not the approximately 42.86% obtained by dividing that gap by the $70 market price.

2

Interpreting the sign

For a positive intrinsic value, a result above 0% indicates that the entered market price is below the entered intrinsic value. A 0% result indicates no gap. A result below 0% indicates that the market price is above the valuation estimate. Zero intrinsic value makes the calculation undefined, while a negative intrinsic value reverses the sign interpretation and is invalid for this use.

Good uses

  • Screen several stocks by calculating each price discount from a separately prepared intrinsic value estimate.
  • Check how a recent price change affects the margin of safety without rebuilding the underlying valuation.
  • Compare a proposed purchase price with a valuation target before deciding whether the estimated discount is sufficient.

Limits and checks

  • Use matching units and scope. A per-share market price must be compared with per-share intrinsic value, while whole-company market value requires whole-company intrinsic value.
  • A large percentage does not establish that a security is undervalued. It can also reflect an optimistic or outdated intrinsic value estimate.
  • The result does not incorporate valuation uncertainty, liquidity, taxes, trading costs, portfolio concentration, or the probability that the underlying business deteriorates.

Common questions

Is margin of safety the same as the percentage upside to intrinsic value?

No. This calculator measures the shortfall from intrinsic value using intrinsic value as the denominator. Percentage upside commonly measures a potential gain from the current market price and uses market price as the denominator. With intrinsic value of $100 and price of $70, margin of safety is 30%, while upside to $100 is approximately 42.86%.

Is there one margin of safety percentage that makes a stock a buy?

No. The calculation reports a relationship between two entered values; it does not set a purchase rule. An acceptable margin depends on confidence in the valuation, assumptions about the business, financial risk, and the investor's objectives. Testing several plausible intrinsic values can show how sensitive the percentage is to valuation uncertainty.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools