Gross margin vs operating margin in one paragraph
Gross margin is gross profit divided by revenue, after subtracting only the cost of delivering the product. Operating margin is operating income divided by revenue, after also subtracting sales and marketing, R&D, and general and administrative costs. Gross margin shows if the product is profitable to deliver; operating margin shows if the whole business is. Updated November 2026: added a SaaS P&L walk, a COGS vs opex table, GAAP vs non-GAAP, and sourced benchmarks.The two formulas side by side
| Gross margin | Operating margin | |
|---|---|---|
| Formula | (Revenue minus COGS) / Revenue | (Revenue minus COGS minus operating expenses) / Revenue |
| Profit line it uses | Gross profit | Operating income (often called EBIT) |
| Costs subtracted | Cost of goods sold (cost of revenue) only | COGS plus sales and marketing, R&D, and G&A |
| Question it answers | Is the product profitable to deliver? | Is running the company profitable? |
| Who moves it | Engineering, support, services, infrastructure | Every department, plus pricing and growth |
| Typical SaaS range | 77% median total, 81% median subscription (Benchmarkit, 2024 data) | Often negative at growth stage, positive at scale |
| Main use | Unit economics, LTV, CAC payback | Profitability path, Rule of 40, valuation |
Walk the income statement: revenue to gross profit to operating income
The clearest way to see the difference is to walk one P&L from top to bottom. Here is an illustrative SaaS company with $20.0M in annual revenue.
| Line | $K | % of revenue |
|---|---|---|
| Subscription revenue | 18,500 | 92.5% |
| Services revenue | 1,500 | 7.5% |
| Total revenue | 20,000 | 100% |
| Hosting and infrastructure | (1,700) | 8.5% |
| Support | (1,100) | 5.5% |
| Implementation and services delivery | (1,050) | 5.25% |
| Third-party software in the product | (450) | 2.25% |
| Payment processing and capitalized software amortization | (300) | 1.5% |
| Cost of goods sold | (4,600) | 23% |
| Gross profit | 15,400 | Gross margin 77% |
| Sales and marketing | (7,000) | 35% |
| Research and development | (4,800) | 24% |
| General and administrative | (2,800) | 14% |
| Total operating expenses | (14,600) | 73% |
| Operating income | 800 | Operating margin 4% |
Below operating income come interest and taxes, which take you to net income. That last step is covered in gross margin vs net margin and operating income vs net income.
What sits in COGS vs operating expenses for SaaS
The line between the two margins is a classification choice, and SaaS teams make it differently. The test: a cost that continues as long as a paying customer keeps using the product is COGS. A cost that wins new customers, builds new product, or runs the company is an operating expense.
| Cost | Usually goes in | Moves which margin |
|---|---|---|
| Production hosting, cloud, DevOps on live systems | COGS | Gross and operating |
| Customer support | COGS | Gross and operating |
| Onboarding and implementation delivery | COGS | Gross and operating |
| Third-party software and APIs inside the product | COGS | Gross and operating |
| Customer success focused on expansion | Sales and marketing | Operating only |
| Free-tier hosting | Often sales and marketing | Operating only |
| Engineers building new features | R&D | Operating only |
| Sales commissions, ads, events | Sales and marketing | Operating only |
| Finance, legal, HR, office | G&A | Operating only |
GAAP vs non-GAAP operating margin
GAAP operating margin uses operating income exactly as reported under US accounting rules. Non-GAAP operating margin adds back items management considers non-cash or one-time, mainly stock-based compensation, amortization of acquired intangibles, and restructuring. Most public SaaS companies lead with the non-GAAP number, so check which one you are reading.The gap is often large. In its fiscal 2026 results (Atlassian 8-K, August 6, 2026), Atlassian reported:
| Fiscal 2026 | $M |
|---|---|
| Revenue | 6,572 |
| GAAP operating income | 10.4 (0.2% margin) |
| Plus stock-based compensation | 1,605.1 |
| Plus amortization of acquired intangibles | 101.5 |
| Plus restructuring charges | 279.5 |
| Non-GAAP operating income | 1,996.5 (30% margin) |
In the illustrative P&L above, assume $100K of stock compensation in COGS, $1,200K in opex, and $200K of acquired intangible amortization. Non-GAAP gross margin becomes 15,500 / 20,000 = 77.5%. Non-GAAP operating income becomes 800 + 100 + 1,200 + 200 = 2,300, an 11.5% margin. Same business, a 7.5-point difference in operating margin depending on the label. EBITDA margin goes one step further and adds back all depreciation and amortization.
SaaS benchmarks: where the gap usually sits
Benchmarkit's 2025 SaaS benchmarks (private B2B SaaS, 2024 data) report these medians:
| Metric | Median |
|---|---|
| Gross margin, total revenue | 77% |
| Gross margin, subscription revenue | 81% |
| Gross margin, professional services | 30% |
| Sales and marketing, % of revenue | 37% |
| R&D, % of revenue | 34% |
| G&A, % of revenue | 24% |
How to read the two together
The pairing tells you more than either number alone:
- High gross margin, negative operating margin. The product economics work and the company is spending on growth. Fine if the gap is narrowing because revenue is outgrowing the cost base. - High gross margin, high operating margin. A mature, efficient business. Check that growth has not stalled to get there; the Rule of 40 weighs both. - Low gross margin, any operating margin. The harder problem. Cutting sales and R&D cannot fix a product that is expensive to deliver. Look at hosting, support load, and services sold below cost first. - Gross margin falling while opex holds. Often a pricing problem showing up before anyone names it.
That last pattern is where Pete Furseth, ORM's COO, sees discounting do its damage. Pulling deals forward to save a quarter usually means discounting them, which erodes price, and it shrinks next quarter's starting pipeline, so you "have to spend more on pipeline generation in the coming quarter." Both margins take the hit. Discounts cut revenue while COGS stays put, and the extra pipeline spend lands in sales and marketing. In the illustrative P&L, taking $1.0M of revenue out through discounts with the same costs drops gross margin from 77% to 75.8% (14,400 / 19,000) but drops operating margin from 4% to minus 1.1% (minus 200 / 19,000). The same price cut costs about 1 point of gross margin and 5 points of operating margin.
Report them the same way every quarter
Pete's test for numbers a board trusts applies here: "If you show one number on one slide, that number better show up on the next," and every figure should be traceable down to how it was built. For margins that means three habits:
1. Label every operating margin GAAP or non-GAAP, and show the reconciliation. 2. Fix the COGS policy once and restate prior periods if it changes, so a gross margin move reflects a real change in the business. 3. Show the walk from revenue to gross profit to operating income, so the gap between the two margins is visible as opex by function.
Margin assumptions also feed the revenue plan and the cost plan behind it, which is part of how you forecast revenue. The wider view of all profit lines is in ORM's guide to revenue vs profit.
Frequently Asked Questions
What is the difference between gross margin and operating margin?
Gross margin is gross profit divided by revenue, where gross profit is revenue minus cost of goods sold. Operating margin is operating income divided by revenue, where operating income also subtracts sales and marketing, R&D, and general and administrative costs. Gross margin measures the product's delivery economics; operating margin measures whether running the whole company makes money before interest and taxes.
What is GAAP operating margin?
GAAP operating margin is operating income as reported under US generally accepted accounting principles, divided by revenue. It includes every operating cost, including stock-based compensation, amortization of acquired intangibles, and restructuring charges. Non-GAAP operating margin adds those items back. Public SaaS companies report both, and the gap can be large: Atlassian's fiscal 2026 margin was 0.2% GAAP and 30% non-GAAP.
What does operating margin tell you?
Operating margin tells you how many cents of each revenue dollar are left after paying for delivery and for running and growing the company, before interest and taxes. A rising operating margin means revenue is growing faster than the cost base. A negative one at a growth-stage SaaS company usually means heavy sales and R&D spend, which is fine only if the margin trends toward positive as the company scales.
What does a 70% gross margin mean?
A 70% gross margin means 70 cents of every revenue dollar remain after paying the direct cost of delivering the product, such as hosting, support, and services delivery. Those 70 cents fund sales, marketing, R&D, and overhead. If those operating expenses total 80% of revenue, the operating margin is minus 10%, even though the gross margin looks healthy.
What is gross operating margin or operating gross margin?
Neither phrase is a standard GAAP line. People usually mean one of two things: gross margin (after cost of goods sold only) or operating margin (after all operating expenses). The two can be 70 points apart for a SaaS company, so always ask which line of the income statement the number comes from before comparing it to a benchmark.
What does the gap between gross and operating margin show?
The gap equals operating expenses as a share of revenue. A 77% gross margin and a 4% operating margin mean operating expenses take 73% of revenue. A wide gap is common and often deliberate at growth-stage SaaS companies. Narrowing it as revenue scales faster than sales, R&D, and overhead is the path to operating profitability.
Put these metrics to work
ORM builds custom revenue forecast models that turn concepts like gross margin vs operating margin into prescriptive action for your team.
Schedule a Demo