The Magic Formula is a systematic stock portfolio investing strategy developed by Joel Greenblatt. This approach uses specific criteria to identify companies that are both highly profitable and undervalued. Greenblatt's backtests on the Magic Formula have shown that this strategy has beaten the S&P 500 Index on average, offering potential above-average returns to investors who follow it consistently.
This article will explain the Magic Formula investing strategy, including how to calculate and interpret its key screening components. We'll also highlight Greenblatt's reported results and describe how to implement the strategy. Finally, we'll summarize independent research on its effectiveness, present our own decade-long backtest, and examine the strategy's limitations and practical considerations for potential investors.
Magic Formula Investing Explained
The Magic Formula was introduced by Joel Greenblatt, founder and managing partner of Gotham Capital, which achieved 40% annualized return since its inception in 1985. Greenblatt is also an adjunct professor at Columbia Business School and co-founder of the Value Investors Club website. He presented the Magic Formula in his 2005 book, "The Little Book That Beats the Market."
The theoretical foundation of the Magic Formula is rooted in fundamental value investing principles, as Greenblatt himself explains in his book:
"What do you think would happen if we simply decided to buy shares in companies that had both a high earnings yield and a high return on capital? In other words, what would happen if we decided to only buy shares in good business (ones with high returns on capital) but only when they were available at bargain prices (priced to give us a high earnings yield)? What would happen? Well, I'll tell you what would happen: We would make a lot of money! (Or as Graham might put it, "The profits would be quite satisfactory!")"
- Joel Greenblatt in "The Little Book That Beats the Market," pg. 51
The Magic Formula applies this principle by ranking stocks based on two key metrics: return on capital (a measure of quality) and earnings yield (a measure of value). This quantitative approach identifies high-quality companies trading at bargain prices, effectively automating the process of finding "good businesses at bargain prices" that Greenblatt describes.
By applying these criteria systematically, the Magic Formula provides investors with a structured framework for building a stock portfolio designed to outperform the market over time (according to Greenblatt).
Joel Greenblatt's Magic Formula Findings
Widespread popularity followed the Magic Formula's introduction due to its impressive historical performance and relatively simple contrarian investing strategy. From 1988 to 2004, it demonstrated notable results:
- When applied to a broad universe of 3,500 U.S. stocks (over $50 million market cap), the Magic Formula returned 30.8% annually, outperforming both the S&P 500 Index (12.3%) and the equally weighted average of the same 3,500 stocks (12.2%) by 18.5% and 18.6% annually, respectively.
- When backtested on the largest 1,000 U.S. stocks (over $1 billion market cap; to avoid small-cap bias), the Magic Formula returned 22.9% annually, outperforming the equally weighted average of this 1,000-stock universe (11.7%) by 11.2% annually.
In Greenblatt's 2010 follow-up book, "The Little Book That Still Beats the Market," he extended the backtest period to 2009 and provided updated results:
- When applied to a broad universe of 3,500 U.S. stocks (over $50 million market cap), the Magic Formula strategy returned an average of 23.8% annually, outperforming the S&P 500 Index (9.5%) by 14.3% annually.
- When backtested on the largest 1,000 U.S. stocks (over $1 billion market cap), the Magic Formula strategy returned 19.7% annually, outperforming the S&P 500 Index (9.5%) by 10.2% annually.
In short, these findings continued to support the effectiveness of the Magic Formula investing strategy.
Here's a visual representation of Greenblatt's findings from his 2010 study:
Here's how a $10,000 portfolio invested in the Magic Formula screens performed compared to the S&P 500 Index, again based on findings from Greenblatt's 2010 study:
Based on these backtest findings from Greenblatt's books, it's easy to see how this stock portfolio approach, which is relatively straightforward to implement, became so popular among the value investing community. Later in this article, we'll review independent studies on its performance over various periods and markets, and conduct our own backtest over the last decade to evaluate the strategy's sustainability.
How to Implement the Magic Formula Investing Strategy
To implement the Magic Formula strategy effectively, follow these steps (as derived from Greenblatt's books):
- Step #1: Set a minimum market capitalization of $50-$100 million to ensure sufficient liquidity and stability.
- Step #2: Exclude utility and financial stocks (i.e., mutual funds, banks, and insurance companies) due to their unique regulatory environments and financial structures.
- Step #3: Exclude foreign stocks (American Depositary Receipts (ADRs)) as they were not part of Greenblatt's original study.
- Step #4: Calculate and rank companies based on highest earnings yield (EBIT / enterprise value) and highest return on capital (EBIT / (net fixed assets + working capital)). These metrics will be defined in the sections below.
- Step #5: Invest in the 20-30 highest-ranked companies, accumulating 2-3 positions per month over a 12-month period.
- Step #6: Rebalance the portfolio annually, optimizing for taxes. In tax-advantaged accounts (e.g., IRAs, 401(k)s), hold for exactly one year. In taxable accounts, sell losing stocks a few days before the one-year mark and winning stocks a day or two after.
- Step #7: Continue this process for 5-10+ years for optimal results.
By following this systematic approach, investors can implement Greenblatt's Magic Formula strategy, which aims to consistently outperform the market over the long term.
Investors can use Greenblatt's Magic Formula Investing website or other stock screeners that filter by market cap, return on capital, earnings yield, sectors, and geography to find Magic Formula stocks. The screener must also allow for ranking companies from highest to lowest based on return on capital (ROC) and earnings yield.
If return on capital isn't available as a screening criterion, Greenblatt suggests using return on assets (ROA = net income / total assets) with a minimum of 25%, and screening for the lowest price-to-earnings (P/E) ratio as a proxy for earnings yield.
He also recommends avoiding stocks with very low P/E ratios (e.g., below 5.0x) as they may indicate unusual data. Additionally, Greenblatt suggests excluding companies that have announced earnings in the past week to avoid relying on potentially misleading short-term market data.
Return on Capital
Return on capital (ROC) is one of the two key metrics used in Joel Greenblatt's Magic Formula. It measures a company's profitability and efficiency in using its capital to generate earnings. Greenblatt chose this metric to identify high-quality companies that can consistently produce strong returns on their invested capital.
The return on capital formula is shown below:
Return on Capital (ROC) = EBIT / (Net Working Capital + Net Fixed Assets)
where:
- EBIT = Earnings Before Interest and Taxes
- Net Working Capital = Current Assets - Current Liabilities
- Net Fixed Assets = Total Assets - Current Assets - Goodwill
Greenblatt's ROC formula provides a clearer picture of a company's profitability and efficiency in using its capital, addressing limitations found in more common metrics like return on equity (ROE) or return on assets (ROA). It helps identify companies that produce high profits efficiently, often indicating strong competitive advantages and effective management.
The formula uses EBIT (aka; operating income) instead of net income, allowing for a fair comparison between companies with different tax rates and debt levels. EBIT shows how well a company generates profits from its core business operations.
In the denominator, the sum of net working capital and net fixed assets represents the tangible capital employed by the business.
Net working capital reflects the capital needed to fund the company's day-to-day operations, taking into account the company's need to finance its receivables and inventory while benefiting from the interest-free financing provided by payables.
Net fixed assets represents the long-term capital investments required to run the business, such as property, plant, and equipment (PP&E). . Notably, Greenblatt excludes goodwill as it's a historical cost that doesn't require regular replacement, providing a more accurate view of ongoing capital requirements.
Earnings Yield
Earnings yield is the other key metric used in Joel Greenblatt's Magic Formula. It measures a company's profitability relative to its value, helping to identify undervalued companies. Greenblatt chose this metric to find attractively priced stocks with strong earnings power.
The earnings yield formula is shown below:
Earnings Yield = EBIT / Enterprise Value
where:
- EBIT = Earnings Before Interest and Taxes
- Enterprise Value = Market Capitalization + Total Debt - Cash and Equivalents
The earnings yield metric reveals how much a business earns compared to its full purchase price, offering a more useful valuation than the commonly used price-to-earnings (P/E) ratio.
Like return on capital (ROC), the earnings yield formula uses EBIT (instead of net income) in the numerator, to allow for a fair comparison between companies with different debt levels and tax rates.
In the denominator, enterprise value is used instead of just market capitalization (i.e., share price × shares outstanding). Enterprise value represents the total cost of acquiring the entire business, including equity, debt, and preferred stock, while accounting for cash that could be used to offset this cost. This provides a more accurate picture of a company's total value and puts companies with different capital structures on an equal footing when comparing earnings yields.
Get Our 50-Question Stock Analysis Checklist!
After researching hundreds of stocks, we built this 50-question checklist to guide your analysis and help you avoid costly mistakes.
Download ChecklistThus, by using EBIT and enterprise value, earnings yield provides a clearer picture of a company's profitability relative to its overall valuation.
Magic Formula and Investment Performance
To assess whether the Magic Formula works in practice, we'll first examine independent research conducted outside of Joel Greenblatt's books. This research spans different markets and time periods, providing a broad understanding of the strategy's effectiveness, potential improvements, and various nuances.
Following this review of independent research, we'll perform our own backtest over the last ~10 years to evaluate the strategy's recent performance. This analysis will offer up-to-date results and insights into how the Magic Formula has fared in current market conditions.
Our examination of independent research and our own backtest will help determine whether the Magic Formula's framework translates into real-world success across various markets and time periods.
Independent Research on the Magic Formula
The table below shows five independent studies on the Magic Formula, along with Greenblatt's findings, including their key parameters and specified returns. We've only included studies with at least 10 years of backtested data to ensure reliability.
Several observations can be made from this table and the accompanying studies:
- Returns have generally decreased over time. Greenblatt's original study showed the highest return of 30.8%, while more recent studies show lower returns. No subsequent study was able to achieve returns close to Greenblatt's original findings.
- The Magic Formula consistently outperformed its respective market benchmarks across different countries and time periods.
- Key findings suggest that the Magic Formula works best in less efficient markets and during periods of market stress.
- Interestingly, the Magic Formula appears to work in markets outside the U.S. (namely European markets), despite Greenblatt never testing or claiming it would work internationally.
- The excess returns vary significantly across studies, ranging from 2.7% to 18.5%, which might be due to different market conditions, time periods, or slight variations in implementation.
It's also worth mentioning that these studies observed several potential improvements to the Magic Formula investing strategy. These include using a smaller portfolio of 15-25 stocks, replacing EBIT with operating cash flow, considering free cash flow yield as a value metric, and incorporating a momentum filter. The momentum factor, in particular, could help mitigate the risk of cheap stocks becoming cheaper.
These modifications indicate that adapting the original approach may improve its effectiveness in current market conditions.
Magic Formula Backtest Results
To backtest the Magic Formula results, we'll go back 10+ years from the time of writing, from Jan 1, 2014 to July 3, 2024, using Portfolio123 to perform the backtesting.
The image below shows the default return on capital (ROC) and earnings yield formulas and calculations used on Portfolio123, with weights set to 50% ROC and 50% earnings yield, ranked from highest to lowest:

The Portfolio123 formulas closely mirror Greenblatt's original Magic Formula. For earnings yield, there's no difference. The main distinction is in the ROC calculation, where Portfolio123 simplifies the denominator to focus on specific tangible assets (net plant, receivables, and inventory) rather than the broader net working capital and net fixed assets used in the original formula. This slight modification may result in minor variations in stock selection, but the overall approach remains consistent.
Below are the Magic Formula stock selection rules:

For this Magic Formula backtest, we're excluding NOOTC (non-over-the-counter stocks), which are typically less liquid and more volatile. We're filtering for market cap over $100M, excluding foreign stocks, and excluding financial, utilities, and real estate sectors, as per Joel Greenblatt's instructions in his books on the Magic Formula. These exclusions help focus on more stable, liquid stocks in sectors that are more comparable using the Magic Formula metrics.
Below are the backtest settings for our analysis:

These backtest settings are important for understanding the simulation, as described below:
- Max # Stocks of 30: Limits the portfolio to the top 30 ranked stocks, as Greenblatt recommends in his books.
- Slippage of 0.0%: Slippage refers to the difference between the expected price of a trade and the price at which the trade is actually executed. Setting the slippage to zero assumes no price impact when buying or selling stocks.
- Rebalance Frequency of 52 Weeks: Aligns with Greenblatt's recommendation for annual rebalancing.
- Price of Next Close: Assumes trades are executed at the next day's closing price.
- Carry Cost of 0.0%: Assumes no cost for holding positions, which is realistic for most brokerages today.
- Long Weight of 100%: Indicates a fully invested long-only portfolio.
- Max Pos % of 0.0%: Allows for equal weighting of positions, as Greenblatt suggests.
- Rank Tolerance of 0.0: Rank tolerance determines how closely the portfolio adheres to the exact ranking of stocks. Setting the rank tolerance to zero ensures strict adherence to the ranking system.
It's important to note that this backtest doesn't consider trading costs (although these are non-existent for most brokerages now), doesn't follow the optimized tax selling for losses and winners as Greenblatt teaches, and keeps slippage at zero. However, the backtest is still relatively close to what a real portfolio would experience if investing in Magic Formula stocks over the last ~10 years.
Below is a visual representation of how the Magic Formula has performed from Jan 1, 2014 to July 3, 2024, compared to the S&P 500 Index (represented by the SPY):
Clearly, the Magic Formula strategy has significantly underperformed the S&P 500 over the tested period, with the gap widening particularly after 2020 (post COVID-19 recession).
Here's a table that summarizes the key monthly statistics, comparing the Magic Formula screen to the S&P 500 Index:
Again, the Magic Formula screen has severely underperformed the S&P 500 over this period, with a negative total return of -20.52% compared to the S&P 500's 261.89%. The strategy also exhibited higher volatility (standard deviation of 20.11% vs. 15.08%) and a much larger maximum drawdown (-54.59% vs. -33.72%). The negative Sharpe and Sortino ratios also indicate poor risk-adjusted returns for the Magic Formula strategy.
Related: How to Measure Your Portfolio's Risk-Adjusted Performance
Here's a table that breaks down the details of the transactions and relevant performance metrics year-over-year in our backtest:
Key observations from this table include:
- High turnover rates (often above 70%) indicate significant portfolio churn, which is to be expected for anyone following the Magic Formula investing strategy.
- The strategy showed high volatility, with annual standard deviations often exceeding 30% (standard deviations above ~20% are generally considered high for stock portfolios). Greenblatt mentioned in his books that higher volatility is to be expected and may unsettle many investors.
- If an investor began practicing the Magic Formula investing strategy on January 1, 2014, when our backtest began, there wasn't a single year in which the Magic Formula outperformed the S&P 500 Index.
The TraderFox Joel Magic Formula Index is a total return index where dividends are reinvested, based in Germany. They provide a graphic on their website that shows excess returns (or lack thereof) since 1999 for every single year:
Similar to our findings from our backtest, the Magic Formula strategy has regularly underperformed the S&P 500 over the last ~10 years, with this underperformance attributable to several likely factors:
- Value Stock Underperformance: The past decade has seen growth stocks, particularly in the technology sector, outperform value stocks significantly.
- Low Interest Rate Environment: Historically low interest rates have favored growth stocks and companies with higher debt levels. The Magic Formula tends to avoid highly leveraged companies due to its focus on return on capital, which can be negatively impacted by high debt levels.
- Changing Market Dynamics: The rise of passive investing and algorithmic trading may have reduced some of the inefficiencies that the Magic Formula previously exploited. Not to mention, if more investors are following the Magic Formula investing strategy, it could potentially reduce its effectiveness as the market inefficiencies it "exploits" become arbitraged away (which Greenblatt mentioned in his books as well).
- Sector Bias: The exclusion of financial, utility, and real estate sectors, combined with the formula's tendency to select companies with high return on capital and low valuation multiples, may have led to unfavorable sector allocations in the changing market environment.
Even when considering shorter time frames like the last three or five years, the Magic Formula still underperforms, suggesting that these issues are not just a temporary phenomenon but potentially a more fundamental challenge to the strategy's effectiveness in the current market environment.
When compared to the S&P SmallCap 600 Index from Jan 31, 1998, to June 28, 2024, which is arguably a better benchmark for the Magic Formula due to its focus on smaller companies, the Magic Formula outperformed this index until late 2019/early 2020, when the small-cap index began to surpass it by a sizable margin:
Although the Magic Formula investing strategy appears more viable over longer periods, it requires consistent adherence (i.e., following the strategy every year without deviation). Given the increased volatility and standard deviation compared to the S&P 500 and S&P SmallCap 600 indices, and its underperformance over the last decade, it's difficult to recommend the strategy for the average retail investor.
Limitations of Magic Formula Investing
The Magic Formula offers a straightforward approach to value investing and stock portfolio construction, but it has limitations that primarily stem from its simplicity. Below is a comprehensive list of the inherent drawbacks in the Magic Formula investing strategy, some of which Joel Greenblatt mentioned in his books:
- Limited Metrics: Considers only return on capital and earnings yield, overlooking other financial factors such as debt levels, cash flow, and capital expenditures.
- Backward-Looking Data: Relies on trailing 12-month financials, which may not reflect current business conditions or predict future performance.
- Debt Blindness: Doesn't differentiate between companies with different debt levels, potentially overlooking financial risk.
- Accounting Variability: Different accounting practices, especially in inventory valuation and depreciation, can skew the formula's results.
- Value Trap Vulnerability: May identify companies with temporarily depressed earnings as bargains, ignoring structural business challenges.
- Cyclical Sensitivity: May incorrectly identify cyclical companies at peak earnings as high-quality businesses.
- Small-Cap Bias: Tends to favor smaller companies due to their often higher returns on capital, which may carry higher risk and liquidity issues.
- Sector Imbalance: The strategy can lead to concentrated positions in certain sectors, especially if one sector is depressed relative to others, reducing diversification. Additionally, the strategy is not suitable for financials, utilities, and, in many cases, real estate.
- Frequent Rebalancing: Annual portfolio turnover can lead to higher transaction costs and potential tax inefficiencies, even if following Greenblatt's tax-optimized selling recommendations.
- High Turnover: High annual turnover limits compound growth potential as winners aren't allowed to run.
- Active Management: Requires regular rebalancing, ongoing stock screening for Magic Formula candidates, and strategic tax selling, demanding significant time and effort from investors.
- Higher Volatility: The strategy tends to produce portfolios with higher volatility compared to broad market indices, which may be uncomfortable for many investors.
Consistently outperforming the market over the long term has been proven to be a challenging objective for most investors. In reality, unlike what Greenblatt's books may suggest, there are many more qualitative and quantitative factors that investors need to analyze before even considering the possibility of beating the market.
However, the Magic Formula can still serve as a useful screening tool for identifying potentially undervalued, high-quality companies, providing a starting point for more comprehensive fundamental analysis.
The Bottom Line
Magic Formula investing is a systematic stock investing strategy developed by Joel Greenblatt. It focuses on two key metrics: return on capital (measuring profitability) and earnings yield (assessing valuation).
The strategy involves ranking stocks based on these criteria, applying specific filters such as market capitalization and excluding financials, utilities, and, in many cases, real estate, buying 20-30 of the highest-ranked stocks, and regularly rebalancing the portfolio every year.
Greenblatt's original backtests showed impressive results, with the strategy outperforming the S&P 500 by 18.5% annually when applied to a broad universe of stocks. For larger-cap stocks, it still beat the market by 11.2% per year. These results sparked significant interest in the investment community.
Independent academic research has generally supported the effectiveness of the Magic Formula, albeit with lower outperformance than Greenblatt's original findings. Studies across various markets and time periods have shown the strategy's ability to generate excess returns, particularly in less efficient markets and during periods of market stress.
However, more recent backtests, including our own 10-year analysis, suggest the Magic Formula has struggled to outperform the market consistently in the past decade. This may be due to value stock underperformance, changing interest rate environments, evolving market dynamics, and sector biases inherent in the strategy. Key limitations, such as its reliance on historical data, limited metrics, and small-cap bias, may have also contributed to this underperformance.
Thus, while the Magic Formula remains a useful screening tool for identifying potentially undervalued stocks, relying on it solely as a "market-beating" portfolio strategy may no longer be realistic in today's market environment.

