Margin of Safety: Definition, Formula, and Calculator for Value Investors

Mar 10, 2026 · 6 min read · By Jonathan

Benjamin Graham called the margin of safety "the central concept of investment." In his 1949 book The Intelligent Investor, he devoted an entire chapter to it. Warren Buffett has said it is the three most important words in investing. The idea is simple but the application requires discipline: never pay full price for a stock, because your valuation will sometimes be wrong.

This article explains what the margin of safety is, how to calculate it, and how to use it as a practical screen for undervalued stocks.

What is margin of safety in investing?

The margin of safety is the gap between a stock's estimated intrinsic value and its current market price, expressed as a percentage.

If you estimate a stock is worth $100 and it trades at $70, the margin of safety is 30%. That 30% cushion protects you in two ways:

  • Against valuation errors. Your estimate of intrinsic value might be wrong. If you overestimated by 20%, a 30% margin of safety still leaves you with a profitable investment.
  • Against adverse events. Businesses face unexpected headwinds — recession, competition, management changes. A stock bought at a significant discount can absorb bad news that would devastate an investor who paid full price.

Graham was writing in an era where companies failed frequently and financial reporting was opaque. His margin of safety principle was a response to the real possibility of permanent capital loss. That remains just as relevant today.

The margin of safety formula

The formula is straightforward:

Margin of Safety = (Intrinsic Value − Market Price) / Intrinsic Value × 100

The result is a percentage. A positive percentage means the stock trades below intrinsic value — the larger the number, the bigger the discount. A negative percentage means the stock is trading above intrinsic value.

For example:

Intrinsic Value Estimate Market Price Margin of Safety
$50 $35 30% — meaningful discount
$50 $25 50% — deep value territory
$50 $50 0% — fair value, no cushion
$50 $65 -30% — trading above intrinsic value

The challenge, of course, is determining intrinsic value. Graham used several methods. The most practical for individual investors is the Graham Number.

Calculating margin of safety using the Graham Number

The Graham Number gives a simple, formula-based estimate of the maximum price a defensive investor should pay for a stock. It incorporates both earnings (via EPS) and asset value (via book value per share):

Graham Number = √(22.5 × EPS × Book Value per Share)

The constant 22.5 comes from Graham's original criteria: a maximum P/E of 15 multiplied by a maximum P/B of 1.5. It encodes both an earnings discipline and an asset discipline in a single number.

Once you have the Graham Number, the margin of safety calculation is:

Margin of Safety = (Graham Number − Share Price) / Graham Number × 100

Worked example

Take a hypothetical manufacturer with the following data from its most recent annual filing:

  • Earnings per share (EPS): $3.20
  • Book value per share: $28.50
  • Current share price: $32.00

Step 1: Calculate the Graham Number.

Graham Number = √(22.5 × 3.20 × 28.50)
              = √(2,052)
              = $45.30

Step 2: Calculate the margin of safety.

Margin of Safety = (45.30 − 32.00) / 45.30 × 100
                 = 13.30 / 45.30 × 100
                 = 29.4%

A 29% margin of safety relative to the Graham Number is meaningful — close to Graham's preferred minimum of 33%. This stock would appear on a below-Graham-Number screen and warrants further research.

What counts as a good margin of safety?

Graham recommended at minimum 33% for most stocks. For smaller or financially weaker companies, he preferred 50% or more. His reasoning: the larger the uncertainty about a business's future, the larger the cushion you need.

In practice:

Margin of Safety Interpretation
50%+ Deep value — significant discount to Graham Number
33–50% Strong — meets Graham's original threshold
20–33% Moderate — worth investigating alongside other metrics
0–20% Thin — limited cushion against valuation error
Negative Trading above Graham Number — no margin of safety

A large margin of safety alone is not sufficient. Graham combined it with filters for financial quality: profitable companies, manageable debt, a long earnings record. A stock can trade at a deep discount for good reason — a deteriorating business, persistent losses, or impending insolvency. The margin of safety does not protect you from buying a fundamentally broken company.

Margin of safety and the Piotroski F-Score

The most useful combination in a value screen is a meaningful margin of safety plus evidence of financial health. A stock trading 40% below its Graham Number is interesting. The same stock with a Piotroski F-Score of 7 or above — indicating improving profitability, stable leverage, and growing efficiency — is genuinely compelling.

The Piotroski score addresses the main weakness of a pure margin-of-safety screen: it filters out companies whose assets are deteriorating or whose earnings are in structural decline. A high margin of safety combined with a strong F-Score is the closest thing to a systematic implementation of Graham's defensive value approach.

Limitations of the Graham Number as intrinsic value

The Graham Number has well-known limitations:

It ignores growth. The formula uses current EPS and book value. A fast-growing business may be cheap on these measures even at a high price; a shrinking business may look cheap when it is not. Graham designed it for stable, asset-heavy companies — manufacturers, utilities, financials — not high-growth technology or pharmaceutical companies.

It relies on book value. For companies where the main assets are intangible — brands, patents, software, customer relationships — book value is an unreliable anchor. The Graham Number will either significantly understate or meaninglessly estimate intrinsic value for these businesses.

Negative EPS or book value breaks the formula. If a company has negative earnings or negative equity, the Graham Number cannot be calculated. These companies should be excluded from a Graham-based screen.

Despite these limitations, the Graham Number remains one of the most useful quick-filter tools in value investing. It works best as a first screen — identifying candidates worth deeper research — rather than a final buy signal.

How to screen for stocks with a margin of safety

Calculating the Graham Number manually for thousands of stocks is impractical. A stock screener that pulls financial data directly from SEC EDGAR filings can calculate it automatically and rank stocks by their margin of safety.

StockPik computes the Graham Number for every US stock where sufficient data is available — using EPS and book value per share from the most recent annual filings. The margin of safety screener shows all stocks currently trading below their Graham Number, ranked by margin of safety. Each stock also shows its Piotroski F-Score, P/E ratio, and composite Value Score, so you can filter for quality alongside the discount.

When I run the screen today, the stocks with the largest margins of safety relative to the Graham Number tend to be in asset-heavy sectors — industrials, financials, energy — where book value is a meaningful anchor. Technology and healthcare stocks rarely appear because book value understates their true asset base.

Sources

  • Graham, B., & Dodd, D. (1934). Security Analysis. McGraw-Hill.
  • Graham, B. (1949). The Intelligent Investor. Harper & Brothers.
  • Klarman, S. (1991). Margin of Safety. HarperCollins.
  • Piotroski, J. (2000). Value Investing: The Use of Historical Financial Statement Information to Separate Winners from Losers. Journal of Accounting Research, 38, 1–41.
  • SEC EDGAR: source of all financial statement data used by StockPik.

About the author

I'm Jonathan, the founder of StockPik. The margin of safety is the first filter I look at when evaluating a stock — everything else is secondary to buying at a price that gives you room to be wrong. The below-Graham-Number screener was the first feature I built, and it remains the one I use most.

Ready to find undervalued stocks?

Screen 6,000+ US stocks by P/E, Graham Number, Piotroski F-Score and more.

Screen stocks for free →