The Core Idea in One Sentence

The Magic Formula is a systematic stock-picking strategy that finds companies which are both high quality and undervalued — and has historically beaten the stock market by a wide margin.

That's it. Everything else is detail.

Why It's Called a "Formula"

The name is slightly misleading. It's not a magic trick, and it's not a complex mathematical model. The "formula" is simply a ranking system that scores every publicly traded stock on two criteria simultaneously, then tells you which stocks rank highest on both.

You buy the top-ranked stocks, hold them for a year, then repeat the process. No stock analysis. No earnings calls. No macro forecasting. The formula does the ranking; you do the buying.

The Two Criteria Explained Simply

Criterion 1: Is This a Good Business?

The formula measures business quality using Return on Capital (ROC).

Think of it this way: if you invest €100 into running a lemonade stand and earn €30 in profit, your return on capital is 30%. If your competitor invests €100 and only earns €5, theirs is 5%. You have the better business.

In the stock market, companies with high return on capital tend to have something special — a strong brand, a dominant market position, exceptional operations, or products customers are willing to pay a premium for.

High ROC = good business

Criterion 2: Is the Price Reasonable?

The formula measures valuation using Earnings Yield.

Earnings yield answers the question: for every euro I invest in this company, how many cents in annual earnings am I getting back?

If a company earns €10 million per year and you can buy the entire company for €50 million, your earnings yield is 20%. If another company earns the same €10 million but costs €200 million to buy, your earnings yield is only 5%.

High earnings yield = cheap price

Want to go deeper on both metrics? Read our in-depth guide to Earnings Yield and Return on Capital — including how to calculate them and what benchmarks to use.

Why the Combination Matters

Buying only cheap stocks often leads you to bad businesses — companies that are cheap because they're in trouble, declining, or poorly managed. These are called value traps, and they are the graveyard of many value investors.

Buying only good businesses often leads you to overpay — the market knows they're great, so everyone wants them, and the price gets bid up to a point where future returns are modest.

The Magic Formula solves this by requiring both at the same time. It systematically finds companies that are good and cheap — a combination that is statistically rare and historically profitable.

Step-by-Step: How to Use the Magic Formula

Step 1: Choose your universe
Decide which stocks to include. Joel Greenblatt suggests companies with a market cap above $50 million. Exclude financial companies (banks, insurance) and utilities, as their financials are structured differently and distort the metrics.

Step 2: Rank all stocks by Return on Capital
The stock with the highest ROC gets rank #1. The stock with the lowest gets rank #1000 (or however many stocks are in your universe).

Step 3: Rank all stocks by Earnings Yield
Do the same for earnings yield. Highest earnings yield = rank #1.

Step 4: Add the two ranks together
A company ranked #5 on ROC and #20 on earnings yield has a combined score of 25. The lower the combined score, the more attractive the stock.

Step 5: Buy from the top of the list
Select 20–30 of the highest-ranked stocks. Greenblatt recommends building the portfolio gradually — buying 5–7 stocks per month over 2–3 months — to reduce timing risk.

Step 6: Hold for one year, then rebalance
After 12 months, sell all positions and repeat the entire process with a fresh ranked list. That's the complete system.

How Many Stocks Should You Buy?

Greenblatt recommends holding 20–30 stocks simultaneously. With only 5 or 10 stocks, a single poor performer can derail your entire portfolio. With 20–30, the winners have room to carry the portfolio while the inevitable losers remain manageable.

The sweet spot: 25 positions, spread across multiple sectors.

The Most Important Rule: Don't Deviate

The single biggest mistake Magic Formula investors make is abandoning the strategy during periods of underperformance.

The strategy will underperform the market in some years. This is not a bug — it's a structural feature. The stocks the formula selects are often temporarily out of favour, which is precisely what makes them cheap. Markets sometimes take time — sometimes years — to recognise the value that the formula has already identified.

If you sell when things look bad, you capture the downside without waiting for the recovery. The strategy only works for investors who complete full cycles.

Abandoning the strategy too early is the number one reason investors fail. We analysed the most common Magic Formula mistakes and how to avoid each one.

A Quick Example

Imagine the formula ranks a mid-sized industrial company as #8 overall — #12 on return on capital and #3 on earnings yield. The company operates in a boring sector, recently missed earnings expectations due to a temporary supply chain disruption, and has been ignored by analysts for months.

It looks unappealing on the surface. But the underlying business is fundamentally strong (high ROC), and the recent selloff has made it genuinely cheap (high earnings yield). The formula doesn't care about the recent bad news — it cares about the structural quality and current price.

Twelve months later, supply chain issues resolve. Earnings recover. The stock re-rates to a more appropriate valuation. The Magic Formula investor benefits. The investor who avoided it because it "looked bad" does not. This scenario plays out repeatedly, across dozens of portfolio positions, over many years. That's the edge.

Ready to get started? Follow our step-by-step guide to building a Magic Formula portfolio from scratch.