← st-ox

Magic Formula Screener

Joel Greenblatt's idea fits in one sentence: buy good businesses at bargain prices. The Magic Formula turns that into a ranking built on exactly two numbers — and st-ox computes it from the book's own definitions, across twelve markets.

The two numbers

Return on capital — how good
EBIT ÷ (net working capital + net fixed assets)

How much operating profit the business earns on the tangible capital it needs to run.

Earnings yield — how cheap
EBIT ÷ enterprise value

How much operating profit you get for what buying the whole company would cost, debt included.

Rank every company on each (1 = best), add the two ranks, and the lowest totals win.

Where it comes from

Greenblatt described the formula in The Little Book That Beats the Market, published in 2005 and written, as he put it, so that his children could understand it. The argument is the one Benjamin Graham and Warren Buffett made before him: a share is a piece of a business, and the way to do well is to own good businesses bought for less than they are worth. What Greenblatt added was a way to do that mechanically, without reading a single annual report — two numbers, two rankings, one sum.

The deliberate simplicity is the point. There is no weighting to argue about, no forecast to get wrong and no judgement call about which company is "better". A company either ranks well on both measures or it does not.

The two numbers, and why these ones

Return on capital — is this a good business?

A good business earns a lot on the money tied up in it. Return on capital measures exactly that: operating profit (EBIT, earnings before interest and taxes) divided by the capital the business needs to operate — its net working capital (the money tied up in stock and unpaid customer bills, less what it owes suppliers) plus its net fixed assets (factories, equipment, stores).

Two choices here are worth noticing. It uses tangible capital, so goodwill from past acquisitions neither flatters nor punishes the figure; a company is judged on what it needs to keep running, not on what it once paid for something. And it uses EBIT rather than net income, so a company's debt level and tax rate don't change how good the underlying business looks.

Earnings yield — is it cheap?

Earnings yield is EBIT divided by enterprise value — the market value of the shares plus the company's net debt. It is the operating profit you would get, each year, for what it would cost to buy the entire company outright and settle its borrowings.

This is a better yardstick than the familiar price-to-earnings ratio for the same reason as before: two companies with identical businesses and identical share prices can have very different P/E ratios simply because one carries more debt. Enterprise value puts the debt on the bill, and EBIT is measured before the interest on it.

How the ranking works

The formula never asks whether a return on capital of 30% is "good" or an earnings yield of 8% is "cheap". It only asks how each company compares with the others. Here is the whole method on five made-up companies:

CompanyCo.Return on capitalROCEarnings yieldEYROC rankROC #EY rankEY #Sum
B35%9%224 · 1st
D12%15%415 · 2nd
A60%3%156 · 3rd
C25%6%347 · 4th
E8%7%538 · 5th

Notice who wins. A is the best business on the list and D is the cheapest, but neither comes first. B does, by being good at both. That is the formula's whole character: it steers away from wonderful companies at silly prices and from cheap companies that are cheap for a reason, and towards the overlap.

On a real market the same arithmetic runs over hundreds of companies at once. At the time of writing (September 2026), about 1,600 US companies clear the market-cap floor, and roughly a thousand are left to rank once financials, utilities and loss-makers are removed.

Who is in the pool

✓Market value above the per-market floor — $2B on the US market, set per exchange elsewhere
✓Ordinary shares on their primary listing — no preferred shares or duplicate listings
✓Positive operating profit — a company losing money at the operating level has no earnings yield to buy
✓Positive enterprise value, and every figure the two numbers need
✕No financial companies — banks, insurers, asset managers
✕No utilities

The two exclusions are Greenblatt's own. For a bank, borrowing is the raw material of the business rather than a way of financing it, so enterprise value and working capital stop meaning anything, and a bank would rank absurdly well or badly depending on how its figures happened to be reported. Utilities earn returns that are largely set by their regulators, which distorts return on capital in a similar way.

A company missing any figure the formula needs is left out rather than guessed at. A ranking is only as honest as its worst input.

What is deliberately missing

Each row still carries the dip-buy signal dot used everywhere else in the app — but expect plenty of yellow and red here. That signal is built to warn about falling trends, and the formula selects for them on purpose. It is context on timing, not a verdict on the ranking.

How st-ox computes it

The formula is simple on paper and fiddly in practice, because the figures it needs aren't all published in the form it wants. What st-ox does, and where it has to approximate:

Why some return-on-capital figures look absurd

