Select Stocks Using the Joel Greenblatt Magic Formula

Published: September 20, 2018 at 9:42 am

Last Updated on

Version 3 of the freefincal excel stock screener now includes the Joel Greenblatt Magic Formula Screener. This quickly allows you to select quality companies available at attractive prices. The screening can be done index-wise. sector-wise and market-cap-wise. The financial data is obtained from Value Research and the multiple screens available have been created with the help of two young stock ninjas – Krishna Kishore and Indraneal Balasubramanian. This post is inspired by a comment from Anees Rao who participated in the PaisaVaisa podcasts on financial independence along with Anupam Gupta and myself

Before we begin, do check out SEBI registered fee-only advisor Avinash Luthria‘s article on Mint: Three financial risks to plan for before retiring

Joel Greenblatt, a hedge fund manager and Professor at Columbia University introduced the magic formula for choosing good companies at low prices using a combination of high earnings yield and high return on invested capital in his book Little Book that Beats the Market. The formula has been extensively tested by many and has come out trumps. This is one example of such a study. This is a simple guide to invest using the magic formula.

Note: The magic here will work only over the long term and every year. So please understand the pros and cons of the method used for screening. You will have to exclude financial and banking stocks. You must be ready to sell and buy new stocks.

Joel Greenblatt Magic Formula Screener for Indian Stocks

How does the Joel Greenblatt Magic Formula Screener work?

Step 1: Compute  Earnings yield = EBIT / Enterprise value.

Here EBIT is Earnings before interest, tax (we use Earnings before interest, tax, depreciation and amortization EBITDA) and is a measure of a operating performance.  The enterprise value (EV) is a modification of the market capitalization and is a measure of a companies value (including debt and cash). A high earnings yield represents an undervalued stock (performance exceeding perceived value). VR stock listing offers EV/EBITDA. So I have used the reciprocal.

Step 2: Compute Return on invested capital (ROCE). This tells you how efficiently the company is utilizing its capital and is defined as EBITDA/Capital employed. A high ROCE represents a quality business.

VR gives EV and EV/EBITDA in its stock listing. So this can be used to determine EBITDA. Capital employed can be defined as total assets minus current liabilities and this is the same as net worth. VR gives net worth. So this gives the ROCE.

Step3: Rank the companies as per earnings yield. Higher the yield, better the rank. So 1st rank corresponds to the company with the highest earnings yield.

Step 4: Rank the companies as per ROCE. Higher the ROCE, the higher the rank. So 1sr rank goes to the company with the highest ROCE.

Step 5: Add the two ranks and choose 30 stocks with the highest combined rank. The screener will do this at a click of a button.

Value Research suggests looking for companies with consistently high ROCE (>20% for past 5Y). In fact, it would be better to choose companies with consistently high combined magic formula rank. You can do both with the freefincal stock analyzer (but this will be one stock at a time)

This is a screenshot. As you will notice, not many stocks have both high earnings yield and high ROCE.

implementation of the Joel Greenblatt Magic Formula Screener for Indian Stocks

Features of the freefincal stock screener

I have always wanted to build a stock screener and hence this sheet. I am well aware that they are pretty good online screeners available. What is being offered is a choice, and I am confident that the Excel screener will evolve into something at least useful to a small group of users, if not as a unique tool. I seek your help in evaluating this sheet and in making it better.

Those who are comfortable with using Excel’s data sort options can screen in several ways with this sheet.

For users who are not familiar with the sort options, several simple stock screens are incorporated after consultations with Krishna Kishore and Indraneal Balasubramanium – cognicrafter. Check out these:

Guest post by Krishna: A Guide to Understanding Stock Screeners

Guest post by Indraneal: How to Build a Stock Screener

They are my go-to guys when it comes to stock analysis. They are capable of simplifying valuation quite efficiently for a low-attention-span dummy like me.

Excel Stock Screener: How to use Video

This video may help build your own screens.

Capitalisation-wise stock screening

This is the screenshot of the cap-wise stock screener

Hate ads but would like to support the site? Subscribe to our ad-free newsletter and get beautifully formatted full articles delivered to your inbox!

Excel Stock Screener

In order to use the tool, one must first log in to Value Research via Excel. Necessary steps are given below.

As you can see there are five sample screens which can be used independently or combined with each other.  Other sort options can also be enabled from the datasheet.


The green cells refer to stocks with current PE lesser than median PE (5Y or 3Y -duration listed).

The following screens are available

Piotroski Score – Higher the score, better the strength of the company and confidence in its operation. VR article on the score.

Altman-Z Score – Higher the score, lower the probability of bankruptcy. This is how VR computes it

Modified C-Score – lower the score, lower the chance of accounting manipulation. This is how VR computes C-Score.

Debt to Equity – a measure of debt used by the company to operate. Lower is typically less risky. Less than one, preferred by many.

PEG – The PE ratio divided by annual EPS growth.  Less than one could represent undervalued stock.

Enterprise Multiple EV/EBITDA – Compares EBITA,  the earnings before interest, taxes, depreciation and amortization with EV, the enterprise value. Low values could mean undervaluation.  However, ‘low’ is sector dependent.

Current PE less than Median PE – Median is the mid-point of a distribution of values (PEs in this case). Maybe used for solid companies (thanks Krishna).

Current PE more than Median PE – Maybe used for small companies which are expanding, provided other checks are in place.

Sector-wise stock screening

Excel-stock-screener -3

In this case, only essential checks are retrieved.

Index-wise screening

You can now select one of the 50 BSE/NSE indices and screen the stocks from within.

