Dados B3Guides › Magic Formula

Guide · Quantitative strategy

How to use the Magic Formula (Greenblatt) on B3 stocks

In "The Little Book That Beats the Market", Joel Greenblatt proposed a two-question screen: is the company good (high return on capital) and cheap (a lot of earnings per unit of price)? The Magic Formula ranks each stock on both factors and sums the ranks. Lower sum, better.

The two factors

It isn't a single number — it's two independent rankings, then added together:

Earnings yield = EBIT ÷ EV  ·  EV = market cap + net debt

The earnings yield measures how cheap the company is: how much operating profit (EBIT) it delivers for each unit of the acquisition price (the EV, which includes the debt you'd inherit). Higher is cheaper.

ROIC = return on invested capital

The ROIC measures how good the company is: how much it earns on the capital it actually employs in the business. Higher is a better business. Greenblatt used earnings yield and return on capital precisely because one answers "is it cheap?" and the other "is it worth owning?".

How Dados B3 computes it (auditable, point-in-time)

We rank companies by earnings yield (highest to lowest) and, separately, by ROIC (highest to lowest). Each company gets two positions; we add them. The lowest sum ranks best on the Magic Formula.

EBIT comes from the standardized CVM account; EV uses market cap + net debt; and the price is point-in-time — the first trading session after the balance sheet was actually published, no look-ahead (see /guias/backtest). Every number carries its source account, so you can check it piece by piece.

The filters — and why they exist

Real ranking examples (2025)

Companies ranking well on the B3 Magic Formula today, with both factors laid open:

TickerCompanyEarnings yield (EBIT/EV)ROIC
WHRL3Whirlpool21%88%
PLPL3Plano & Plano19%47%
IGTI3Iguatemi18%15%
LEVE3Mahle Metal Leve16%42%
PSSA3Porto Seguro15%57%
POMO3Marcopolo14%20%
CURY3Cury12%101%

Note the two-axis logic: WHRL3 pairs cheap (EY 21%) with an excellent business (ROIC 88%). CURY3 has a sky-high ROIC (101%) but is no longer that cheap (EY 12%). It's the sum of the two ranks that decides — not one factor alone.

The trap — what the screen does NOT see

The Magic Formula is a mechanical screen, not a recommendation. Three cautions:

How Dados B3 helps

EBIT, EV, net debt and ROIC all come with the source CVM account and a point-in-time price. The Magic Formula ranking comes ready and auditable — you can reproduce every position from the raw data. See /ranking and the /metodologia.

Create a free key