To understand the margin of safety, let us go back to the understanding of cash flows and the discounted cash flow method used to value companies. There is a challenge here. The cash flow projects are based on certain assumptions. You make assumptions on growth, on margins, on interest rates, on inflation etc. These assumptions may or may not be correct and at times they may be substantially wrong. For example, you may assume a stable interest rate regime and the rates may actually go up by 2% during the year. This can throw the best of estimates off target. That is where the margin of safety comes in handy as it gives you a cushion between the realism in your assumptions and the actual market reality.
A margin of safety in investing is a concept that was first propounded by Ben Graham, who is considered to be the father of modern investment theory. The concept has been applied at length by Warren Buffett and has been one of his key driving factors over the last many years of his successful investing career. The margin of safety, as the name suggests, refers to the comfort level or the cushion that the investor has in a stock when he buys the stock at a particular price. According to Buffett, most stocks would be worth buying if the price is right. Broadly, the margin of safety is not about undervalued and overvalued stocks. It is about to what extent the stock is either undervalued or overvalued. That is the crux of the matter.