Joel Greenblatt Magic Formula Screener

In all of the above screens, the magic formula is implemented as a macro button. Once you click it , it will take you to the data with combined magic formula rank highlighted.

Download the freefincal Excel Stock Screener Sep 2018 Version 3 (with Joel Greenblatt Magic Formula Screener)


Also check out the individual stock analysis sheet with multiple valuation techniques: Automated Stock Analysis V9: Earnings Growth Estimation

Guest post by Krishna: A Guide to Understanding Stock Screeners

Guest post by Indraneal: How to Build a Stock Screener

Note: Please do the following to login to Value Research

  1. Open blank excel
  2. Select Data in the menu
  3. Click get external data and then from web
  4. A browser window will open and there will annoying script error messages. Dismiss them.
  5. Then Go to VR online in that window and go to the main page. There will annoying messages. Dismiss them.
  6. Click on login. If you are not able to do so. Stop the page from downloading and then click
  7. Login with your email (preferable) and click on remember me.
  8. Now you can exit the browser window and start using the screener. It should work fine now.

Do share if you found this useful
Hate ads but would like to support the site? Subscribe to our ad-free newsletter and get beautifully formatted full articles delivered to your inbox!

About the Author

M Pattabiraman author of freefincal.comM. Pattabiraman(PhD) is the founder, managing editor and primary author of freefincal. He is an associate professor at the Indian Institute of Technology, Madras. since Aug 2006. Connect with him via Linkedin
Pattabiraman has co-authored two print-books, You can be rich too with goal-based investing (CNBC TV18) and Gamechanger and seven other free e-books on various topics of money management.  He is a patron and co-founder of “Fee-only India” an organisation to promote unbiased, commission-free investment advice.
He conducts free money management sessions for corporates and associations on the basis of money management. Previous engagements include World Bank, RBI, BHEL, Asian Paints, TamilNadu Investors Association etc. For speaking engagements write to pattu [at] freefincal [dot] com

About freefincal & Content Policy

Freefincal is a News Media Organization dedicated to providing original analysis, reports, reviews and insights on developments in mutual funds, stocks, investing, retirement and personal finance. We do so without conflict of interest and bias. We operate in a non-profit manner. All revenue is used only for expenses and for the future growth of the site.
Freefincal serves more than one million readers a year (2.5 million page views) with articles based only on factual information and detailed analysis by its authors. All statements made will be verified from credible and knowledgeable sources before publication. Freefincal does not publish any kind of paid articles, promotions or PR, satire or opinions without data. All opinions presented will only be inferences backed by verifiable, reproducible evidence/data. Contact information: letters {at} freefincal {dot} com (sponsored posts or paid collaborations will not be entertained)

Connect with us on social media

Our Publications

You Can Be Rich Too with Goal-Based Investing

You can be rich too with goal based investingMy first book is meant to help you ask the right questions, seek the right answers and since it comes with nine online calculators, you can also create custom solutions for your lifestyle! Get it now.  It is also available in Kindle format.
Gamechanger: Forget Startups, Join Corporate & Still Live the Rich Life You WantGamechanger: Forget Start-ups, Join Corporate and Still Live the Rich Life you wantMy second book is meant for young earners to get their basics right from day one! It will also help you travel to exotic places at low cost! Get it or gift it to a young earner

The ultimate guide to travel by Pranav Surya

Travel-Training-Kit-Cover This is a deep dive analysis into vacation planning, finding cheap flights, budget accommodation, what to do when travelling, how travelling slowly is better financially and psychologically with links to the web pages and hand-holding at every step.  Get the pdf for ₹199 (instant download)  

Free Apps for your Android Phone

All calculators from our book, “You can be Rich Too” are now available on Google Play!
Install Financial Freedom App! (Google Play Store)
Install Freefincal Retirement Planner App! (Google Play Store)
Find out if you have enough to say "FU" to your employer (Google Play Store)

Comment Policy

Your thoughts are the driving force behind our work. We welcome criticism and differing opinions.Please do not include hyperlinks or email ids in the comment body. Such comments will be moderated and I reserve the right to delete the entire comment or remove the links before approving them.


  1. When I click to get data from Value Research, I get a Microsoft Visual Basic “Run-time error ‘9’: Subscript out of range” message box. 🙁

        1. I am afraid I cannot help if I am not able to reproduce the error. What excel version are you using? Try changing it to the latest and check.

          1. I’m using Excel 2016. Thanks anyway. It may be some bug at my end. Shame, I’d have liked to use your screener. Perhaps I create one on website.

  2. After clicking on Get Data button, I get a VB pop-up message which says ‘Run-time error ‘1004’. You can’t paste this here because the Copy area and paste area aren’t the same size.

      1. I had logged into VR through the website. I noticed that the data was downloaded from VR but excel threw that error. After your reply I tried logging into VR through Excel. That did not work. The log in window froze on loading. Now the sheet works with log in into VR on the website and keeping the browser in the background.

  3. Dear Pattu sir,

    As these ‘magic’ formulas are spread widely on the internet and everyone with Excel is able to shortlist these companies don’t you think that this in itself would render the formulas useless as people pump money into the same group of ‘good’ stocks?

    If these techniques of evaluation are not secret and are published in books how effective can they be? I’m not questioning the logic of the formula. All I’m saying is if everyone knows a company is ‘good’ everyone will buy inflating the stock price to a level where it is no longer undervalued right?

    Looking forward to your thoughts on this.

Leave a Reply

Your email address will not be published. Required fields are marked *