Margin of Safety Formula & Calculator For Stocks + XL Download

Knowing How Margin of Safety Is Calculated & the Formula Helps You To See How Value Investing Works. + A Free Excel Margin of Safety Calculator

What is the Margin of Safety for Stocks

The Margin of Safety is the percentage difference between a company’s Fair Value per share and its actual stock price. This metric is the single most significant valuation metric for value investors as it is the final output of detailed discounted cash flow analysis.

The Margin of Safety calculation is relatively easy; the challenge comes in calculating one of the equation’s elements, the Intrinsic Value.  Here I provide two examples, one for buying a small business and another for calculating the corporate margin of safety that Warren Buffett uses.

Margin of Safety Formula & Calculator
The Margin of Safety Formula & Calculator

The Margin of Safety Formula & Equation

Margin of Safety = (Intrinsic Value Per Share – Stock Price) / Intrinsic Value Per Share.

Intrinsic Value = [FV/(1+d)0] + [FV/(1+d)1] + [FV/(1+d)2] + …..+ [FV/(1+d)p

  • FVx = Net cash flow (inflow or outflow) for the jth period (for the initial “Present” cash flow, x = 0
  • d = Discount Rate – Annual rate of interest or Inflation
  • p = Number of periods to be included

The Margin of Safety Formula for Small Business:

If you are interested in buying shares of a company, or even an entire business, you will want to estimate the value of the cash it generates into the future.  In a simple way, let’s guess that a business you want to buy will generate $10,000 per year for ten years; after the ten years, the business will be worthless.  This means the company’s value might be worth today $100,000 minus the yearly inflation rate; for example, 2% per year.

This means the value of the income in real terms today is $89,826 (Intrinsic Value)

The business owner wants to sell 100% of the company to you for $60,000 (Stock Price)

Margin of Safety = 33% = ($89,826 – $60,000) / $89,826

The Margin of Safety Formula for Stocks Explained

The Margin of Safety for stocks is a percentage estimate of how discounted a stock’s price is compared to the estimated 10 years of future discounted cash flow. If a company’s intrinsic value (10-year discounted cash flow/# shares) is 30% lower than the current stock price, it has a margin of safety of 30%.

Calculating the intrinsic value and the margin of safety can be complex as there are many variables and calculations.

To Calculate the Margin of Safety You Have Two Options:

  1. Use a Margin of Safety Calculator in Excel (Download Now)
  2. Use a Stock Screener To Automatically Calculate Margin of Safety.

A Free Margin of Safety Calculator in Excel

Intrinsic Value & Margin of Safety Calculator Excel
Intrinsic Value & Margin of Safety Calculator Excel (Click to Download Virus Checked Excel Sheet)

By far, the easiest way to calculate intrinsic value and the famous Warren Buffett Margin of Safety is to use an excel spreadsheet.

We have done the work for you; our simple to use Excel Sheet provides all the information & calculations you need to easily determine the intrinsic value of a company’s stock.


Margin & Safety Calculator Excel Free Download

Use a Stock Screener To Automatically Calculate Margin of Safety

Stock Rover will automatically calculate fair value, intrinsic value, and the margin of safety and scan the entire market for stocks with a high Margin of Safety.

Stock Rover Simply The Best Tool For Investors

Investing In Stocks Can Be Complicated, Stock Rover Makes It Easy.

Stock Rover is our #1 rated stock investing tool for:
★★★★★ Growth Investing – With Our LST Beat The Market System TM
★★★★★ Value Investing – Find Value Stocks Using Warren Buffett’s Strategies
★★★★★ Income Investing – Harvest Safe Regular Dividends from Stocks

“I have been researching and investing in stocks for 20 years! I now manage all my stock investments using Stock Rover.” Barry D. Moore – Founder:

Get Stock Rover Premium Plus Now & Get My “LST Beat the Market System” Included or Read the In-Depth Stock Rover Review & Test.

How to Use the Excel Margin of Safety Calculator

Essentially, Warren Buffett estimates the current and predicted earnings from a company from now for the next ten years.  He then discounts the cash flows against, for example, inflation, to get the current value of that cash.  This is the Intrinsic Value of the business.

Explained another way, Warren Buffett bases his Intrinsic Value calculations on future free cash flows. He believes cash is a company’s most valuable asset, so he tries to project how much future cash a business will generate.

The usual formula for estimating future Free Cash Flows is the Discounted Cash Flow Method. Here is an example of a simple Discounted Cash flow Method

  1. Take the free cash flow of the first year and multiply it with the expected growth rate.
  2. Then calculate the NPV of these cash flows by dividing it by the discount rate.
  3. Project the cash flows ten years into the future, and repeat steps one and two for all those years.
  4. Add up all the NPV’s of the free cash flows.
  5. Multiply the 10th year with 12 to get the sell-off value.
  6. Add up the values from steps four, five, and Cash & short-term investments to arrive at the intrinsic value for the entire company.
  7. Divide this number with the number of shares outstanding to arrive at the intrinsic value per share.

Note: the NPV refers to the Net Present Value or the present value of money. You calculate the Net Present Value by subtracting the discount rate from the money’s future value and multiplying it by the number of years you are measuring.

The advantage of the Discounted Cash Flow Method is that it is simple. The problem with this method is that Free Cash flows can vary dramatically over from year-to-year. Thus, the final figure from this method is guesswork.

The Margin of Safety: What Should You Pay for A Stock?

Now that you know what the intrinsic value is per share, you can compare that to the actual share price.  If the intrinsic value is more than the actual share price, that will constitute a value investment.

Warren Buffett likes a margin of safety of over 30%, meaning the stock price could drop by 30%, and he would still not lose money.

All value investors need to understand that the margin of safety is only an estimate of a stock’s risk and profit potential. There are many risks that fundamental analysis cannot estimate, including politics, regulatory actions, technological developments, natural disasters, popular opinion, and market moves.

The margin of safety you use is the level of risk you are comfortable with.

If you are risk-averse, you will want a high margin of safety. A risk-taker, however, could prefer a low margin of safety.

[Related Article: 4 Easy Steps to Build The Best Buffett Stock Screener]

Summary: The Margin of Safety Calculation

While it is easy and free to use excel to calculate Intrinsic Value and Margin of Safety for an individual stock, it is not very productive. You need to enter the values for each company individually.  If you want to be able to scan through thousands of stocks to find the kind of investments that meet Warren Buffett’s or Ben Graham’s criteria, then you will need a stock screener to do the work for you.

Related Articles: Finding Great Stocks With Stock Rover


Please enter your comment!
Please enter your name here