Joel Greenblatt's Magic Formula

Does anybody know if we can create a screener for Joel Greenblatt’s “Magic Formula”? The magic formula is extensively talked about in his book “The Little Book that beats the Market”. It’s about taking the top 1000 companies and ranking them based on their Earnings Yield. A company with the best earnings yield will be ranked 1 and the one with worst will be ranked 1000. Now rank the same 1000 companies based on RoC such the the company with highest RoC will have rank of 1 and so on. Once you have the two rank list ready, we need to add the two ranks for each company in the list and arrive at the final ranking. One could consider the top 20 or 30 companies from this final ranking.



Check the

This is created by Ayush:) and his brother and you can create your own custom criteria.

Check this magic formula link -

Hi Madhu,

Here is one site

I had one more but at present not working. I have written to the author of the site and hopefully look forward to his positive reply.

Here is the site I was speaking about. Its an excellent site and easy to use. The prices are updated regularly and linked to ICICI DIRECT.

1 Like


I just wanted to know if you would be interested to share your views and opinions on Magic Formula with Money Today. I am looking for inputs from people who have used Joel Greenblatt’s methodology for investing in stocks…

You can get in touch with me on Shoaib.Zaman(at)gmail(dot)com

The magic formula is not applicable as of today for all sectors, its very dependant on the positioning and usually when you run a scan you end up with small cap and relatively unknown names, need to be double sure when taking a call on such things. I’ll give you an example: I found Ushdev International Limited one day and had to do so much on that as I realised it was a heavily indebted company with regular dividend payouts in the metal sector. Watta combination. The stock never moved from that day rill today, and in a global commodity bust, when can it move?

Well that is the reason why Greenblatt asks you to 1) Choose a certain market cap as a criteria and 2) Asks you to make sure the portfolio is diversified. Given 30 stocks which he suggests, its a good level of diversification.

1 Like

Does anybody here have a clear understanding of how to calculate ROCE as explained in the book? :thinking:

Can someone guide me on how to calculate it from the balance sheet of any company? I tried reading and searching over the internet but couldn’t find anything concrete. I will continue my search though.

Hi @Yasin_Bhojawala

You can Google for Michael mauboussin credit suisse article on how to calculate ROC. It’s pretty detailed and comprehensive.

1 Like

Thanks. I will search it.

Hi Yasin,

You can use the following method to calculate the ROC as mentioned in the book.
1st - Take Trailing Twelve Months (TTM) EBIT (latest 4 quarters)
2nd - Take the sum of Net Working Capital and Net Fixed Assets from the latest published Balance sheet numbers
3rd - Calculate 1st divide by 2nd

Hope this helps.

1 Like

Thanks for the reaponse, Hiten.

The problem is we have to calculate the Net Working capital and Net fixed assets.

How to do that? What things to be considered and what things to be ignored?

Fir exame, what about “other assets”, " Intangible assets", “financial assets”? Same with liabilities?

My question revolves around about how to calculate the Net fixed assets and Net working capital.


You might find this useful:

I am the author of the blog.

Net working capital = current assets minus current liablities
net fixed assets = gross block minus accumulated depreciation.

Intangible assets need to be excluded.

P.S. I am using capitalline database and have used it extensively for backtesting magic formula investing. I have gone back till 1998 and I am happy to share that it works even in Indian markets.


Can you share your work on forum if you dont mind ?

My backtesting
Investment start date - June 1999
Investment end date - May 2000
Investment amount - Rs.100 per month
Running the filters (as mentioned in the book) every month since June 1999 till Oct 2019.
Churning the portfolio as per the book.
Reinvesting the sales proceeds in the latest basket of stocks.
Keep doing this churning for last 20 years i.e. 240 months.
Output 19.8% CAGR.

Implying Rs.12Lac growing into Rs.3.98cr in 20 years - if all the rules are followed as per the book.


How exactly did you screen out the stocks as per formula? I couldn’t find any screener capable of doing so even with current data, forget historical data.

@VijayShetty, I use CapitalLine software to do it. Dont’t think any of the available screeners gives you proper output. In fact even after using CapitalLine need to check for change of name/merger/demerger or any other corporate actions or exceptional items. It is an easy filter but a bit tedious one to backtest and execute it.

I had also checked out CapitalLine database plans when I had wanted to try out the Magic Formula. But it’s too expensive.

yes it is. but it is quite useful, if one needs to dig deeper and also run screeners and more importantly it is reliable.