Gross margin shows how much of each dollar of revenue is available to pay for everything else: sales, marketing, product development, overheads and profit. It is the first test of whether a business model can work at scale.
How to calculate gross margin
The gross margin formula is:
Gross margin % = (revenue - cost of goods sold) / revenue x 100
Revenue minus cost of goods sold is gross profit, a dollar amount. Gross margin is that amount as a percentage of revenue. People use the two terms loosely, so check whether a figure is in dollars or percent.
What counts as cost of goods sold
Cost of goods sold, or COGS, is the cost that exists because customers are being served. For a software company the usual split is:
| Included in COGS | Not included |
|---|---|
| Hosting and infrastructure | Sales and marketing |
| Customer support and onboarding staff | Product development and engineering |
| Third-party software and data built into the product | General and administrative costs |
| Payment processing fees | Office rent |
There is judgment at the edges, such as how much of a customer success team is support and how much is sales. Because companies draw the line differently, gross margins are only roughly comparable between them.
Margin is not markup
Margin is profit as a share of the selling price. Markup is profit as a share of the cost. A product that costs $60 and sells for $100 has a 40% margin and a 66.7% markup. Confusing the two leads to underpricing.
What affects gross margin
Price, discounting and delivery cost. In software, the main pressures are infrastructure bills that grow with usage, fees for third-party services such as AI models, and services work like custom implementation, which carries far lower margins than the subscription itself.
What is a good gross margin?
A good gross margin depends on the kind of business. As a rule of thumb, subscription software is expected to keep about 70% to 80% or more of revenue as gross profit, because serving one more customer costs little. Services, hardware and retail businesses run much lower, since each sale carries real labour or material cost. A software company well below that range usually has a heavy services component or an expensive cost to serve, and both limit what it can spend on growth.