For centuries, investors have searched for a systematic, foolproof method for finding high quality, undervalued stocks. Many value investing strategies are complex, requiring deep dive financial statement analysis that intimidates the individual investor. But in 2005, hedge fund manager Joel Greenblatt introduced a refreshingly simple, rules based system in his book, The Little Book That Still Beats the Market. He called it Magic Formula Investing.
The premise is deceptively simple: Buy good companies at cheap prices.
The “Magic Formula” is a quantitative value investing strategy that distills a complex analysis into two easy to calculate financial ratios. It aims to automate the difficult process of finding high quality businesses that are temporarily trading at bargain prices. Does it truly work? Historical performance suggests that when applied correctly, this systematic strategy can indeed deliver market beating returns over the long term.

This guide will explain the two core metrics of the Magic Formula, provide the formulas you need, and give you the step by step plan for implementing this powerful stock screening strategy in your own portfolio.
What is Magic Formula Investing? The Rules Based System
Magic Formula Investing is a systematic method of selecting stocks based on two easily calculable financial ratios that measure a company’s quality and its price relative to its earnings.
It belongs to the school of value investing, pioneered by Benjamin Graham, but simplifies the selection process by replacing subjective analysis with a clear, replicable quantitative screen. The result is a mechanical process designed to identify and exploit market inefficiencies—specifically, the tendency of great businesses to occasionally be sold too cheaply.
The Origin: Joel Greenblatt’s Philosophy
Joel Greenblatt, the founder of Gotham Capital, created the strategy based on the common sense notion that successful investing means buying more than you pay for. His philosophy simplifies the core tenets of value investing:
- Look for High Quality Companies: Companies that generate high returns on the capital they invest.
- Look for Undervalued Companies: Companies that are currently cheap compared to their earnings power.
By creating a formula that ranks stocks purely on these two criteria, Greenblatt designed a system that removes investor emotion and bias from the selection process.
The Two Pillars of the Formula: Quality and Price
The “magic” in the formula comes from the elegant combination of two core metrics, representing the fundamental dichotomy of Quality vs. Price in value investing.
Pillar 1: Measuring Quality with Return on Capital (ROC)
The first pillar measures business quality or efficiency. Greenblatt chose Return on Capital (ROC) because it demonstrates how effectively a company uses the total capital required to run its operations—including both equity and debt—to generate profits. This measure of capital efficiency is often superior to common metrics like Return on Equity (ROE).
Formula for ROC:
Return on Capital (ROC) = Earnings Before Interest and Taxes (EBIT) / (Net Working Capital + Net Fixed Assets)
What it means: A high ROC (e.g., 50% or more) signals a high quality business with a competitive advantage (a “moat”). It means the company is generating significant operational profit without having to continually sink large amounts of money into developing new revenue streams.
Automate the “Magic”: Get Real-Time ROC & Quality Rankings 📈
Stop wasting hours digging through 10-Ks to calculate a business’ ROC.
InvestingPro’s Data Explorer provides pre-built Return on Invested Capital (ROIC) and EBIT metrics for over 135,000 stocks.
Use our professional stock filters to instantly see which companies have a ROC of 25% or higher over both 1-year and 5-year periods.
Identify “moat” businesses in seconds, not hours.
Pillar 2: Measuring Cheapness with Earnings Yield (EY)
The second pillar measures cheapness or valuation. The Earnings Yield Formula is used because it focuses on the company’s operating earnings relative to the cost of buying the entire business, making it ideal for systematic comparison.
Formula for EY:
Earnings Yield (EY) = Earnings Before Interest and Taxes (EBIT) / Enterprise Value (EV)
What it means: Earnings Yield is essentially the inverse of the Price to Earnings (P/E) Ratio.
- A high P/E implies a low Earnings Yield (expensive stock).
- A high Earnings Yield implies a low valuation (cheap stock).
By using Enterprise Value (EV) instead of simple market capitalization, the formula captures the true cost of acquiring the business, including its debt and cash, providing a more accurate measure of value.
The Step by Step Implementation Process
The true power of the Magic Formula lies in its systematic application. It removes the need for subjective analysis; you simply follow the steps.
Ranking and Scoring the Stocks
- Filter the Universe: Start with a large universe of companies (usually 3,500+ US stocks) but exclude financial and utility companies (because their financial structures distort the core metrics) and often micro cap stocks (due to liquidity issues).
- Rank by ROC: Rank all remaining companies from best to worst based on their Return on Capital (e.g., the company with the highest ROC gets Rank #1).
- Rank by EY: Rank the same companies from best to worst based on their Earnings Yield (e.g., the company with the highest EY gets Rank #1).
- Create the Composite Rank: Add the two ranks together (ROC Rank + EY Rank). The stock with the lowest combined score is considered the best stock to buy (e.g., a stock ranked #1 for ROC and #5 for EY has a total score of 6).
- Select the Portfolio: Select the top 20 to 30 stocks with the lowest composite ranks.
Diversification and the Holding Period
The Magic Formula is not a single stock strategy; it is a systematic investment strategy that relies on a large basket of stocks and patience.
- Diversification: Buying 20 to 30 stocks is necessary because, while the overall strategy tends to work, some individual stocks in the portfolio are guaranteed to fail or underperform. The winners must outweigh the losers.
- Holding Period: You must hold each stock for one full year. After one year, sell the losers and any winners that no longer qualify for the formula, and replace them with new picks from the latest Magic Formula screen. This systematic rebalancing ensures you are always rotating into new, freshly identified “cheap and good” stocks.
Performance and The Behavioral Advantage
Why does this simple formula work where others fail? The strategy has historically demonstrated market beating returns, which Greenblatt attributes not to its complexity, but to human nature.
Historical Data: Why the Magic Works
Greenblatt’s backtesting of the strategy over many years showed that a portfolio created using the Magic Formula consistently outperformed major indices like the S&P 500, often significantly.
The formula works primarily because it systematically buys a diversified portfolio of stocks that are currently out of favor. Markets are inefficient; companies often get cheap for irrational reasons or temporary setbacks. The formula exploits this by forcing the investor to buy these stocks when they are cheap and hold them until they are fully valued.
The Importance of Patience and Discipline
The biggest barrier to success with the Magic Formula is not the math—it is the psychology. As a quantitative value investing strategy, it will inevitably experience long periods of underperformance, lagging behind the broader market (especially during growth driven bull markets).
Greenblatt himself notes that the “magic” works because most investors lack the patience and discipline to stick with the formula during those difficult times. The strategy requires a commitment to the system, holding the stocks for the full one year period, even when the market seems to be telling you the formula is broken.
The systematic process forces you to sell your losers and buy new, cheap stocks every year, which is essential to achieving long term outperformance.
Build Conviction: Consult WarrenAI on Your “Magic” Picks 🛡️
The hardest part of the Magic Formula is holding through volatility. Gain the conviction you need with WarrenAI, your personal AI financial analyst. Ask WarrenAI to do a “Deep Dive” into any Magic Formula pick to see its Financial Health Score (ranked from 1 to 5). When the score is “Great,” you’ll have the peace of mind to hold through the noise.
Turn speculation into data-driven discipline.
Limitations and Adjustments for the Modern Investor
While powerful, the Magic Formula has clear boundaries:
- Exclusions: Never apply the formula to financial stocks (like banks and insurance companies) or utility stocks; their unique balance sheets and regulatory models render the ROC and Earnings Yield calculations meaningless.
- Stock Size: While the formula originally included micro caps, most modern screening tools recommend sticking to companies with a market capitalization above $50 million to ensure sufficient liquidity.
- Time Horizon: This is a long term strategy (5 to 10 years minimum). Trying to time the market or adjusting the portfolio frequently will destroy the systematic advantage.
Conclusion
Magic Formula Investing is one of the most powerful and accessible systematic investment strategies available to the individual investor. It provides a simple, rules based answer to the fundamental problem of how to buy high quality businesses at a cheap price.
By diligently applying the two core metrics—Return on Capital (Quality) and Earnings Yield (Price)—and committing to the necessary discipline of a diversified portfolio and a one year holding period, you are putting a proven, market beating system to work for you.
The true “magic” is not in the formula itself, but in the discipline it requires, forcing you to overcome your own psychological biases and systematically exploit the market’s temporary inefficiencies. Start researching your first batch of Magic Formula stocks today and commit to the long term journey.
Institutional-Grade Analysis, Immediate Results 🔎⏱️
The market moves fast, so make sure your insights move faster. Access WarrenAI’s instant technical analysis alongside the full suite of InvestingPro tools, including proprietary fair value calculations, advanced stock screening, financial health scores and AI-powered ProPicks.
Unlike other AIs that only analyze numbers, WarrenAI identifies visual patterns (candlestick formations, support levels, and trends) that make or break trades.
What WarrenAI Does Instantly: 🤖
🔎 Technical Summary: Provides a plain-language analysis of the current market structure, including trend, momentum, and key S/R levels.
⚠️ Risk Identification: Points out potential downside risks or failed signals the chart is flashing.
💡 Opportunity Spotlight: Highlights confirmed buy/sell signals based on institutional-grade algorithms, giving you a definitive edge.
🗺️ Trading Plan: Receive specific entry, stop-loss, and profit target prices based on technical analysis and risk/reward calculations that spot opportunities humans often miss.
Stop wasting time doing everything manually. Leverage WarrenAI to gain an instant edge to trade any market – across crypto, forex, commodities, stocks, ETFs and indices. Capture opportunities wherever they emerge, filtering hours of analysis into a concise, actionable report.
Don’t get left behind. Start your InvestingPro membership today.
