WebmasterID logoWebmasterID
Analytics metrics

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.

Partially verified

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.

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

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

Sources and verification notes

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.