Margin of safety formula for stocks
By Michael Lip. Prices as of the 2026-09-16 close. Updated 2026-09-17.
The margin of safety formula is (fair value minus price) divided by fair value. As a percentage it tells you how much of the fair value you are not paying for. A stock trading at $23.40 against an assumed fair value of $30.00 carries a margin of safety of about 22 percent, because (30.00 − 23.40) / 30.00 equals 0.22.
Run the formula yourself
The calculator is prefilled with a demo scenario. The fair value is an assumed number, not a researched estimate, and nothing here is a recommendation to buy, sell or hold any security. Change either input and the margin of safety updates as you type.
The formula, step by step
Margin of safety equals (fair value minus price) divided by fair value. The denominator choice matters. Dividing by fair value expresses the discount as a share of what the stock is worth, which is what most value investors mean. Dividing by price instead gives the markup from today's price to fair value, a different number that grows faster and is easy to confuse with the margin of safety.
A worked pair shows the difference. At a fair value of $30.00 and a price of $23.40, the margin of safety is (30.00 − 23.40) / 30.00, about 22 percent. The markup is (30.00 − 23.40) / 23.40, about 28 percent. Same inputs, two denominators, two answers. Pick one convention and stay consistent. The calculator shows both.
Why fair value, not price, drives the result
The margin of safety is only as good as the fair value estimate behind it. DeepValue Radar builds fair value through three-scenario discounted cash flow plus earnings power value and reverse DCF checks, and no single method is treated as authoritative. Until figures reconcile across sources, a company page shows "awaiting reconciliation" instead of a number.
A large margin of safety against a bad fair value estimate is not protection. If the fair value input is overstated, the formula manufactures a discount that does not exist. The formula measures the gap between two numbers. It says nothing about whether the larger number is correct.
Where the numbers come from
The price field is prefilled with the Open Text (OTEX) latest close of $23.40, taken from the Yahoo Finance chart API with a data-as-of date of the 2026-09-16 close and cross-checked against a second source with a spread tolerance before publication. Any financial figure that cannot reconcile across two independent sources is shown as awaiting reconciliation rather than estimated, which is why this page shows no fair value estimate for OTEX, no EV/EBITDA multiple and no balance-sheet items. SEC EDGAR XBRL companyfacts data is the primary source for balance-sheet and earnings figures once reconciled.
DeepValue Radar currently tracks Open Text (OTEX), Signet Jewelers (SIG) and Phoenix Education Partners (PXED), each with SEC filings as the primary-source backbone. Open Text Corporation files with the SEC and its XBRL companyfacts data supports recomputing financials and multiples from EDGAR. Signet Jewelers Limited files under CIK 0000832988 as listed in EDGAR XBRL, the authoritative source for balance-sheet items such as cash and debt used in a net-cash check per EDGAR. Phoenix Education Partners, Inc. (PXED), parent of the University of Phoenix, files periodic reports including the 10-K with the SEC, from which adjusted EBITDA and fair value inputs can be reconciled on EDGAR.
For informational and educational purposes only. Nothing here is investment, financial, legal or tax advice, or a recommendation, offer or solicitation to buy or sell any security. The operator is not a registered investment adviser, broker-dealer or licensed financial professional. The operator and contributors may hold long or short positions in securities discussed, so assume a potential conflict of interest on every page. Prices are delayed, and figures may be incomplete, outdated or wrong. Verify against SEC filings and company releases before acting. Micro and small-cap stocks are volatile and thinly traded, and you can lose all of the capital you put in. Fair value estimates depend on stated assumptions and can be wrong. Past performance does not predict future results.