How to use the margin of safety calculator
Margin of safety compares a value you already have with the price. Fair value from earnings builds that value from a few assumptions.
- Intrinsic value per share. Your own estimate, from a DCF, the Graham Number, an earnings multiple or any other method.
- Current share price.
- Required margin of safety. The discount you insist on before buying. The default of 25% is a common starting point.
- For fair value from earnings, enter EPS, the growth you expect, how many years it lasts, the P/E you expect the market to pay at the end, and the annual return you require.
The table under the first tool lists buy prices for margins from 10% to 50%.
The formulas
Upside = Intrinsic value ÷ Price − 1
Buy price = Intrinsic value × (1 − Required margin)A positive margin means the price is below your value estimate.
Future price = Future EPS × Exit P/E
Fair value today = Future price ÷ (1 + r)ng is annual EPS growth, n the number of years, and r the annual return you require. Dividends are not included.
A worked example
You estimate a share is worth $80, and it trades at $62. Margin of safety = 1 − $62 ÷ $80 = 22.5%, an upside of +29.0%.
You require 25%, so your buy price is $60.00. The stock would have to fall 3.2% to get there. Ask for 33% and the buy price drops to $53.60.
For the earnings method, Company E earns $3.50 a share. If EPS grows 8% a year for 5 years, it reaches $5.14. At 18 times earnings, the share would be worth $92.57 then. Discounted at 10% a year, the fair value today is $57.48, and the buy price with a 25% margin is $43.11.
Which assumption moves fair value most
| Change from the example | Fair value today |
|---|---|
| The example | $57.48 |
| Growth 4% instead of 8% | $47.59 |
| Exit P/E lowered to 14 times earnings | $44.70 |
| Required return 12% instead of 10% | $52.53 |
The exit P/E is the assumption people check least and it often matters most: it scales the whole future price. A company growing fast today usually trades at a lower multiple once it matures, so assuming today’s P/E will last can quietly build in optimism. The chart under the tool shows fair value across growth rates, with the buy price beneath it.
Why a margin of safety works
A value estimate depends on forecasts that will be wrong to some degree. The margin of safety turns that uncertainty into a rule: if your estimate turns out 22.5% too high, buying at $62 still means you did not overpay. It also improves returns when you are right, because the gap between price and value becomes your gain.
The cost is opportunity. A high requirement means you will buy less often, and good companies rarely trade at deep discounts. Some investors accept a smaller margin for businesses with very predictable earnings and demand a wider one for cyclical or indebted companies.
Limitations
- The margin is only as good as the value estimate. Measuring it precisely against a careless estimate gives false comfort.
- The earnings model ignores dividends, so it understates value for companies that pay out a large share of profit. The dividend discount model handles that case.
- Constant growth is a simplification. Real earnings rise and fall with the business cycle.
- No allowance for risk of permanent loss. A cheap price does not protect against a business whose value is shrinking.