Quantitative Investing · Value Strategy
Magic Formula Investing: How Joel Greenblatt's Strategy Works
The Magic Formula is a systematic value strategy that ranks all stocks by two criteria: how cheaply priced they are (earnings yield) and how well they deploy capital (return on capital). Buy the highest-ranked stocks, hold for a year, repeat. Joel Greenblatt backtested it at 30%+ annual returns over 17 years.
The Magic Formula ranks every stock by its combined earnings yield and return on capital, then buys the top-ranked companies. Earnings Yield = EBIT / Enterprise Value. Return on Capital = EBIT / (Net Working Capital + Net Fixed Assets). Rank all stocks on each metric, add the ranks, buy the 20–30 lowest combined-rank stocks. Developed by Joel Greenblatt in “The Little Book That Beats the Market” (2005).
What Is the Magic Formula?
The Magic Formula is a quantitative stock-selection system introduced by Joel Greenblatt in his 2005 book The Little Book That Beats the Market. The core insight is straightforward: stocks that are both cheap relative to their earnings and efficient at generating returns on the capital they deploy tend to outperform the market over time. The formula operationalizes that idea into a mechanical ranking system that requires no subjective judgment.
Greenblatt designed it as a retail investor's alternative to complex DCF models. Rather than predicting every variable of a business, the Magic Formula asks only two questions: is this company generating good returns on the money it invests, and am I paying a reasonable price for those returns? Companies that score well on both dimensions go into the portfolio. The strategy rotates annually, selling positions after one year (to harvest favorable tax treatment on short-term losses and long-term gains) and replacing them with the next set of top-ranked stocks.
The formula deliberately excludes financials and utilities, whose balance sheets make the return-on-capital metric meaningless. It typically targets companies with market caps above a minimum threshold to ensure liquidity — Greenblatt used $50M in the original book, though practitioners often filter for $100M–$500M or higher in practice.
The Two Pillars: Earnings Yield and Return on Capital
Every Magic Formula stock passes through two independent filters. Together they capture the essence of value investing: buying quality businesses at a discount.
| Metric | Formula | What It Measures |
|---|---|---|
| Earnings Yield | EBIT / Enterprise Value | How cheap the stock is — the operating earnings you get per dollar of enterprise value paid |
| Return on Capital | EBIT / (NWC + Net Fixed Assets) | How good the business is — the operating return generated on the tangible capital actually deployed |
Earnings yield uses Enterprise Value (not market cap) in the denominator to account for debt, making it comparable across companies with different capital structures. Return on capital uses tangible operating assets only — not total assets or book equity — so it captures how well the core business deploys real capital rather than financial engineering.
The earnings yield guide explains the EBIT/EV metric in depth — why it is preferred over P/E for cross-company comparisons and how to interpret high and low readings by sector. The ROIC guide covers the return-on-capital family of metrics; Greenblatt's version is a simplified variant that uses tangible operating assets rather than the more comprehensive NOPAT/invested-capital approach.
How to Calculate Both Metrics: Worked Example
Below is a step-by-step calculation using a hypothetical mid-cap industrial company, Precision Parts Co., to illustrate exactly how both metrics are computed and combined into a Magic Formula rank.
Precision Parts Co. (illustrative) — Magic Formula calculation
- EBIT (trailing twelve months)
- $180M
- Enterprise Value (Market Cap + Net Debt)
- $1,440M
- Earnings Yield: $180M / $1,440M
- 12.5%
- Net Working Capital (CA − Non-interest-bearing CL)
- $220M
- Net Fixed Assets (PP&E net of depreciation)
- $410M
- Tangible Capital Employed: $220M + $410M
- $630M
- Return on Capital: $180M / $630M
- 28.6%
With a 12.5% earnings yield (cheap relative to peers) and a 28.6% return on capital (high quality), Precision Parts Co. would rank highly on both dimensions. If its combined rank placed it in the top 20–30 stocks across the full universe, it would be a Magic Formula buy. Use our Magic Formula screener to run this calculation across the full investable universe.
Track Record and Academic Research
Greenblatt's original backtest covered 1988–2004 and showed the Magic Formula returning approximately 30.8% annualized versus the S&P 500's 12.4% over the same period. Even the worst decile of Magic Formula stocks outperformed the index in that test. Greenblatt updated the analysis in a 2010 paper published in the Journal of Portfolio Management, confirming the results held across different time windows.
Independent academic work on value-quality combinations supports the underlying thesis. Fama and French's quality factor (profitability) and value factor (book-to-market or earnings-to-price) together explain a substantial portion of equity return dispersion. The Magic Formula is essentially a simplified two-factor model that combines cheap price (earnings yield) with high quality (return on capital) without the complexity of a full five-factor regression.
Post-publication performance has been more mixed. Studies covering 2003–2015 found the strategy still outperformed over full market cycles but with higher tracking error and more painful underperformance periods than the original backtest suggested. Value investing broadly underperformed from 2017 through early 2022 before recovering — a period that affected the Magic Formula in line with the value factor generally. The consensus among practitioners is that the strategy remains valid as a systematic value screen but requires patience across multi-year holding periods and mental fortitude to stay invested during drawdowns.
How to Use the Magic Formula Screener
Running the Magic Formula in practice involves four steps. The Basis Report Magic Formula screener handles the data retrieval and ranking automatically, but understanding each step helps you evaluate results critically.
- Step 1: Set your universe. Filter for a minimum market cap (commonly $100M–$500M depending on your portfolio size) and exclude financials (banks, insurers, REITs) and utilities. These sectors use leverage as an operating tool, making return-on-capital calculations misleading.
- Step 2: Rank by earnings yield. Calculate EBIT / Enterprise Value for every stock in the universe. Rank from highest to lowest (cheapest = rank 1). A 15%+ earnings yield is exceptional; 8–12% is typical for good-value mid-caps.
- Step 3: Rank by return on capital. Calculate EBIT / (Net Working Capital + Net Fixed Assets) independently. Rank from highest to lowest (most efficient = rank 1). Companies with 25%+ ROC are demonstrating genuine competitive advantages.
- Step 4: Combine the ranks. Add each company's earnings-yield rank and return-on-capital rank. Buy the 20–30 stocks with the lowest combined rank score. Hold for approximately one year, then rerun the screen and rotate.
Limitations and When the Magic Formula Underperforms
- Value factor headwinds can last years. The Magic Formula is a value strategy. During prolonged growth-led markets (2017–2021 is the clearest example), cheap, high-ROC stocks can underperform expensive, high-growth tech stocks for extended periods. The strategy requires a 3–5 year horizon minimum to give the mean-reversion thesis time to work.
- Earnings quality is ignored. The formula uses reported EBIT. It does not adjust for one-time gains, revenue-recognition manipulation, or aggressive accruals. A company with inflated earnings will appear cheap on EBIT/EV until the manipulation unwinds. Combining the Magic Formula with a quality screen like the Piotroski F-Score or the Beneish M-Score can help filter out accounting manipulation.
- Return on capital uses tangible assets only. Intangible-heavy businesses (software, pharmaceuticals, consumer brands) carry most of their value off-balance-sheet. Their tangible capital base is small, so their computed ROC looks artificially high — they will rank well on that metric even if the underlying economics are mediocre.
- Tax-loss harvesting assumes specific holding periods. Greenblatt's annual rotation strategy is designed around U.S. tax rules (hold losers just under one year for short-term capital losses; hold winners just over one year for long-term capital gains). The tax benefit disappears in tax-advantaged accounts or non-U.S. jurisdictions, reducing the gross return advantage.
- Capacity constraints at scale. The Magic Formula works best in small-cap and mid-cap space. Institutional investors with billions to deploy find that the most attractive positions are too illiquid to build meaningful positions in, pushing them into large-cap stocks where the edge is thinner.
Magic Formula vs. Other Quantitative Strategies
The Magic Formula is not the only systematic value-quality strategy. Here is how it compares to two popular alternatives for investors who screen quantitatively.
| Strategy | Signal | Strength | Weakness |
|---|---|---|---|
| Magic Formula | EY rank + ROC rank | Simple, transparent, long tested track record | Ignores earnings quality; value-factor dependent |
| Piotroski F-Score | 9-point financial health score | Explicitly penalizes deteriorating fundamentals and balance-sheet manipulation | Does not rank by valuation; must be paired with a price screen |
| Graham Number | Max buy price from EPS × BVPS | Conservative net-asset-based value floor; intuitive price ceiling | Does not capture capital efficiency; misleading for asset-light businesses |
In practice, many systematic investors combine screens: use the Magic Formula to generate a candidate list, then apply Piotroski F-Score to filter out companies with deteriorating fundamentals. This two-stage approach preserves the valuation upside while reducing exposure to the value traps the formula cannot detect on its own.
Analyzing a specific stock? Generate a free equity report →