The Magic Formula (Greenblatt)
The Magic Formula (Greenblatt)
Quick definition: Joel Greenblatt's magic formula is a quantitative stock-screening approach that ranks companies by two factors—high earnings yield (inverse of P/E ratio) and high return on capital invested—to identify statistically undervalued businesses with strong profitability metrics.
In his 2005 book The Little Book That Beats the Market, Joel Greenblatt introduced a deceptively simple screening methodology that combined two powerful value metrics into a single ranking system. The formula's elegance lies in its simplicity: it requires only four publicly available data points and produces a ranked list of candidates without subjective interpretation. Over three decades of backtesting across US stock markets, Greenblatt's approach historically identified portfolios that meaningfully outperformed market benchmarks.
The appeal of the magic formula extends beyond its historical returns. For individual investors, it represents an accessible entry point into systematic screening. No advanced financial modeling is required. The methodology is transparent, reproducible, and free from algorithmic mysticism. The formula works because it captures two fundamental truths about value investing: you want to buy profitable businesses (ROIC), and you want to buy them cheaply (earnings yield).
Key Takeaways
- The magic formula combines earnings yield (EBIT / Enterprise Value) with return on invested capital (ROIC), ranking stocks on both factors simultaneously
- High earnings yield identifies statistically cheap stocks; high ROIC confirms the business generates strong returns on capital deployed
- The formula avoids subjective judgment by using mechanical ranking and equal weighting of the two factors
- Historical backtests show the magic formula outperformed US stock market indices over multiple decades, though recent performance has been inconsistent
- The formula works best on large-cap stocks and requires patient capital through inevitable periods of underperformance
How the Magic Formula Works
The magic formula ranks stocks on two dimensions: earnings yield and return on invested capital. The mathematics is straightforward.
Earnings yield equals EBIT (earnings before interest and taxes) divided by enterprise value (market cap plus net debt). This metric asks: for every dollar of enterprise value, how many cents of operating profit does the company generate? A company with <4 billion in enterprise value and <400 million in EBIT has an earnings yield of 10 percent—substantially higher than typical bond yields, reflecting genuine statistical cheapness relative to earnings generation.
Return on invested capital (ROIC) equals NOPAT (net operating profit after tax) divided by invested capital (total assets minus current liabilities, or equivalently, debt plus equity). This metric asks: how much profit does the company generate for every dollar of shareholder and creditor capital deployed in the business? A company with ROIC above 15 percent demonstrates exceptional capital efficiency; one with ROIC below 5 percent likely operates in a commoditized industry with limited competitive advantages.
The formula ranks all stocks in your universe by earnings yield (1 to N), then independently ranks all stocks by ROIC (1 to N), then adds the two ranks together. The stocks with the lowest combined score—those ranking highest on both earnings yield and ROIC—represent the "magic formula" picks.
This approach elegantly captures the value investor's core thesis: buy profitable businesses cheaply. A stock with high earnings yield but low ROIC suggests a cheap business that may be cheap for good reason (weak competitive positioning). A stock with low earnings yield but high ROIC suggests an excellent business trading at a premium valuation. Only stocks excelling on both dimensions simultaneously emerge as candidates.
Why Two Factors?
Greenblatt's choice to use exactly these two factors was deliberate. Both metrics capture economically meaningful characteristics that historically correlate with long-term returns.
Earnings yield addresses valuation directly. It is the inverse of the price-to-EBIT multiple, expressing how much cash profit you receive per dollar deployed. Compared to P/E ratio (which uses net income), EBIT is less subject to manipulation through tax strategies or capital structure choices. A company earning substantial operating profit but carrying interest expense still has economic earning power—the formula captures it.
Return on invested capital addresses business quality. A company generating 20 percent ROIC is fundamentally different from one generating 5 percent, regardless of the valuation multiple applied. The former likely possesses durable competitive advantages (brand strength, network effects, proprietary technology); the latter likely competes in commoditized industries. Combining ROIC with earnings yield prevents investing in "value traps"—companies trading cheaply because competitive returns are already eroding.
The simplicity of using exactly two factors is also practical. Adding more factors increases the risk of overfitting, where a screen optimized to historical data performs poorly on future data. Two factors balance comprehensiveness with robustness. They are also intuitive: valuation and quality are the two core pillars of value investing, and the formula operationalizes both.
The Screening Process in Practice
To implement a magic formula screen:
First, define your universe. Will you screen all companies above a certain market cap? All companies on a specific exchange? Greenblatt's original work focused on US-listed stocks with market caps above <75 million (in 2005 dollars), which excluded tiny microcaps where liquidity and data quality degrade.
Second, calculate earnings yield and ROIC for every company in your universe using recent financial data—typically the most recent four quarters for EBIT and the most recent balance sheet snapshot for invested capital. Some screening services (Greenblatt's own website, for example) update these metrics quarterly or annually.
Third, rank all companies from 1 to N on each metric. A company with the highest earnings yield ranks 1 on that metric; the lowest ranks N. Similarly for ROIC.
Fourth, add the two ranks together and sort by combined rank. Companies with combined rank below 50 (out of perhaps 3,500 stocks screened) become your candidate list.
Fifth, apply common-sense filters. Remove stocks with extreme valuation or leverage that suggest data quality issues. Remove illiquid stocks you cannot realistically trade. This discretionary step prevents the screen from surfacing statistical anomalies that are impractical to trade.
Historical Performance and Limitations
Greenblatt documented that portfolios constructed from magic formula picks, rebalanced annually, significantly outperformed US market indices from 1988 to 2004. The median holding period before rebalancing was about 18 months. Annualized returns exceeded 23 percent during this period, compared to roughly 12 percent for the S&P 500.
However, performance has been inconsistent in subsequent years. The 2010s, particularly 2017–2020, saw extended periods of underperformance as growth stocks and quality factors dominated. The formula recovered somewhat in 2022–2023 as value investing rebounded. This inconsistency highlights an important reality: no mechanical screen consistently outperforms across all market environments. During bull markets favoring high growth and premium valuations, value-focused screens naturally lag. The formula performs best when value is genuinely undervalued relative to history—not always the case.
Additionally, the formula's simplicity contains limitations. It ignores balance sheet strength, relying only on ranks of two metrics. A company with dangerous leverage or deteriorating cash flow might still score well on the formula if earnings yield and ROIC are attractive. The Piotroski F-Score adds additional quality filters addressing this gap.
The formula also works better on large-cap stocks than small-caps, where earnings stability is higher and data quality more reliable. Small-cap earnings can be volatile, causing ROIC calculations to fluctuate unpredictably. The formula also struggles in industries with highly cyclical earnings—when a cyclical company's earnings are depressed, the formula may flag it as attractive right before a further decline.
Integrating the Magic Formula into Due Diligence
The magic formula should not be your entire investment process. Rather, it should be the first filter. Stocks passing the formula deserve deeper investigation into:
- Sustainability of ROIC: Is the high ROIC sustainable, or is it benefiting from temporary competitive advantages? Return on capital in a competitive market eventually gravitates toward the cost of capital.
- Earnings quality: Does the company generate cash earnings matching reported earnings? Heavy accruals suggest earnings quality issues.
- Balance sheet health: What is the debt-to-equity ratio? Is interest coverage comfortable? High leverage amplifies both returns and risks.
- Margin of safety: At what price are you buying relative to intrinsic value? The formula identifies statistical undervaluation; you must calculate economic undervaluation.
Stocks passing the formula and surviving this due diligence represent genuine opportunities, but only if your intrinsic value estimate exceeds the current price with a sufficient margin of safety.