Fórmula Joel
Back to Learn

Joel Greenblatt's Magic Formula

Reading time: ~15 min

Introduction

In 2005, investor and professor Joel Greenblatt published "The Little Book That Beats the Market," a short and accessible book that introduced the public to a quantitative strategy called the Magic Formula. The book quickly became a bestseller and an essential reference for value investors around the world.

Greenblatt's premise is elegantly simple: if you could find excellent companies selling at bargain prices, your long-term returns would be extraordinary. The Magic Formula is the systematization of this idea — a mechanical, replicable approach that any investor can follow.

Who is Joel Greenblatt?

Joel Greenblatt is an American investor, hedge fund manager, professor, and author. He is the founder of Gotham Capital, an investment fund that achieved average annual returns of about 40% over 20 years (1985–2005). Greenblatt is an adjunct professor at Columbia Business School, one of the most prestigious finance institutions in the world — the same school where Benjamin Graham, the father of value investing, taught decades earlier.

Beyond "The Little Book That Beats the Market," Greenblatt authored other influential books, including "You Can Be a Stock Market Genius" and "The Big Secret for the Small Investor." His work is recognized for democratizing investment concepts that were previously restricted to Wall Street professionals.

What is the Magic Formula?

The Magic Formula is a quantitative investment strategy based on two fundamental principles of value investing:

  1. Buy cheap — find stocks that are undervalued by the market relative to what they actually earn.
  2. Buy quality — prioritize companies that are efficient at generating profits from invested capital.

The genius lies in the combination: by ranking all stocks in the market by these two criteria and summing the positions, the formula automatically identifies companies with the best quality-to-price ratio.

The Two Key Metrics

Earnings Yield(Earnings Yield)
Earnings Yield = EBIT / Enterprise Value (EV)

What it measures: Earnings Yield shows how much a company earns relative to its total price (including debt). It's like asking: "If I bought the entire company, what annual return would I get?"

Why EBIT? Greenblatt uses EBIT (Earnings Before Interest and Taxes) instead of net income because EBIT allows comparing companies regardless of their capital structure or tax regime. Two companies with the same EBIT may have very different net incomes due to debt or tax benefits, but EBIT shows the true operational cash-generating power.

Why Enterprise Value? Enterprise Value includes market capitalization plus net debt. This is fairer than using just the stock price because it considers debt — a "cheap" company loaded with debt isn't necessarily a bargain.

In practice: An Earnings Yield of 15% means the company generates $15 of operating profit for every $100 of its total value. The higher the Earnings Yield, the cheaper and more attractive the stock.

Return on Capital(Return on Capital)
ROC = EBIT / (Net Fixed Assets + Working Capital)

What it measures: Return on Capital shows how efficiently a company converts its investments into profit. It's like asking: "For every dollar invested in the business, how much profit does the company generate?"

Net Fixed Assets: Includes factories, equipment, real estate, and other tangible assets needed to operate the business, minus depreciation. It represents the company's long-term investment.

Working Capital: It's the difference between current assets (like inventory and accounts receivable) and current liabilities (like accounts payable). It represents the cash needed to maintain day-to-day operations.

In practice: An ROC of 50% means the company generates $50 of operating profit for every $100 of tangible capital invested in the business. Companies with high ROC have competitive advantages — strong brands, patents, network effects, or superior operational efficiency.

How the Ranking System Works

The Magic Formula's mechanics follow a step-by-step ranking process:

1

Rank by Earnings Yield

All eligible stocks are sorted from highest to lowest Earnings Yield. The cheapest stock gets rank 1, the second cheapest rank 2, and so on.

2

Rank by Return on Capital

The same process is done for Return on Capital. The most efficient company gets rank 1.

3

Sum the ranks

For each stock, the two ranks are added together. A company ranked 5th in Earnings Yield and 10th in Return on Capital will have a combined score of 15.

4

Select the top stocks

Stocks with the lowest combined score are the winners — they represent the best combinations of low price and high quality. Typically, the top 20-30 stocks form the portfolio.

Practical example: Imagine Company A is ranked 1st in Earnings Yield (very cheap) but 50th in Return on Capital (mediocre quality). Its score is 51. Company B is ranked 10th in both criteria. Its score is 20, making it a better pick — a good combination of price and quality.

