Stock Meadow · Calculator
Magic Formula calculator
Enter a company's operating income, market value, debt, cash and equity to get the two figures the Magic Formula ranks stocks by: earnings yield and return on invested capital.
Updated · By Stock Meadow · About us
Work out the Magic Formula's two figures
Type the figures from the company's income statement and balance sheets, plus its market value. Use the same unit for every line (for example millions of dollars). Nothing you type leaves your browser.
The result appears here once the figures are in. To see how it works first, press Fill in an example.
The Magic Formula is a ranking: Stock Meadow ranks about 3,000 US stocks by it.
One company's two figures only mean something against the rest of the market. The Magic Formula model ranks every eligible stock on both, shows the working, and can be tested on up to 20 years of history (hypothetical results).
Start a free 7-day trialNo card needed to start.
For research only, not investment advice.
The two measures and how each is worked out
Joel Greenblatt's Magic Formula looks for good businesses at low prices with one measure of each. This calculator works both out the way Stock Meadow does:
- Earnings yield = operating income ÷ enterprise value, where enterprise value = market capitalization + total debt − cash. A company with an operating loss has a negative yield. The yield is left blank when enterprise value is zero or negative, and when it comes out above 300%, which means the figures don't belong together.
- Return on invested capital = after-tax operating profit ÷ average invested capital. After-tax operating profit is operating income × (1 − tax rate), where the tax rate is income tax ÷ pre-tax income when that lies between 0% and 50% on a pre-tax profit, and 21% otherwise. Invested capital is total debt plus total equity including minority interests, averaged over the latest balance sheet and the one a year earlier. It is left blank when that average is zero or negative, or the result is beyond ±200%.
On the site, operating income is that of the last twelve months, market capitalization is the latest close, and the debt and cash in enterprise value come from our data provider. The ROIC calculator shows the second measure on its own.
Why one company's figures are not a Magic Formula rank
The formula does not set a pass mark for either figure. It ranks every company on earnings yield, ranks them again on return on capital, and adds the two ranks. A company's place depends on how it compares with all the others on the same day, so an earnings yield of 10% might put it near the top in one market and in the middle of another.
That is why this calculator stops at the two figures. Stock Meadow's Magic Formula model does the ranking across the stocks it covers: it turns each measure into a percentile score, averages the two with equal weights, and shows the working for every stock. The model leaves out financial companies and utilities, as the formula does. Read the Magic Formula guide for a worked ranking of ten fictional companies.
Where to find the figures
- Income statement: operating income, income tax expense and income before income taxes, for a full twelve months (the latest fiscal year, or the last four quarters added together).
- Market capitalization: the share price times the number of shares outstanding, which is printed on the cover of the annual and quarterly reports.
- Balance sheet: cash and cash equivalents; total debt (short-term borrowings plus long-term debt); and total equity, after non-controlling interests are added. Debt and equity are also needed from the balance sheet a year earlier.
Type a loss as a negative number, with a minus sign or in brackets.
Setting companies side by side
One company's two figures only mean something next to others. Press Keep this result to compare, give it a label, and type another company's figures. With two or more companies you get:
- A chart of the two measures. Each company is a dot: further right is a higher earnings yield, further up a higher return on invested capital. The company in the boxes is the larger dot.
- A ranking among the companies typed. Each gets a place on each measure (1 is the highest, and equal figures share a place), the two places are added, and the lowest sum comes first.
That is the Magic Formula's method on a small list. Stock Meadow's model applies it to every eligible stock it covers, blending percentile ranks on the two measures with equal weights, so the order of a few companies here says nothing about where any of them stands in the market. A company with a blank earnings yield or ROIC is left out of the chart and the ranking. Kept results stay in the page only and are gone when you leave it.
What the two figures leave out
- They are inputs, not a verdict. Without the rest of the market there is nothing to rank against.
- A profit peak flatters both. One strong year lifts the earnings yield and the return on capital together.
- The quality measure is not Greenblatt's original. Return on invested capital is after tax and counts cash and goodwill as capital, so rankings can differ from other Magic Formula screens.
- Banks, insurers and utilities do not fit. Stock Meadow leaves them out of the model.
- Two figures cannot cover every risk. Debt, cash flow and what has happened since the last report are not in them.
For research only, not investment advice.
Frequently asked questions
- What does the Magic Formula measure?
- Two things about each company: how much operating profit it makes for the price of the whole business (earnings yield), and how much it makes on the capital in the business (return on capital). Joel Greenblatt's formula ranks companies on each, adds the two ranks and favors the companies that do well on both.
- How is earnings yield calculated?
- Operating income divided by enterprise value. Enterprise value is the company's market capitalization plus its debt, minus its cash. It is an operating-profit measure, not the inverse of the usual P/E ratio, which uses net income and the share price alone.
- Can I get a Magic Formula rank for one stock from this calculator?
- No. The formula is a ranking: a company's place depends on how its two figures compare with every other company's. This calculator gives the two figures; a rank needs the whole list, which is what Stock Meadow's Magic Formula model works out.
- Is this the same as Greenblatt's original formula?
- The earnings yield follows the same idea. The second measure differs: Greenblatt's return on capital is operating profit before tax divided by net working capital plus net fixed assets, while Stock Meadow uses return on invested capital, which is after tax and counts all debt and equity. The two can rank companies differently.
- Why are financial companies and utilities left out?
- Greenblatt's approach leaves them out because debt and capital work differently in those businesses, so the two measures don't compare with other companies'. Stock Meadow's Magic Formula model leaves out the Financial Services and Utilities sectors, and works out neither measure for banks and insurers.
- Can I compare several companies in the calculator?
- Yes. Work out one company, press Keep this result to compare, then type the next: up to five kept results and the one in the boxes are drawn on a chart of the two measures and ranked among themselves, a place on each measure with the places added. It imitates the method on a handful of companies. Stock Meadow's Magic Formula model does it across the whole market with percentile ranks, so a place in your list is not a place in the market.
The Magic Formula is a ranking: Stock Meadow ranks about 3,000 US stocks by it.
One company's two figures only mean something against the rest of the market. The Magic Formula model ranks every eligible stock on both, shows the working, and can be tested on up to 20 years of history (hypothetical results). Sign up free for a 7-day trial, no card needed. Already a member? Go straight in.
Open the stock scoring model