Stock Meadow · Model guide
Magic Formula investing: meaning and how it works
Magic Formula investing is Joel Greenblatt's two-measure ranking. It combines value and business quality. It looks for companies that earn more for their price and use their invested capital productively, then brings both measures into one ranking.
Updated · By Stock Meadow · About us
How the Magic Formula works
Joel Greenblatt introduced the approach in The Little Book That Beats the Market. It ranks companies separately on earnings yield and return on capital, then adds the two ranks. A smaller combined rank means a stronger combination of the two measures.
- Earnings yield = EBIT ÷ enterprise value. EBIT is earnings before interest and tax. Enterprise value reflects the price of the whole business, including debt and allowing for cash. A company with $12 million of operating earnings and a $120 million enterprise value has a 10% earnings yield.
- Original return on capital = EBIT ÷ (net working capital + net fixed assets). This compares operating earnings with the tangible capital used in the business.
- Combined rank = earnings-yield rank + return-on-capital rank. Rank 1 is the highest value on each measure.
Earnings yield here is an operating-profit measure, rather than the inverse of the usual net-income P/E ratio. A strong result on one measure can offset a weaker result on the other.
To work out a real company's two Magic Formula figures from its reports, use the free Magic Formula calculator.
A worked example with ten fictional companies
Assume these ten companies pass the same filters and have complete data. This example uses Stock Meadow's ROIC measure for quality. Each measure is ranked from highest to lowest.
| Company | Earnings yield | ROIC | Yield rank | ROIC rank | Score / 100 |
|---|---|---|---|---|---|
| A | 10% | 18% | 3 | 2 | 83.3 |
| B | 12% | 12% | 1 | 5 | 77.8 |
| C | 8% | 20% | 5 | 1 | 77.8 |
| E | 9% | 16% | 4 | 3 | 72.2 |
| D | 11% | 10% | 2 | 6 | 66.7 |
| F | 7% | 14% | 6 | 4 | 55.6 |
| G | 6% | 8% | 7 | 7 | 33.3 |
| H | 5% | 6% | 8 | 8 | 22.2 |
| I | 4% | 4% | 9 | 9 | 11.1 |
| J | 3% | 2% | 10 | 10 | 0.0 |
Swipe sideways to see every column.
Company A leads: its ranks are 3 and 2, giving a combined rank of 5. With ten peers and no ties on either measure, the yield percentile is (10 − 3) ÷ 9 × 100 = 77.8; the ROIC percentile is (10 − 2) ÷ 9 × 100 = 88.9. Their average is 83.3 out of 100.
Companies B and C tie because each has a combined rank of 6. The score summarizes a position among these peers; it is not a forecast of a company's return.
How Stock Meadow implements the model
Stock Meadow averages two equally weighted percentile scores. Higher values score better on both measures.
- Earnings yield = trailing twelve-month operating income ÷ enterprise value. Operating income is the last four quarters' for a company reporting in US dollars (for any other company, the data provider's revenue times its operating margin). Enterprise value is market capitalization at the latest close plus the data provider's debt minus cash. A company with an operating loss has a negative yield and ranks near the bottom. It is not available when enterprise value is zero or negative, or when the yield is above 300% (a data error).
- ROIC = NOPAT ÷ average invested capital. NOPAT is trailing twelve-month operating income × (1 − tax rate). The tax rate is trailing twelve-month income tax ÷ pre-tax income when that is between 0% and 50%, and 21% otherwise, including when pre-tax income is zero or negative. Invested capital is total debt plus total equity including minority interests, with cash not subtracted, averaged over the latest balance sheet and the one about a year earlier (the latest alone when there is no year-earlier one). ROIC is not available when that average is zero or negative, when the statements are more than 15 months old or in two currencies, or when the result is beyond ±200% (mismatched figures).
Banks and insurers have neither measure.
The quality measure differs from Greenblatt's original formula. His return on capital is EBIT ÷ (net working capital + net fixed assets), before tax. ROIC here is after tax and counts cash, goodwill and other non-working assets as capital, so its ranking can differ from the original Magic Formula screener.
- Choose Magic Formula in the scoring-model picker.
- Set the company and metric filters you want. Filters run before the scores are calculated.
- Open a stock's breakdown to see earnings yield, ROIC and the points contributed by each.
The model excludes Financial Services and Utilities, and leaves out stocks missing either scoring measure. At least ten eligible stocks must remain. Metric score switches and custom weights do not change this fixed recipe.
You can compare within each sector. A sector with fewer than five eligible stocks falls back to the whole eligible list. Changing filters or the peer group can change a stock's score even when its financial figures stay the same. Equal values share a midpoint percentile; equal overall scores share a rank and are listed by ticker.
See the full methodology for the shared filtering and ranking rules.
What the ranking leaves out
- Cheap earnings may not last. A temporary profit peak can make earnings yield look attractive just before business conditions weaken.
- Accounting affects comparisons. Acquisitions, unusual income, taxes and the amount of capital on the balance sheet can alter profitability measures.
- A rank has no valuation target. It does not estimate a fair share price or show whether the whole peer group is expensive.
- Two measures cannot cover every risk. Review debt, cash flow, competitive pressures and the latest reports before drawing a conclusion.
Stock Meadow's scores are research tools based on reported financial data. They do not predict returns or recommend buying a particular stock.
Sources and further reading
For the original strategy, see Joel Greenblatt's The Little Book That Still Beats the Market and the official Magic Formula Investing FAQ. This guide describes Stock Meadow's implementation; Stock Meadow is independent of those publications and services.
For a different way to examine business quality, read our Piotroski F-Score guide.
Metrics this model uses
Each measure has its own page with a formula, how to read it and common pitfalls.
- Earnings yield: operating profit for each dollar of the whole company.
- Return on invested capital (ROIC): profit made on all money invested in the business.
Frequently asked questions
- What is the Magic Formula in investing?
- The Magic Formula is Joel Greenblatt's rules-based strategy from The Little Book That Beats the Market. It ranks companies on earnings yield and return on capital, adds the two ranks, and favors the best combined result.
- What does Magic Formula mean in investing?
- The name is Greenblatt's label for a simple, rules-based way to look for good businesses at bargain prices. There is nothing magic in it: it combines one value measure (earnings yield) with one quality measure (return on capital) and favors companies that rank well on both at once.
- How does Magic Formula investing work, step by step?
- Leave out financial companies and utilities, rank every remaining company by earnings yield, rank them again by return on capital, add the two ranks, and sort by the combined rank, lowest first. Greenblatt's book describes a portfolio of 20 to 30 top-ranked stocks, each kept for about a year, rebuilt as the ranking changes.
- How does Stock Meadow calculate the Magic Formula?
- It averages two equally weighted percentile scores: trailing twelve-month operating income divided by enterprise value (earnings yield), and return on invested capital (ROIC), which is after-tax operating income divided by the average of total debt plus total equity, with cash not subtracted. Higher is better on both.
- Why does the Magic Formula exclude financial companies and utilities?
- Their balance sheets and heavy borrowing do not fit earnings yield and return-on-capital comparisons. Stock Meadow follows the original formula and leaves out Financial Services and Utilities.
- Is Stock Meadow's Magic Formula identical to Greenblatt's screener?
- No. Greenblatt's return on capital is EBIT divided by net working capital plus net fixed assets. Stock Meadow uses ROIC instead: after-tax operating income divided by average total debt plus total equity, which counts cash and goodwill as capital. Rankings can therefore differ.
Explore the model in Stock Meadow
Open the stock scoring model, choose Magic Formula, and inspect a stock's score breakdown. Sign up free, no card needed.
Open the stock scoring model