Stocks Excluded from the Formula

Greenblatt explicitly excludes two sectors. A third one falls out as a consequence, and it is worth understanding why:

Financial Companies

Banks, insurers, brokerages, and other financial institutions are excluded because the nature of their balance sheets makes EBIT and Enterprise Value metrics less meaningful. The leverage inherent to the financial sector distorts the calculations.

Utility Companies

Electric, water, gas, and sanitation companies are excluded because they operate in highly regulated environments. Their profits are controlled by the government, making the formula's metrics less relevant for identifying value.

Real Estate Companies

Malls, developers, and real estate investment trusts (REITs) are left out too — and here the reason is historical. Greenblatt does not name the sector, because under the classification in force when he wrote the book, in 2005, real estate sat inside “Financials”. Only in September 2016 did it become a sector of its own, the first created since 1999. Excluding “financials” back then already removed REITs along with it.

The mechanical reason is the same as for banks: a REIT is leveraged by design and depreciates property heavily, distorting EBIT and Enterprise Value in the same way.

In the simulator, these three sectors appear in the filters already checked and cannot be unchecked: this is the formula as the book defines it, not a preference of ours. Every other sector is yours to choose.

Additionally, ADRs (foreign stock receipts), companies with very low market capitalization (micro caps), and companies with incomplete financial data are also typically excluded to ensure result quality.

Historical Performance

The backtesting results presented by Greenblatt are impressive:

MetricMagic FormulaS&P 500
Average annual return (1988–2004)~30.8%~12.4%
Test period17 years (1988–2004)
$10,000 invested in 1988~US$1.000.000~US$73.000

These numbers show that the Magic Formula would have turned $10,000 into approximately $1,000,000 in 17 years, while the same amount invested passively in the S&P 500 would have reached about $73,000. Subsequent studies in different markets around the world — including Europe, Japan, and emerging markets — have shown consistently superior results.

Important notice: Past results do not guarantee future performance. Backtesting has limitations such as survivorship bias and market conditions that may not repeat. The strategy may have periods of underperformance relative to the market that can last months or even years.

Why Does the Formula Work?

The Magic Formula's effectiveness rests on three pillars:

  1. Short-term market inefficiency: The market frequently overreacts to temporary negative news, pushing the price of good companies down. The formula captures these opportunities.
  2. Investor behavioral biases: Most investors follow the crowd, buy trendy stocks, and sell in panic. A mechanical approach eliminates these emotions.
  3. Mean reversion: Temporarily undervalued companies tend to return to their fair value over time, generating gains for those who bought cheap.

Practical Tips for Applying the Formula

✓

Diversify

Buy 20 to 30 stocks from the top of the ranking to reduce the risk of any individual company.

✓

Rebalance annually

Greenblatt recommends holding each stock for about a year, then rebalancing the portfolio with new ranking positions.

✓

Be disciplined

The formula will suggest unpopular stocks ignored by the market. Trust the process, not your emotions.

✓

Be patient

The strategy may underperform the market for 1-2 consecutive years. Superior results typically appear over 3-5+ year horizons.

✓

Start with simulation

Before investing real money, use our simulator to test the strategy with historical data and build confidence.

✓

Consider taxes

Depending on your jurisdiction, selling stocks at a profit may have tax implications. Plan rebalancing considering the tax impact.

Limitations and Caveats

Like any investment strategy, the Magic Formula has limitations you need to be aware of:

  • Not infallible: The formula can select companies that are cheap for good reasons ("value traps") — companies in structural decline whose prices keep falling.
  • Periods of underperformance: In strong growth bull markets, the formula may lag indices like the S&P 500. Greenblatt acknowledges that in 5 out of every 12 months, the formula may lose to the market.
  • Accounting data looks backward: The metrics use historical financial data, which may not reflect the company's current or future situation.
  • Adaptation to Brazilian market: Different markets have unique characteristics (lower liquidity, sector concentration, currency) that may affect results. The formula was originally tested with American stocks.
  • Requires emotional discipline: The biggest risk is the investor abandoning the strategy after a bad period, exactly when it's about to recover.

Ready to test the Magic Formula?

Use our free simulator to apply the Magic Formula with real data from the Brazilian and American markets. See how your portfolio would have performed over the years.

Open the Simulator