In 30 seconds
- Gross margin measures the power of the product: how much is left after paying for what was sold.
- Operating margin measures management and is the best one for comparing companies in the same sector.
- Net margin is what's left for shareholders, but one-off gains and losses distort it.
- A margin is only good or bad relative to its sector: 3% is healthy for a grocer and poor for a software company.
- What tells you the most is how stable the margin stays over several years.
Introduction
In fiscal 2025, Costco earned a 12.8% gross margin: out of every hundred dollars it took in, nearly eighty-seven went straight to paying for the merchandise. Microsoft, in fiscal 2026, kept 67.9%. Both make billions. How is that possible with margins so far apart? The answer explains almost everything about how a business works.
Explanation
A margin is a percentage: the share of revenue that survives a particular kind of cost. There are three, and each one subtracts a bit more than the one before.
Picture a juice stand. You sell a cup for $4. The fruit and the cup cost you $1.50, so you keep $2.50: a gross margin of 62.5%. Now pay the rent on the stand, your helper's wages and the electricity, which work out to $1.50 a cup: you're left with $1, an operating margin of 25%. Pay the interest on the loan you took out for the juicer, then your taxes, and you keep $0.70: a net margin of 17.5%.
All three come from the income statement, and each tells a different story:
Gross margin: the power of the product. When it's high, customers pay far more than the thing costs to make. It usually points to a brand, patents or software that can be copied almost for free.
Operating margin: management's discipline. It covers selling, marketing, research and administrative costs. It's the best one for comparing companies in the same industry, because neither debt nor taxes distort it.
Net margin: what's really left for shareholders. It's also the easiest to distort, because it includes gains and losses that have nothing to do with the business.
Look at the whole staircase, not a single step. A company with a strong gross margin and a weak operating margin spends too much on overhead. One with a strong operating margin and a weak net margin usually carries a lot of debt.
Formula
Gross margin = (Revenue − Cost of goods sold) / Revenue × 100
Operating margin = Operating income (EBIT) / Revenue × 100
Net margin = Net income / Revenue × 100
Cost of goods sold = what it costs to make or buy what was sold
Operating income = Gross profit − Operating expenses (selling, general and administrative, R&D)
Example
Let's start with Walmart, fiscal 2026, which ended on January 31, 2026, using the annual report it filed with the SEC (millions of dollars):
Step 1. Revenue: 713,163. Cost of sales: 535,395. Gross profit: 177,768. Gross margin: 177,768 / 713,163 = 24.9%.
Step 2. Operating income: 29,825. Operating margin: 29,825 / 713,163 = 4.2%.
Step 3. Net income attributable to Walmart: 21,893. Net margin: 21,893 / 713,163 = 3.1%.
Walmart keeps three cents of every dollar. That sounds like nothing until you multiply it by more than $700 billion in sales.
Now Costco, fiscal 2025 (ended August 31, 2025): revenue of 275,235, merchandise costs of 239,886, operating income of 10,383 and net income of 8,099. Gross margin of 12.8%, operating margin of 3.8% and net margin of 2.9%. Costco sells close to cost on purpose: it makes its money on membership fees and enormous volume.
And Microsoft, fiscal 2026 (ended June 30, 2026): revenue of 331,839, gross margin of 67.9%, operating margin of 46.8% and net margin of 40.3%. A different planet.
The table below compares the gross margin of four big retailers. Before you look: do you think Walmart has a higher gross margin than Target?
Real-data example
| Company | Ticker | Gross margin |
|---|---|---|
| Walmart | WMT | 25.3% |
| Costco Wholesale | COST | 12.8% |
| Target | TGT | 29.9% |
| Kroger | KR | 23.1% |
Figures from each company's page, which shows their date.
How to read it
How to read it
Rough thresholds, in line with the sector guide on Kaplio's stock pages and with the Warren Buffett method Kaplio applies (on the stock page you'll see it as "Quality without overpaying"):
| Sector | Good gross margin | Good operating margin |
|---|---|---|
| Software | 70% or more | Above 25% |
| Semiconductors | 45% or more | Above 20% |
| Branded pharma | 70% or more | Above 20% |
| Branded consumer goods (beverages, personal care) | 35% or more, and stable | Above 15% |
| Industrials | Stable | 12% or more |
| Retail and grocery | 10% to 30%, depending on the model | 3% to 6% |
For net margin, that method treats anything sustained above 20% as a sign of a competitive advantage, and staying below 10% year after year as a warning. That yardstick doesn't work for grocers: there, a steady 3% is a good business. Always compare within the sector.
Pitfalls and limitations
- A low margin doesn't mean a bad company. Costco and Walmart make up for it with turnover: they sell through their inventory many times a year.
- Net margin gets inflated by things outside the business. In fiscal 2026 (which ended in June 2026), Microsoft reported $10,697 million of non-operating income, so its net margin sat closer to its operating margin than usual. If net margin grows much faster than operating margin, go looking for the one-off item.
- Not everyone counts the same way. Some companies put depreciation in cost of sales and others don't, so the gross margins of two companies in the same sector may not be comparable.
- One year can fool you. What matters is stability over five or ten years; a margin that rises and falls with the cycle gives away a product with no pricing power.
Case in point: Coca-Cola
In 2025, Coca-Cola posted a 61.6% gross margin on drinks made from water, sugar and concentrate. That margin barely moves even when aluminum or sugar prices climb: the company passes the cost on to customers. That's what Buffett called pricing power, and it shows up in gross margin before any other number. Once you've got margins down, the next step is the EBITDA margin.
Guided class: Margins with Coca-Cola
A guided class on Coca-Cola’s real stock page: how much of every dollar of revenue it keeps at each step, how that changes over the years and how to judge it. We point out each figure as we go, and at the end you answer the questions yourself by finding the answers on the page.
Free. About 7 minutes. Basic level. It runs on the Kaplio stock page for Coca-Cola and PepsiCo, using the figures the page shows that day. No figure in the class is typed in by hand.
What the class covers, step by step
- What a margin is
- Gross, operating and net
- Year by year
- The sector guide
- Comparing similar businesses
- Your questions
Questions you answer by finding the figure on the page
- What was Coca-Cola’s operating margin in its last full fiscal year?
- You want to know which of two similar companies runs its business better, without debt or taxes getting in the way. Which margin do you look at?
- Across the years on the page, in which year did Coca-Cola have its lowest net margin?
Each answer is checked against the same figure the page shows at that moment, so the right answer can change from one day to the next.
Practice on Kaplio
Frequently asked questions
What is the difference between gross and net profit margins?
Gross margin is the share of revenue left after paying for what was sold, the raw materials or merchandise. Net margin is what's left at the very end, after operating costs, interest and taxes. Between them sits operating margin, which takes out overhead but not financing costs. Gross shows product strength; net shows what reaches shareholders.
What is the difference between operating and gross profit margin?
Gross margin only subtracts the direct cost of what was sold. Operating margin also subtracts selling, marketing, research and administrative costs. A company can have an excellent gross margin and a weak operating margin if it spends too much on overhead, which is why it pays to look at both, and at how they trend.
Is net profit margin the same as operating margin?
No. Operating margin measures what the business earns after its running costs. Net margin also subtracts interest and taxes, and adds or subtracts one-off items such as asset sales. That's why operating margin is better for comparing how two companies are run, while net margin tells you what really reached shareholders that year.
Is 10% a good operating profit margin?
It depends entirely on the sector. For a retailer or grocer, where 3% to 6% is normal, 10% would be outstanding. For industrials, Kaplio's guide treats 12% or more as good, and in software anything below 25% is modest. Compare the figure with direct competitors and check that it holds steady over several years.