Gross margin
Gross margin is revenue minus the cost of goods sold (COGS), divided by revenue, as a percentage. It shows how much of each revenue dollar remains after the direct cost of delivering the product, before operating expenses like sales and R&D. For software, what belongs in COGS — hosting, third-party APIs, support, payment fees — is a judgement call that materially changes the margin, so the definition must travel with the number.
What this means
Gross margin = (revenue − COGS) ÷ revenue, as a percentage. COGS is the direct cost of producing and delivering what was sold. Gross margin sits above the operating line: it excludes sales, marketing, R&D, and overhead, isolating the unit economics of delivery.
Why COGS definition matters
For physical goods COGS is relatively clear, but for software it is a judgement: cloud hosting, content-delivery and bandwidth, third-party API costs, payment processing, and customer-support delivery are commonly included. Excluding these flatters margin. Because the boundary varies, two companies' gross margins are only comparable when their COGS definitions are.
- Gross margin = (revenue − COGS) ÷ revenue
- Sits above operating expenses (sales, R&D, overhead)
- SaaS COGS often includes hosting, APIs, support, fees
Why it misleads
Gross margin can be inflated by parking delivery costs below the line in operating expenses. It also varies by business model — a services-heavy product carries lower margin than pure software. Always check what is in COGS, and read gross margin with contribution margin, which subtracts variable selling costs too.
How it appears in analytics and logs
A falling gross margin means delivery costs are rising faster than revenue — for SaaS often cloud infrastructure, support load, or third-party fees eating into each dollar of revenue.
Diagnostic use case
Use gross margin to understand how much revenue is left to fund operations after direct delivery costs, and scrutinise what is included in COGS before comparing margins across companies.
What WebmasterID can help detect
WebmasterID measures first-party revenue events, giving the top-line signal that pairs with cost data to compute margin without third-party tracking.
Common mistakes
- Comparing gross margins with inconsistent COGS definitions.
- Excluding hosting or support from SaaS COGS to flatter margin.
- Confusing gross margin with net or contribution margin.
Privacy and accuracy notes
Gross margin is computed from aggregate revenue and cost figures, not personal data. This page is educational, not legal advice or accounting guidance.
Related pages
- Contribution margin
Contribution margin is revenue minus the variable costs of producing it — the money each unit or order contributes toward fixed costs and profit. It can be expressed per unit, in total, or as a ratio of revenue. Because it isolates variable costs, it differs from gross margin (which uses cost of goods sold) and is the figure used to reason about scaling, pricing, and break-even.
- Gross profit margin (retail)
Gross profit margin in retail is gross profit — net revenue minus the cost of goods sold — divided by net revenue, as a percentage. It measures how much of each sales dollar is left after the cost of the merchandise itself, before operating expenses. It is distinct from markup (profit over cost) and is reduced by discounts and returns, which is why it is computed on net rather than gross sales.
- Monthly recurring revenue (MRR)
Monthly recurring revenue (MRR) is the normalized, predictable subscription revenue a business expects each month. Annual and multi-month plans are divided down to a monthly figure so the run rate is comparable. MRR is decomposed into new, expansion, contraction, and churned components, and it deliberately excludes one-off and usage-based charges — so it is a run-rate concept, not booked or recognized revenue.
- Pricing
How WebmasterID plans are structured.
Sources and verification notes
- U.S. SEC — Financial reporting (gross profit / COGS)GAAP basis for COGS/gross profit; SaaS inclusions are convention.
Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.