Most stock screens ask you to pick ten filters and then argue with yourself about the thresholds. Magic formula investing goes the other way. It uses just two numbers, ranks every company on both, adds the ranks and buys the ones at the top. That is the whole idea. Joel Greenblatt laid it out in The Little Book That Beats the Market in 2005, and it has been backtested, copied and criticised ever since.
This guide walks through what the formula actually measures, how the ranking works on a small example with made-up companies, what independent tests have found, and where it trips people up when they try to run it on Indian stocks. We will keep the maths simple and the caveats honest.
In this article
What magic formula investing actually is
Greenblatt’s pitch was blunt: buy good companies at cheap prices, and do it mechanically so your feelings don’t get a vote. “Good” is measured by return on capital. “Cheap” is measured by earnings yield. A company that scores well on both is, in his framing, a decent business on sale.
Both Investopedia’s explainer and the Wikipedia summary of the book’s rules describe the same two ratios:
- Earnings yield = EBIT ÷ enterprise value
- Return on capital = EBIT ÷ (net fixed assets + working capital)
EBIT is operating profit, earnings before interest and taxes. Enterprise value is market capitalisation plus debt minus cash, roughly what it would cost to buy the whole business, lenders included. Net fixed assets are the plant, machinery and property the business runs on, after depreciation. Working capital is the money tied up in day-to-day operations.
Why these two ratios and not P/E and ROE?
This is the part people skip, and it is the clever bit.
The usual P/E ratio uses net profit, which is after interest and tax. Two companies with identical factories and identical sales can show very different P/Es just because one carries more debt. EBIT over enterprise value puts them on the same footing. Debt sits in the denominator through EV, and interest is kept out of the numerator. You are comparing the business, not the balance sheet structure.
Return on capital works the same way. Return on equity can be pumped up with leverage. Greenblatt’s version asks a plainer question: for every rupee locked into machines and working capital, how much operating profit comes out? As Robert Andrew Martin’s write-up of the strategy puts it, defining capital this way isolates the assets that actually generate operating income, instead of the usual debt-plus-equity view.
The formula doesn’t ask whether a company is exciting. It asks two dull questions: how much does this business earn on the capital it uses, and how much are you paying for those earnings?
The rules, step by step
Here is the procedure as the Wikipedia article summarises it from the 2005 book:
- Set a minimum market capitalisation (the book’s example was usually above $50 million).
- Exclude utilities and financial companies.
- Exclude foreign companies listed through American Depositary Receipts.
- Calculate earnings yield (EBIT ÷ EV) for every company left.
- Calculate return on capital (EBIT ÷ (net fixed assets + working capital)).
- Rank all companies on each ratio, highest first, and combine the ranks.
- Invest in the 20 to 30 highest-ranked companies, building up 2 to 3 positions a month over 12 months.
- Rebalance once a year: sell losers one week before the one-year mark and winners one week after it.
- Keep at it for the long run, five to ten years or more.
Why exclude banks and NBFCs? Their balance sheets don’t fit the formula. For a lender, debt is raw material, not financing, and “net fixed assets plus working capital” means very little. Utilities are dropped for a similar reason: regulated returns and heavy borrowing distort both ratios. In Indian terms, that knocks out a big chunk of the Nifty straight away.
The sell-timing rule in step 8 was built around US tax treatment, where holding beyond a year changes how gains are taxed. Indian holding-period rules and tax rates are different and change from time to time, so if you adapt the strategy here, set the rebalance timing around current Indian rules rather than copying the US schedule.
A worked example with five hypothetical companies
Let us rank a small universe. These companies are invented and the figures are illustrative, chosen only to show the mechanics. All figures are in ₹ crore.
| Company (hypothetical) | EBIT | Enterprise value | Net fixed assets | Working capital |
|---|---|---|---|---|
| Alpha Cements | 420 | 5,200 | 2,900 | 300 |
| Bharat Pumps | 180 | 1,500 | 600 | 250 |
| Coastal Software | 310 | 9,800 | 400 | 500 |
| Deccan Textiles | 95 | 700 | 900 | 150 |
| Eastline Logistics | 260 | 2,400 | 1,300 | -100 |
A sixth name, a hypothetical NBFC called Kaveri Finance, would be thrown out before any maths, because financial companies are excluded.
Now the two ratios and their ranks (1 is best):
| Company | Earnings yield | EY rank | Return on capital | ROC rank | Combined score |
|---|---|---|---|---|---|
| Alpha Cements | 8.1% | 4 | 13.1% | 4 | 8 |
| Bharat Pumps | 12.0% | 2 | 21.2% | 3 | 5 |
| Coastal Software | 3.2% | 5 | 34.4% | 1 | 6 |
| Deccan Textiles | 13.6% | 1 | 9.0% | 5 | 6 |
| Eastline Logistics | 10.8% | 3 | 21.7% | 2 | 5 |
Take Bharat Pumps. Earnings yield is 180 ÷ 1,500 = 12.0%, the operating profit you get per rupee of enterprise value. Return on capital is 180 ÷ (600 + 250) = 180 ÷ 850 = 21.2%, the operating profit per rupee of capital tied up in the business.
Eastline Logistics is interesting. Its working capital is negative, which means suppliers and customers effectively fund part of its operations. Capital employed drops to 1,300 − 100 = 1,200, and ROC comes out at 21.7%. Negative working capital flatters ROC, and that is not always bad, but you want to know why it is negative before you trust it.
Look at the extremes. Coastal Software has the best return on capital by a mile, 34.4%, but at an EV of ₹9,800 crore its earnings yield is just 3.2%. The market already knows it is a great business and has priced it that way. Deccan Textiles is the reverse: the cheapest stock on earnings yield at 13.6%, but a weak 9.0% return on capital. Cheap, maybe for a reason.
The formula rewards neither. Bharat Pumps and Eastline Logistics tie at the top with a combined score of 5, because they are reasonably good and reasonably cheap. That is exactly the type of company Greenblatt was after. Coastal and Deccan tie at 6. Alpha Cements, middling on both, comes last.
Ties are common in real screens. Martin’s backtest code, for instance, normalised each rank by the maximum rank before adding them. You can also break ties on earnings yield alone, or on a secondary filter. Just pick a rule and stick to it, because changing it each year is how discretion sneaks back in.
What the backtests say
Greenblatt’s own numbers were spectacular. According to Martin’s summary, the book’s table shows the formula returning an annualised 33% from 1988 to 2004, against 14% for the S&P 500. Investopedia notes that independent researchers have generally found outperformance in backtests, but returns vary with the method.
Martin ran his own US backtest, buying two top-ranked stocks a month and holding each for a year, ending up with 24 equally weighted names. Between July 2003 and December 2015 the strategy returned an annualised 11.4% versus 8.7% for the S&P 500. Better than the index, but nowhere near the book’s figure. He also found the portfolio was almost always more volatile than the market and had steeper drawdowns.
Studies in other markets, as collected on Wikipedia, broadly point the same way. A 2017 Swedish study found long-term outperformance but also periods of short-term underperformance and noticeably higher volatility. A 2009 Nordic study suggested the formula works best as a screening tool rather than applied dogmatically. For India, Wikipedia cites a 2022 paper that found a 30-stock magic formula portfolio averaged 13.9% from July 2012 to February 2020, against 9.3% for the BSE Sensex. That is one paper over one stretch of time, so treat it as encouraging rather than proof.
The backtests mostly agree on two things at once: the formula has tended to beat the index over long stretches, and it has made people miserable for months or years along the way.
That second point matters more than the first. A strategy that lags the Nifty for two years while your friends’ index funds pull ahead is hard to stick with, and the rules only work if you stick with them.
Running it on Indian stocks: practical problems
The idea travels well. The data doesn’t always.
Getting clean inputs. EBIT, enterprise value, net fixed assets and working capital all need to come from the latest annual or trailing figures. Screener tools differ in how they compute EV (some ignore lease liabilities, some use gross debt, some net) and that can reshuffle rankings. Use one data source consistently.
Cyclicals at the peak. Metals, cement and commodity chemicals often look cheapest exactly when their earnings are at a cyclical high. One year of peak EBIT makes earnings yield look generous right before profits fall. Some investors average EBIT over a few years to soften this.
Holding companies and conglomerates. A company whose value sits mostly in listed subsidiaries or investments won’t show it in EBIT. The formula can badly misjudge these.
Accounting quality. The formula takes reported numbers at face value. It has no way to spot aggressive revenue recognition or a stretched balance sheet. Pairing it with a distress check such as the Altman Z-score, or a cash check like free cash flow yield, can weed out names whose profits are not turning into cash. Studies cited on Wikipedia found that cash-flow-based variants of the formula sometimes did better than the plain EBIT version.
Liquidity. A low market-cap cut-off pulls in thinly traded small caps. Buying into them is easy; getting out at a fair price is not. Setting a higher floor helps.
Concentration. Twenty to thirty stocks spread across whatever the screen throws up can still end up heavy in one or two sectors. Decide in advance whether you will cap sector weights. Position sizing and drawdown planning, covered in our guide to risk management in trading, apply here just as much as they do to short-term trades.
Where the magic formula fits, and where it doesn’t
The name oversells it. There is nothing magic about two ratios. What the formula really offers is discipline: a repeatable way to find businesses that earn well on their capital and are not priced for perfection, plus a rule that forces you to keep buying when the strategy is out of favour.
It is a poor fit if you want results within a year, if you cannot sit through long spells of underperformance, or if you are not willing to check the companies it throws up for obvious red flags. Many investors use it as a starting list rather than a buy list, which is close to what that Nordic study recommended.
If you try it, keep a written record of every rebalance and the reasons for any exception you make. After a couple of years, that record will tell you more about whether the method suits you than any backtest can.
Quick recap
- Magic formula investing ranks companies on earnings yield (EBIT ÷ EV) and return on capital (EBIT ÷ (net fixed assets + working capital)), then adds the ranks.
- Financials and utilities are excluded because their balance sheets don’t fit the ratios.
- The book’s rules call for 20 to 30 top-ranked stocks, bought 2 to 3 a month, rebalanced yearly and held for five to ten years or more.
- Independent backtests have generally found outperformance, but far below the book’s claim, with higher volatility and long dry spells.
- In India, watch for cyclical peak earnings, holding companies, illiquid small caps and inconsistent data definitions.
Disclaimer: This article is for education only and is not investment advice or a recommendation to buy or sell any security. The companies and figures in the worked example are hypothetical. Past backtest results do not guarantee future returns. Please consult a SEBI-registered investment adviser before making investment decisions.

Leave a Reply
Join the conversation
Commenting is open to registered readers. Sign up with just your email — no password needed, and it takes under a minute.
Sign up to comment Log in