Gross margin measures what a company keeps after paying the direct cost of what it sells. Operating margin measures what it keeps after paying for everything needed to run the business. The gap between the two tells you how much of every sales dollar is consumed by overhead, and that gap is often more informative than either margin on its own. This article covers both formulas, computes them from one income statement, and shows how to read the difference.
Why Companies Report Both Gross Margin and Operating Margin
An income statement is built as a ladder. Revenue sits at the top, and each rung subtracts a different category of cost, so the profit figure you get depends on how far down you have gone.
Gross margin sits on the first rung. It isolates the economics of the product itself: what it costs to make or buy the thing being sold, and nothing else. Operating margin sits further down, after everything required to sell the product and run the company.
Both matter because a company can be excellent at one and poor at the other. A business can sell a product with wonderful unit economics and still lose money on sales, research, and head office. Gross margin alone would miss that, and operating margin alone would not tell you where it started.
What Is Gross Margin?
Gross margin is revenue minus the cost of goods sold, expressed as a percentage of revenue:
Gross Margin = (Revenue − Cost of Goods Sold) / Revenue
Cost of goods sold covers the direct costs of producing what was sold: raw materials, direct labor, and manufacturing overhead. For a retailer it is the wholesale cost of the merchandise. For a software company it is mostly hosting, licenses, and the support attached to delivering the service.
Gross margin is about pricing power and unit economics. A company with a 70% gross margin keeps 70 cents of every sales dollar before it spends anything on selling, which leaves room for marketing, research, or price cuts. A company at 20% has far less room and depends much more on volume and cost control.
What Is Operating Margin?
Operating margin is operating income divided by revenue, where operating income is gross profit minus operating expenses:
Operating Margin = Operating Income / Revenue
Operating Income = Gross Profit − Operating Expenses
Operating expenses cover everything needed to run the business rather than to make the product: sales and marketing, research and development, general and administrative costs, and depreciation and amortization.
Operating margin tells you whether the whole operation is profitable before financing and tax enter the picture. It is the stricter of the two tests, because it clears far more costs, and it is the figure that comes closest to describing the profitability of the business as a business.
One rung further down sits net profit margin, which is net income divided by revenue and therefore deducts interest and tax as well. That makes it the bottom line for shareholders, but it also mixes in borrowing decisions and tax positions, which is why operating margin is the better measure for comparing how well two companies actually operate.
Key Differences Between Gross Margin and Operating Margin
| Gross margin | Operating margin | |
|---|---|---|
| What it measures | Product-level profitability | Whole-company operating profitability |
| Costs subtracted | Cost of goods sold only | Cost of goods sold plus all operating expenses |
| Question it answers | Are the unit economics good? | Does the business make money running itself? |
| What moves it | Pricing, input costs, product mix, manufacturing efficiency | Overhead, marketing spend, research spend, scale |
| Relative size | Always the higher of the two in normal circumstances | Always the lower, since more costs are deducted |
The relationship is hierarchical rather than competing. Operating margin can never exceed gross margin unless something unusual is included in operating income, which is covered further down.
Worked Example: Calculating Both Margins From One Income Statement
Take a simple, illustrative income statement. Revenue is $100. Cost of goods sold is $55. Operating expenses are $25.
Gross profit = $100 − $55 = $45
Gross margin = $45 / $100 = 45%
Operating income = $45 − $25 = $20
Operating margin = $20 / $100 = 20%
Now compare that with a software business that reaches the same operating margin by a completely different route. Its cost of goods sold is only $20, so gross profit is $80, but it spends $60 on research and sales:
Gross profit = $100 − $20 = $80
Gross margin = 80%
Operating income = $80 − $60 = $20
Operating margin = 20%
Both companies convert 20 cents of every revenue dollar into operating profit. Their cost structures could hardly be more different. The first spends most of its revenue making the product. The second spends almost nothing making it and a great deal selling and developing it.
That difference has real consequences for how each business behaves when revenue changes, which is exactly what the gap between the two margins captures.
What the Gap Between the Two Margins Tells You
Subtract one from the other and you have a third piece of information:
Margin gap = Gross Margin − Operating Margin
In the first example the gap is 25 points. In the software example it is 60 points. That gap is the share of revenue consumed by overhead, selling, marketing, research, and administration.
Retail, distribution, and grocery tend to show a narrow gap, because most of the cost is the merchandise itself and running the stores or warehouses consumes comparatively little of revenue. Walmart (WMT) sits at this end, pairing a low gross margin with a relatively modest gap between the two figures.
Software, pharmaceuticals, and consumer brands run the opposite shape. Their products cost little to reproduce and a great deal to develop and market, so the gap is wide. Apple (AAPL) sits closer to that pattern, and a pure software business sits further along it again.
The trend in the gap is where this becomes genuinely useful, because it separates two very different problems.
When gross margin falls while the gap stays roughly constant, the problem is in pricing or input costs. The company is getting less for what it sells, or paying more to make it, and overhead is behaving normally.
When gross margin holds steady while the gap widens, the product economics are intact and the company is spending more to run itself. That can be deliberate investment in growth, or it can be cost discipline slipping. Either way, it is a different conversation from a pricing problem, and only the two margins read together will tell you which one you are looking at.
One more link is worth knowing. Where the gap is wide because of large fixed operating costs, operating margin expands faster than revenue when sales grow, and contracts faster when they fall. This is operating leverage, and it explains why the two margins often move by very different amounts in the same year.
Where Cost Classification Muddies the Comparison
Here is a caveat that most explanations skip, and it matters when you compare two companies.
Within accounting rules, companies have discretion over what sits in cost of goods sold and what sits in operating expenses. The line genuinely moves. Distribution and shipping costs might sit above the gross profit line at one company and below it at another. Customer support might be treated as a cost of delivering the service or as an operating expense. Software hosting costs are classified differently by different businesses.
The consequence is specific. Gross margin is less reliable for cross-company comparison than it appears, because two companies with identical economics can report different gross margins purely through classification. Operating margin is more robust, since it clears both buckets and the classification choice cancels out.
The practical rule is to compare gross margins only after checking what each company includes, which is disclosed in the accounting policies note. For a quick peer comparison, operating margin is the safer measure. Investing.com’s stock screener lets you rank an industry on both margins at once, which makes the outliers easy to spot before you go and read what each one actually counts.
Can Operating Margin Be Higher Than Gross Margin?
Occasionally, yes, and it usually is not an error.
The mechanism is other operating income. Royalties, licensing income, government grants, and certain gains can be included in operating results while contributing nothing to gross profit. When those items are large enough relative to operating expenses, operating income can exceed gross profit and the margin ordering flips. If you see it, read the income statement line by line to find what is being included.
The reverse oddity is worth knowing too. Gross margin can be negative, which means a company is selling below the direct cost of production. It happens with early-stage hardware sold below cost to build a market, and in commodity businesses during price troughs. A negative gross margin makes the operating margin comparison largely academic, since the problem is upstream of overhead entirely.
Gross Margin vs Contribution Margin
These two get used interchangeably and should not be. Contribution margin subtracts all variable costs, including variable selling costs such as commissions and shipping. Gross margin subtracts cost of goods sold as the company defines it, which includes some fixed manufacturing costs and excludes some variable ones.
The difference reflects their purposes. Contribution margin is a management tool for breakeven and pricing decisions, and it rarely appears in published financial statements. Gross margin is a reporting measure you will find in every income statement. Treating one as a substitute for the other will produce the wrong answer in any breakeven calculation.
How to Use Gross Margin and Operating Margin Together
The practical sequence is short. Read gross margin first for the product economics. Read operating margin next to see whether the company turns those economics into actual profit. Read the gap to understand where the money in between is going. Then read all three across at least three to five years, because the direction matters more than the level.
Peer comparison has one condition attached: same industry, and check the classification before drawing a conclusion from gross margin differences. InvestingPro’s per-ticker metric history is useful here, since it lines up both margins across years for a company and its competitors, which is how you separate a structural difference from a temporary one.
Avoid universal benchmarks. Software businesses commonly run gross margins above 70% and consumer brands somewhere in the 40s to 60s, while grocery and distribution can operate profitably in the teens or lower. A 15% gross margin is a crisis in software and completely normal in wholesale distribution. The only useful comparisons are against the same company’s history and against direct competitors.
Frequently Asked Questions
What is the difference between gross margin and operating margin in simple terms?
Gross margin is what remains from revenue after paying the direct cost of the goods or services sold. Operating margin is what remains after also paying for marketing, research, administration, and depreciation. Gross margin is about the product, operating margin is about the whole business.
Which is more important, gross margin or operating margin?
They answer different questions, so neither wins in general. Gross margin tells you whether the product has good unit economics and pricing power. Operating margin tells you whether the company converts that into profit after running itself. For assessing overall profitability, operating margin is the stricter test. For understanding why profitability changed, you need both.
Can operating margin be higher than gross margin?
Yes, though it is uncommon. It happens when items such as royalties, licensing income, or grants are included in operating income without contributing to gross profit. If you see this, read the income statement carefully to identify what is included, since it usually points to a revenue stream outside the core product.
Why is the gap between gross and operating margin so wide at some companies?
Because the gap represents overhead, selling, marketing, and research as a share of revenue. Software and pharmaceutical companies spend heavily on development and sales while spending little to reproduce the product, which produces a wide gap. Retailers and distributors have the opposite shape, so their gap is narrow.
Is gross margin the same as contribution margin?
No. Contribution margin subtracts all variable costs, including variable selling costs, and is used for breakeven and pricing analysis. Gross margin subtracts cost of goods sold as the company reports it, which mixes in some fixed manufacturing costs. They frequently differ, and using one in place of the other will distort a breakeven calculation.
Where do you find both margins in a company’s financial statements?
Neither is usually stated as a percentage. Both are calculated from the income statement: gross profit and revenue give you gross margin, and operating income and revenue give you operating margin. Some companies do quote the percentages in their results commentary or investor presentations.
Bottom Line
Gross margin and operating margin are rungs on the same ladder, not competing measures. One tells you about the product, the other about the company, and the distance between them tells you what running the company costs.
Track all three figures over several years. A company whose gross margin is stable while its operating margin slides has a spending problem, and one whose gross margin is falling has a pricing or cost problem. Those are different situations, and reading either margin alone will not distinguish them.
