How to Use the Magic Formula by Joel Greenblatt
How to Use the Magic Formula by Joel Greenblatt
Joel Greenblatt is not a typical hedge fund manager. He ran Gotham Capital for two decades, generating annualized returns that most fund managers would retire on after a single decade. He also wrote a short book explaining exactly how he thought about investing β and then published a simplified version of his approach that anyone could use.
That simplified approach is the Magic Formula.
In The Little Book That Still Beats the Market, Greenblatt laid out a two-factor ranking system that combines value and quality into a single screen. The concept is simple enough to explain in five minutes but robust enough to have generated serious academic and practitioner interest. Here's how it works, what the evidence shows, and what you need to know about its limitations.
The Two Factors: Earnings Yield and Return on Capital
The Magic Formula ranks stocks on two dimensions simultaneously:
Factor 1: Earnings Yield (EBIT / Enterprise Value)
This is a measure of cheapness. Earnings before interest and taxes (EBIT) divided by enterprise value (market cap plus net debt) tells you how much operating earnings you're getting per dollar of total capital invested in the business.
This is similar to a price-to-earnings ratio, but Greenblatt prefers it for two reasons. First, EBIT strips out the distortions of different capital structures β a company with lots of debt has high interest expense that would depress net income, making it look expensive on a P/E basis even if the underlying business is cheap. Using EBIT and EV puts all businesses on the same footing regardless of how they're financed. Second, enterprise value accounts for the debt that comes with the business, so you're measuring the true cost of buying the whole enterprise.
A high earnings yield means you're getting a lot of operating earnings per dollar paid. A low earnings yield means you're paying up for relatively thin current earnings.
Factor 2: Return on Invested Capital (ROIC)
This is a measure of quality. ROIC β calculated as EBIT divided by net working capital plus net fixed assets β tells you how much operating profit the business generates per dollar of tangible capital it employs.
A high ROIC means the business earns exceptional returns on the capital it deploys. These are the kinds of businesses that can reinvest earnings at high rates and compound value over time β think businesses with pricing power, strong brand recognition, or structural competitive advantages. A low ROIC means the business is capital-intensive and earns mediocre returns even when things are going well.
How the Ranking System Works
Here's the elegance of the Magic Formula: it doesn't try to pick the cheapest stocks or the highest-quality stocks separately. It ranks all stocks simultaneously on both dimensions and adds the ranks together.
Let's say you're screening 3,000 stocks:
- A stock ranks #45 on earnings yield (very cheap) and #150 on ROIC (pretty good quality) β combined rank of 195
- Another stock ranks #200 on earnings yield (moderately cheap) and #10 on ROIC (exceptional quality) β combined rank of 210
- A stock ranks #1 on earnings yield (incredibly cheap) but #2,900 on ROIC (terrible business) β combined rank of 2,901
The formula prioritizes stocks that score well on both factors. Pure cheapness without quality gets penalized (you avoid value traps). Pure quality without cheapness also gets penalized (you avoid expensive compounders). The sweet spot is businesses that are simultaneously cheap and good.
Greenblatt's Documented Track Record
In The Little Book, Greenblatt presented backtested results for the Magic Formula from 1988 to 2004. Over that period, he found that a portfolio of the top-ranked Magic Formula stocks (updated annually) significantly outperformed the broader market.
His research showed that the top-ranked stocks using his formula returned substantially more annually than market benchmarks over the backtested period, with the outperformance being more consistent over rolling multi-year periods than in any single year. He was careful to note that the formula would underperform the market in some individual years β sometimes significantly β and that investors who couldn't tolerate those periods of underperformance would abandon it before the long-term gains materialized.
Academic research has broadly supported the underlying logic. The combination of value (as proxied by earnings yield) and quality (as proxied by ROIC or similar measures) has been documented as a factor that outperforms over time in multiple markets and time periods. This combination is related to what researchers call the "quality-minus-junk" factor and is related to work by researchers including Novy-Marx (2013), who documented the predictive power of gross profitability.
How to Run the Screen Today
Greenblatt set up a dedicated website β magicformulainvesting.com β that runs the screen continuously against U.S. stocks above a minimum market cap threshold. As of this writing, the site is operational and free to use (registration required).
Here's how to use it:
- Go to magicformulainvesting.com and create a free account.
- Select your minimum market cap. Greenblatt recommends starting with a market cap filter of at least $50 million to exclude very small, illiquid stocks. Many investors prefer higher thresholds ($100M+) to improve liquidity.
- Select the number of top-ranked stocks to view β typically 20β50.
- Review the list. The site automatically excludes utilities and financial companies (banks, insurance) because their capital structures make ROIC calculations misleading.
For investors who want to build their own screen with more flexibility, platforms like Gurufocus, Finviz Pro, and Portfolio123 all allow you to replicate or modify the Magic Formula using EBIT/EV and ROIC filters.
Greenblatt's recommended implementation in the book involves:
- Buying approximately 20β30 stocks per year spread across the top of the ranking list
- Holding each position for roughly 12 months before reevaluating
- Systematically replacing stocks that fall out of the top rankings with new entrants
The discipline of systematic annual rebalancing β rather than trying to time individual entries and exits β is a core part of the implementation.
Limitations: Why It Got Harder
Greenblatt himself acknowledged in later editions of the book that the widespread adoption of his formula creates a challenge: when enough people run the same screen, prices adjust and the edge diminishes.
There's a broader pattern in quantitative investing that researchers call "factor crowding." Once a systematic strategy becomes well-known and well-funded, arbitrage capital flows toward it. The cheap-and-good stocks identified by the formula get bid up by investors using the formula, reducing the discount. Over time, the "cheap" characteristic becomes less cheap.
This doesn't mean the underlying logic is wrong β businesses that earn high returns on capital and trade at reasonable valuations probably still outperform over long periods. But the magnitude of the outperformance may be smaller than Greenblatt's original backtests showed, because the backtest period preceded widespread awareness of the strategy.
Several studies published after 2010 showed more mixed results for the original Magic Formula parameters, particularly for large-cap stocks where institutional coverage is dense. The strategy appears to retain more of its efficacy in smaller market cap ranges where institutional attention is thinner.
Other practical limitations:
Year-to-year volatility. Greenblatt explicitly warned that the formula would trail the market in roughly one-third of all calendar years. Investors who experience a two or three-year stretch of underperformance β which is common β often abandon the strategy just before it recovers.
Excluded sectors. Financials and utilities are excluded, which means the screen automatically avoids two major sectors of the economy.
Accounting quality. EBIT can be manipulated through aggressive revenue recognition or deferred expense treatment. The formula takes reported numbers at face value; investors who don't review underlying financial statements may end up in stocks with flattering reported earnings that don't reflect economic reality.
No qualitative filter. The formula doesn't distinguish between a high-ROIC business that's durable and one that's peaking. A company can have exceptional historical ROIC precisely because it's in an industry at a cyclical high β lumber, semiconductors, energy. That high ROIC may not persist.
The Right Way to Think About It
The Magic Formula is best understood as a starting point, not a complete system.
As a screening tool, it efficiently surfaces a list of businesses that are simultaneously inexpensive and historically high-quality β a useful filter that eliminates most of the investment universe quickly. As a standalone strategy, the evidence suggests it works better with additional qualitative overlay than as a pure mechanical implementation.
Greenblatt himself runs a more sophisticated quantitative strategy through Gotham Funds that builds on the same conceptual foundation with more variables. The "little book" version is the simplified, accessible version of a deeper framework.
What makes the Magic Formula enduringly valuable is the conceptual insight it encodes: buying quality at a reasonable price β systematically, broadly, and patiently β beats buying either quality at any price or cheapness regardless of quality. That insight doesn't expire even if specific factor premiums get competed away.
Looking for tools to screen stocks by earnings yield, ROIC, and other value metrics? valueofstock.com has the screeners and analysis frameworks you need to implement disciplined, systematic investing strategies.
Get Weekly Stock Picks & Analysis
Free weekly stock analysis and investing education delivered straight to your inbox.
Free forever. Unsubscribe anytime. We respect your inbox.