The Margin of Safety Formula: How to Calculate It Step by Step
Graham's 1934 buffer rule, the way Buffett actually applies it, and a worked Coca-Cola example.

In the early 1930s, an economics professor at Columbia named Benjamin Graham was rebuilding a portfolio that had nearly destroyed him. He had been wiped out in the 1929 crash. He taught the lesson he extracted from that wipeout for the next forty years. The way to survive an unknowable future, he argued, is to refuse to pay full price for any version of it. He called the discount you demanded the margin of safety. The simple equation he later used to convert that discount into a buy-or-pass decision is what investors today call the margin of safety formula.
The margin of safety formula itself is almost trivial:
Margin of safety (%) = (intrinsic value − market price) ÷ intrinsic value
If you think a stock is worth $100 and it trades at $60, you have a 40 percent margin. The arithmetic is not the hard part. The hard part is intrinsic value — the figure doing the real work in the equation. Nine out of ten investors who quote Graham's rule have never sat down and computed one.
This essay is the long version of how to do it. Where the formula comes from. How to estimate intrinsic value from a 10-K. What discount and growth rates are defensible. And a worked example using Coca-Cola's most recent annual filing. By the end, you will have a number you can defend in a room of critics — and a clear-eyed view of when the formula is helping and when it is not.
What the margin of safety formula actually says
Graham's original framing was not a single equation. In Security Analysis (1934) and again in The Intelligent Investor (1949), he described the margin of safety as a buffer — the gap between a security's price and a conservative estimate of its underlying value. The point of the buffer was not to predict the market. It was to give you room to be wrong.
Three formulations of the same idea show up in modern practice:
- Graham's buffer. Buy securities priced well below an intrinsic value estimated under conservative assumptions.
- Klarman's restatement. The margin of safety is the gap between business value and price that protects investors against errors, bad luck, and the vicissitudes of the market.1
- The modern percentage formula.
MoS % = (IV − P) / IV.
All three say the same thing in different registers: you do not pay full price for your own forecast. The percentage formula is just an accounting of how generous the discount is.
The margin of safety formula does not flag market volatility. A stock that drops thirty percent on a Tuesday, with no change in the underlying business, has not created a margin of safety. It has revealed that the previous price was wrong, or that the new one is. The discount you need is against your own valuation error, not against the day's mood.
The two-step calculation
Every margin of safety calculation breaks into two steps in practice:
Step 1. Estimate the security's intrinsic value (IV). This is the analytic work, and where every honest investor admits the formula's fragility lives. Different methods give different numbers.
Step 2. Compare to the market price (P). This is a lookup.
Once you have both:
Margin of safety (%) = (IV − P) / IV
A worked example with simple numbers:
| Inputs | Value |
|---|---|
| Estimated intrinsic value (IV) | $100 |
| Current market price (P) | $60 |
| Absolute margin (IV − P) | $40 |
| Margin of safety (%) | 40% |
The dollar difference ($40) is the absolute margin. The forty-percent figure is the relative margin. That percentage is usually what people mean when they say "this stock has a margin of safety." Graham wrote that he wanted at least a third for stocks. Buffett has rarely been explicit about a number. Berkshire's largest purchases, though, have typically been made at prices implying a margin in the thirty-to-fifty-percent range against his own estimates.
The number is not sacred. Whether twenty percent is enough depends on how robust your IV estimate is. For a bond from a AAA issuer, a five-percent buffer might be plenty. For a turnaround in a cyclical industry, fifty percent might still be tight.
How to estimate intrinsic value
This is the step that does the work. There are three legitimate approaches, in order of how much they assume.
Method 1 — Discounted cash flow
The textbook method. You project a company's owner earnings for an explicit forecast period. You discount each year back to the present at your required rate of return. Then you add a terminal value for everything beyond the forecast.
A simplified version — the Gordon growth model — collapses the explicit forecast into a single formula when growth is roughly constant:
IV = OE × (1 + g) / (r − g)
Where OE is current owner earnings, g is long-run growth rate, and r is the required rate of return. This is the formula we will use in the worked example below. It is defensible for mature, predictable businesses where extrapolation is reasonable. It falls apart for early-stage growth companies.
Method 2 — Earnings power value
When future growth is too uncertain to model, you can ignore it. Bruce Greenwald's earnings power value assumes the current normalized earnings persist with zero growth and discounts them as a perpetuity:
EPV = OE / r
This is deliberately conservative. If a stock looks cheap on EPV before you have assumed any growth, you have a thick margin.
Method 3 — Asset value (Graham's net-net)
Graham's original screen for the 1930s and 1940s was simpler still. He only bought when the market value of common stock was below net current asset value (current assets minus all liabilities). The thinking was that you were paying nothing for the going concern. The screen barely returns hits in modern markets. The discipline behind it, though, still anchors deep-value work: value what the business owns, not what it might earn.
The Buffett refinement: owner earnings
Whichever method you use, the cash-flow figure matters more than the formula wrapped around it. In his 1986 Berkshire shareholder letter, Buffett rejected both reported net income and GAAP cash flow on their own. His correction, owner earnings, is:2
Owner earnings = Net income
+ depreciation, depletion, amortization (D&A)
+ other non-cash charges
− average annual capital expenditure required to
maintain long-term competitive position
− any working-capital additions also required
for that maintenance
The crucial term is "maintenance" capex — the spend required to keep the existing business running, not to grow it. Most filings do not break this out. In practice, analysts approximate maintenance capex as a fraction of total capex, often seventy to eighty-five percent for mature businesses.
Two dials: discount rate and growth rate
In the Gordon growth formula, your answer is brutally sensitive to r and g. A one-percent change can move IV by thirty percent or more. Two rules from the canon:
- Discount rate (r). Buffett's historical heuristic was to use the long-term government bond rate as a floor and a working corporate rate (often around ten percent) above it.3 In a world with the 10-year Treasury near four-to-five percent, eight-to-ten percent is a defensible range.
- Growth rate (g). Long-run growth cannot exceed nominal GDP forever. Use two-to-five percent for mature businesses; anything higher belongs inside an explicit forecast, not assumed in perpetuity.
A worked example using the margin of safety formula on Coca-Cola
Coca-Cola's 2025 annual report, filed with the SEC in February 2026, gives us everything we need.4 We can run the margin of safety formula end-to-end on a real, current business. Here are the inputs the filing supplies directly:
| Line item (FY2025) | Value |
|---|---|
| Net revenue | $47.94B |
| Net income | $13.11B |
| Depreciation & amortization | $1.05B |
| Cash from operating activities | $7.41B |
| Capital expenditures | $2.11B |
| Dividends paid | $8.78B |
| Common stock repurchased | $0.75B |
| Common shares outstanding (Apr 2026) | 4.302B |
Step 1 — Compute owner earnings
Following Buffett's 1986 definition and approximating maintenance capex as eighty percent of total capex (Coca-Cola is mature, not expanding plant aggressively):
Net income $13.11B
+ D&A +1.05B
− Maintenance capex −1.69B (~80% × $2.11B)
= Owner earnings ≈$12.47B
Per share: $12.47B ÷ 4.302B shares ≈ $2.90 per share.
A quick reasonableness check before we move on. Coca-Cola returned $9.53B to shareholders in 2025 ($8.78B dividends plus $0.75B buybacks). Returning roughly seventy-six percent of owner earnings is consistent with a mature, capital-light business. The math hangs together.
Step 2 — Apply the Gordon growth model
- Discount rate (r): ten percent — the working rate Buffett has historically used, comfortably above today's risk-free yield.
- Growth rate (g): four percent — Coca-Cola's three-year revenue CAGR has been roughly three-to-five percent and that range is unlikely to expand in perpetuity.
IV per share = 2.90 × (1 + 0.04) / (0.10 − 0.04)
= 2.90 × 1.04 / 0.06
= 3.016 / 0.06
≈ $50.27
Step 3 — Run the margin of safety formula against today's price
At the time of writing, KO trades at $79.01.
MoS % = (IV − P) / IV
= (50.27 − 79.01) / 50.27
= −57.2%
The number is negative. By this version of the formula, Coca-Cola today is trading fifty-seven percent above a ten-percent / four-percent owner-earnings DCF. There is no margin of safety; there is a premium to fair value.
What does that finding mean?
Three reasonable readings of the same result:
- The formula is right and the price is wrong. Coca-Cola is overvalued today; wait.
- The formula is wrong and the price is right. A ten-percent discount rate is too high in a low-rate world; the market is using seven percent. At r = 7%, g = 4%, IV becomes roughly $100 per share and Coca-Cola is cheap.
- Both are partially right. The owner-earnings calc misses optionality — brand value, pricing power, share buybacks compounding when the price falls — that the market is paying for.
The honest investor's job is to argue all three out loud, not to pick whichever one confirms what they already wanted to do. The formula's contribution is to force that argument into the open. It is a discipline, not a recommendation.
This is, incidentally, how Buffett's 1988 Coca-Cola purchase actually worked. At the time he bought, Coca-Cola was trading at roughly fifteen times earnings — not a screaming bargain on a Gordon-growth basis. He bought anyway, because he was paying for brand strength and pricing power the formula does not capture. The trade was a generational success. The lesson is not that the formula was wrong. The lesson is that he knew exactly which margin it was offering him and which margin it was not.
## Five ways the margin of safety formula gets misusedA working knowledge of the calculation gets undermined faster by misuse than by miscomputation. The most common failures:
- Mistaking it for a stop-loss. A margin of safety protects you when your IV estimate is wrong. It does not protect you when the business deteriorates. If the underlying value drops forty percent, your initial thirty-percent buffer is gone — and selling now locks in the loss. Re-do the IV, then decide.
- Using it as market timing. "I will wait for the market to give me a forty-percent margin" sounds disciplined and is often just hesitation in a costume. Markets can stay above your IV for a decade.
- Plugging in someone else's IV. A margin of safety calculated against an analyst price target is a margin of safety against an analyst. That is not what Graham meant.
- Letting it scale position size mechanically. Klarman has warned that bigger discounts can correlate with bigger problems, not bigger opportunities. The sixty-percent discount that looks like a fat margin sometimes turns out to be the market knowing more than you about a deteriorating business.
- Forgetting it is a single-period snapshot. Your IV today depends on inputs that move year to year. The discipline is to re-derive it, not to lock it in.
What the margin of safety formula is actually for
The margin of safety formula does not make decisions. It surfaces them. You compute an intrinsic value. You compare it to a price. The gap between them tells you what you would need to be wrong about for the trade to fail. If the gap is small, your case has to be precise. If the gap is large, your case can tolerate noise. Either way, the margin of safety formula is doing its job — making you state the bet before you take it.
The numbers in this essay are not investment advice. They are an example of what the discipline looks like when you actually do it. The next time someone tells you a stock has a margin of safety, the right questions are the ones Graham would have asked. A margin of safety against what assumed value? Against which discount rate? Computed from which line items in the filing?
If they cannot answer, they do not have one.
For more long-form essays on value-investing methodology, see the [rest of the Hub](/hub).Seth A. Klarman, Margin of Safety: Risk-Averse Value Investing Strategies for the Thoughtful Investor (HarperCollins, 1991), introduction. ↩
Warren E. Buffett, Chairman's Letter to Berkshire Hathaway Shareholders, 1986, appendix on owner earnings. ↩
Warren E. Buffett, Chairman's Letter to Berkshire Hathaway Shareholders, 1992: "Second, and equally important, we insist on a margin of safety in our purchase price. If we calculate the value of a common stock to be only slightly higher than its price, we're not interested in buying. We believe this margin-of-safety principle, so strongly emphasized by Ben Graham, to be the cornerstone of investment success." ↩
The Coca-Cola Company, Annual Report on Form 10-K for the fiscal year ended December 31, 2025, filed February 20, 2026 (SEC accession 0001628280-26-010047). All line items in the worked example are sourced from this filing; shares outstanding from the subsequent quarterly report. ↩


