What is the margin of safety in investing and how is it calculated?
Updated June 27, 2026 · DeepTicker
The margin of safety is the difference between the estimated real value of a stock and the price you pay for it. Buying with a margin of safety means paying clearly below what it is worth, so that a calculation error or an unexpected event does not ruin the investment. A typical margin demanded by prudent investors is between 25% and 50%.
What Margin of safety is and why it matters
The margin of safety is probably the most important concept in all of value investing. It was coined by Benjamin Graham, Warren Buffett's mentor, and the idea is overwhelmingly common-sense: since we can never be sure of the exact value of a company, we should buy with a cushion. If you calculate that a stock is worth €100 and you buy it at €60, you have a margin of safety of 40%: even if you were wrong and it is actually worth €80, you still bought cheap.
The classic metaphor is that of the engineer building a bridge. If they expect 10-tonne trucks to cross, they don't design the bridge to bear exactly 10 tonnes: they design it for 30. Those extra 20 tonnes are the margin of safety against calculation errors, defective materials or unexpected loads. On the stock market, the future is uncertain, projections fail and companies give nasty surprises; the margin of safety is that cushion that protects you when reality does not match your spreadsheet.
Why it matters so much: investing consists of estimating the intrinsic value of a business and comparing it with its market price. But intrinsic value is not an exact figure, it is an estimate with a margin of error. If you buy right at the value you have calculated, any small flaw in your assumptions —slightly lower growth, a margin that does not materialise— leaves you at a loss. The margin of safety humbly recognises that you can be wrong and builds protection against it.
The margin of safety serves two functions at once. The first is defensive: it reduces the risk of permanent loss of capital, which is the real risk for a long-term investor (not temporary volatility). The second is offensive: the cheaper you buy relative to the value, the greater your potential return when the price converges towards the value. Buying at a discount protects and, at the same time, improves the expected return.
It is worth understanding that the margin of safety is not a fixed number for all companies. For a predictable, very high-quality business (recurring revenue, a clear competitive advantage), an investor can settle for a smaller margin, of 20-25%, because the value estimate is more reliable. For a cyclical, indebted or uncertain-future business, it is best to demand a larger margin, of 40-50%, because the range of error is wider. The margin should scale with uncertainty.
The margin of safety is closely related to valuation. To have it, you first need a reasonable estimate of how much the company is worth: that's where methods such as the DCF (discounted cash flow), the EPV (the value of current earnings with no growth) or comparable multiples come in. Once you have that intrinsic value, the margin is simply how far below you are buying. Without prior valuation there is no real margin of safety, only intuition.
A crucial nuance: the margin of safety protects against estimation errors, but not against errors of judgement about the business. If the company is a value trap (it looks cheap but its real value is sinking), an apparent discount on a value that is not real protects you from nothing. That's why the margin of safety must always be combined with an analysis of the quality of the business: buying something cheap that is getting worse is not investing with a margin, it is falling into a trap.
How Margin of safety is calculated
Margin of safety (%) = (Intrinsic value − Market price) / Intrinsic value × 100
- · Intrinsic value: your reasonable estimate of how much the stock is really worth, calculated with DCF, EPV or other methods
- · Market price: the price at which the stock trades today, what you would actually pay
- · Result in %: how much discount you are getting relative to the value; the larger, the more cushion against errors
Example of Margin of safety
Suppose you estimate that a stock has an intrinsic value of €100 per share after a careful analysis of its cash flows. The market offers it today at €65. Applying the formula: (100 − 65) / 100 × 100 = 35% margin of safety. You are paying 65 cents for every euro of estimated value.
That 35% is your cushion. Imagine you were wrong and the company is actually worth €85, not 100. Even so you bought at 65, so you still have a margin of 24% over the corrected value. Without that initial cushion —if you had bought at €98— that same error would have left you overpaying. The margin of safety turns a calculation error into a bearable loss instead of a real loss.
The reverse also teaches: if that stock were trading at €110 against your value of €100, not only is there no margin of safety, but you are paying a 10% above the value. Buying there implies trusting that your estimate is too conservative and the company is worth much more. Sometimes it is justifiable for exceptional businesses, but then you depend entirely on the future being brilliant, with no cushion if it isn't.
How to interpret Margin of safety
- →A margin of safety of 25-35% is reasonable for medium-high quality companies with relatively predictable results.
- →For cyclical or uncertain-future businesses, demand a larger margin (40-50%); for exceptional and predictable businesses, 20-25% can be enough.
- →A very narrow margin (<15%) barely protects: any calculation error leaves you without a cushion.
- →An apparently huge margin (>50%) should set off an alarm: check whether it is not a value trap and the market knows something you don't.
- →The margin is calculated on your estimated intrinsic value; if that estimate is wrong, the margin is illusory no matter how big the percentage looks.
- →Always combine the margin of safety with an analysis of the quality of the business: a discount on a healthy business is an opportunity; on a declining one, a trap.
Common mistakes with Margin of safety
- ✕Calculating the margin of safety on a too optimistic intrinsic value, which inflates the apparent discount and eliminates the real protection.
- ✕Confusing a large discount with a bargain without checking whether the company is a value trap whose value is sinking.
- ✕Demanding the same margin for all companies, ignoring that an uncertain business needs more cushion than a predictable one.
- ✕Using the margin of safety without an analysis of the quality of the business, buying cheap something that is worth less and less.
- ✕Giving up the margin for fear of "missing out" on a rising stock: paying at the exact value or above leaves the investment with no defence against errors.
How the margin of safety of a stock is calculated
Calculating the margin of safety has two steps. The first, and hardest, is to estimate the intrinsic value of the company: how much its business is really worth. This is done with a DCF (discounting its future cash flows), with the EPV (the value of sustainable earnings with no growth) or with multiples of comparable companies. The second step is trivial: compare that value with the market price and see the discount.
The delicate part is that the intrinsic value is not an exact number, but a range. That's why many investors work with a conservative value (the low end of their estimates) and demand the margin over that floor. So the margin of safety is built on prudent assumptions, not optimistic ones. If the business is still attractive even with pessimistic figures, the investment has a foundation.
The percentage of margin you demand should scale with uncertainty. For a company with a solid competitive advantage and predictable results, a margin of 20-25% can be enough. For a cyclical or uncertain-future business, it is best to demand 40-50%. The margin is not a whim: it is the dose of humility you apply against what you cannot know.
What margin of safety is considered good or sufficient
There is no single ideal margin of safety, but there are reference ranges. Graham, the father of the concept, often spoke of buying at two thirds of the value or less, which equals a margin of around 33%. Buffett, more focused on the quality of the business, accepts smaller margins for exceptional companies because he trusts more in the durability of their value.
A margin of safety of 25-30% is considered reasonable for medium-high quality companies. Below 15%, the cushion is so thin that it practically disappears at any calculation error. Above 50%, either you have found an exceptional opportunity, or —more frequent— the market knows something you don't, and it is worth checking whether you are not facing a value trap.
The key is consistency: the sufficient margin depends on your confidence in the value estimate. The less sure you are of the business, the more margin you must demand. And never forget that a margin calculated on an incorrect intrinsic value is illusory: the discount is only as good as the valuation it starts from.
Margin of safety versus value trap: beware the false discount
The biggest enemy of the margin of safety is the value trap: a stock that appears to offer a huge discount but whose real value is deteriorating. If you calculate a margin of 40% over an intrinsic value that is actually falling every quarter because the business is sinking, that margin is an optical illusion. You buy cheap something that is worth less and less.
That's why the margin of safety should never be used alone. It must be accompanied by an analysis of the quality of the business: does it have a competitive advantage (moat)? are its returns on capital high and sustainable? is the discount due to a temporary problem or a structural decline? A discount on a business in good shape is an opportunity; the same discount on a declining business is a trap.
The healthy synthesis is to combine quality + price: buying good businesses with a margin of safety. The discount protects you from your calculation errors; the quality protects you from the value itself evaporating. Neither of the two is enough on its own. This is the teaching that connects Graham with Buffett: the price matters, but the quality of the business determines whether that price is really a bargain.
How DeepTicker applies the margin of safety
DeepTicker builds the margin of safety on two pillars. On the price side, its Reverse DCF (discounted cash flow) does not give you a single value: it shows you what growth and what margin the current price is pricing in and classifies it into a clear verdict —Bargain · Reasonable · Demanding · Expensive · Priced-in bubble—, so you see at a glance whether there is a discount or an overpayment.
On the quality side, the DeepScore (based on the analysis of quality and competitive advantage) scores the company from 0 to 100 in five dimensions compared with its sector. That way you avoid the deadly mistake of the margin of safety: confusing a real bargain with a value trap. A stock only deserves your cushion if the business behind it is solid; DeepTicker helps you see both things at once.
What matters is that every number comes explained: you see the WACC used, the implied growth, the quality score and where each figure comes from. It is serious fundamental analysis, made simple, and because you see the calculation, you learn to judge the margin of safety yourself. Remember: this is information and analysis, not financial advice; the decision to buy or not, combining price and quality, is always yours.
On DeepTicker you get this metric calculated and explained for thousands of stocks, with no spreadsheets.
Try DeepTicker free →Frequently asked questions about Margin of safety
What is the margin of safety in the stock market?
It is the difference between the estimated real value of a stock and the price you pay. Buying with a margin of safety means paying clearly below the value, so that a calculation error does not turn into a loss.
Who invented the concept of the margin of safety?
It was popularised by Benjamin Graham, Warren Buffett's mentor, in his books *Security Analysis* and *The Intelligent Investor*. It is the cornerstone of value investing.
How is the margin of safety calculated?
With the formula: (Intrinsic value − Market price) / Intrinsic value × 100. First you estimate how much the company is worth (DCF, EPV) and then you see how much discount the current price offers.
What margin of safety is enough?
It depends on the uncertainty. For medium-high quality companies, 25-35% is reasonable; for cyclical or doubtful businesses, it is best to demand 40-50%. The less sure you are of the value, the more margin you need.
Does the margin of safety protect against everything?
No. It protects against estimation errors, but not against a value trap: if the real value of the business is sinking, a discount on a false value does not protect you. That's why it must be combined with quality analysis.
Is a high margin of safety always better?
Not necessarily. A very large discount can hide a serious problem the market is already pricing in. A margin of 60% can be a historic bargain or a value trap; you have to investigate why it is so cheap.
How do I see the margin of safety of a stock on DeepTicker?
DeepTicker shows you whether a stock is Bargain, Reasonable, Demanding, Expensive or Priced-in bubble with its Reverse DCF, and its quality with the DeepScore, so you assess the real margin combining price and the soundness of the business.
Educational content by DeepTicker. This is not financial advice or a recommendation to buy or sell. Investing involves risk of loss.
You may also like
Put Margin of safety to work with the DeepTicker Guide, the Stock Screener and the DeepTicker Score.