You will see values in the thousands of percent. They are not errors. A software company or a drug licensor often has negative working capital (counted as zero) and very few fixed assets, so its operating profit is divided by almost nothing. The formula is designed to reward businesses that need little capital to grow, and these are the extreme case. Because the ranking uses each company's position rather than the size of its number, 3,000% counts for no more than simply being ranked first.

Where st-ox differs from the book

What Greenblatt himself warns

The book is unusually candid about the method's weaknesses, and they are the most useful part of it:

What it still cannot see

The formula reads last-reported figures and nothing else, which is both its strength and its blind spot:

Greenblatt's answer was to own enough names that no single one of these matters much. That is why the list is thirty long, and why picking the three you like best from it is a different strategy from the one in the book.

Related

The same engine runs four other presets — see the GARP screener for the quality-growth version and how the multi-factor scoring works, or the penny stock screener for the microcap end of the market. For the big picture on whether the market as a whole is cheap, see the Buffett Indicator.

Frequently asked questions

What is the Magic Formula?
It is the stock-ranking method Joel Greenblatt described in The Little Book That Beats the Market (2005). Every company in the universe is ranked on two numbers: return on capital, which measures how good the business is, and earnings yield, which measures how cheap it is. The two ranks are added together and the companies with the lowest totals are the ones to buy. There are no other factors and no weighting. Greenblatt excluded financial companies and utilities, and suggested holding 20 to 30 of the top names for about a year each.
How are return on capital and earnings yield calculated?
Return on capital is operating profit (EBIT) divided by the tangible capital the business needs to operate: net working capital plus net fixed assets. Earnings yield is EBIT divided by enterprise value, which is the market value of the shares plus net debt. Both use EBIT rather than net income so that companies with different amounts of debt and different tax rates can be compared on the same footing, and return on capital uses tangible capital so that goodwill from past acquisitions neither flatters nor punishes the figure.
Does the Magic Formula still work?
The book's backtest covered 1988 to 2004 and showed results far ahead of the market. Results in the years since the book was published have been well below that backtest, and Greenblatt himself warned that the strategy can trail the market for one to three years in a row. Nobody can promise it will beat the market in future. What it does offer is a disciplined, mechanical way to find profitable companies trading at low prices, which is a sensible starting point for research whether or not it outperforms.
Why are banks, insurers and utilities excluded?
Because the two numbers do not mean the same thing for them. For a bank, debt is the raw material of the business rather than a way of financing it, so enterprise value, EBIT and working capital lose their usual meaning, and a bank would look either absurdly cheap or absurdly poor depending on how the figures happened to be reported. Utilities are regulated businesses whose returns are effectively set by regulators, which distorts return on capital in a similar way. Greenblatt removed both groups, and st-ox does the same.
Why is return on capital sometimes thousands of percent?
Because the formula measures return on tangible operating capital, and some businesses need almost none. A software company or drug licensor whose customers pay in advance often has negative working capital, which is counted as zero, and very little in fixed assets. Dividing its operating profit by a very small capital base produces a very large percentage. That is the formula working as intended — it is designed to reward businesses that need little capital to grow — and because the ranking uses the order rather than the size of the number, a figure of 3,000% counts no more than being ranked first.
Why do so many results trade below their 200-day average?
Because the formula is designed to find good businesses the market has marked down, and those are usually in a downtrend. The other st-ox screens only show stocks above their 200-day moving average; this one deliberately does not, because that filter would remove much of what the formula picks. The same reason explains why many rows carry a yellow or red dip-buy signal dot: that signal is built to warn about falling trends, and the formula does not use timing at all.
Is the Magic Formula screener free?
Yes. The Magic Formula is one of the presets in st-ox's Smart Screen, which is free with no ads, and it runs on twelve markets: the US, London, Paris, Frankfurt, Amsterdam, Milan, Switzerland, Stockholm, Copenhagen, Helsinki, Tokyo and Hong Kong. It is an idea generator and a starting point for your own research, not investment advice or a recommendation to buy any stock.

Run the Magic Formula in st-ox

Pick a market, choose the Magic Formula preset, and get the top 30 by combined rank — with both ranks, operating profit, enterprise value and the dip-buy signal on every row. Free, no ads.

Open st-ox free →

For information and educational purposes only. Not investment advice, and not a recommendation to buy or sell any security. Past results of any strategy, including the backtest described in Greenblatt's book, do not predict future returns. Screen results are a starting point for your own research.