The margin of safety is the gap you require between what you think a share is worth and what you are willing to pay for it. If your estimate of intrinsic value is $100 and you insist on a 30% margin, you do not buy above $70.
Its purpose is not to make money on the gap. Its purpose is to be wrong safely. Every valuation is built on forecasts, and forecasts are wrong in both directions; the margin is the acknowledgement that yours will be too, bought in advance at the only moment you control — the price you pay. The idea is Benjamin Graham’s, and he described it as the central concept of investment.
The first form turns a target margin into a buy price; the second measures what a given price actually offers. Both are stated against your own estimate, which is what makes the number personal rather than a property of the share.
Suppose your work puts a company’s value at $80 a share and you want a 25% margin:
Now suppose the estimate was optimistic and the business was really worth $68. Bought at $60, the position is still sound; bought at $78 on the strength of the original figure, it is a loss that arrived without the company doing anything wrong. That is the whole mechanism — the margin absorbed a 15% error in the analysis.
Size the margin to the uncertainty rather than applying one number everywhere. A regulated utility with decades of contracted demand behind it needs less room than a cyclical business whose earnings halve and recover; the harder the future is to describe, the wider the discount should be.
Apply it to a valuation, never to a price. A discount off last year’s high or off an analyst’s target is a discount off somebody else’s opinion, and carries none of the protection the concept is named for.
In the app, a watchlist holds a margin of safety beside each company: you record what you think it is worth, and the list applies your discount to produce the price at which it is worth looking again. That is also why the Intrinsic Value tab writes a valuation rather than a buy price when you send a figure to a watchlist — discounting it first would have the discount taken twice.
It matters most exactly when it is hardest to insist on: in a rising market, where every candidate trades above your estimate and waiting feels like the expensive option. It also matters most on businesses whose value you are least sure of — which, unhelpfully, are the ones whose stories are most persuasive.
A margin of safety applied to a bad estimate is not safety at all — 30% off a figure that was twice too high is still an overpayment. It also has a real cost: demand enough of a discount and you will own very little for long stretches, and the quality businesses that compound rarely offer it. And it protects the price you paid, not the business: nothing about a 40% discount stops a company from deteriorating faster than the discount absorbed.