How to calculate gross margin
Subtract cost of goods sold from revenue to get gross profit, divide gross profit by revenue, and multiply by 100. Gross profit is the dollar amount. Gross margin, also called gross profit margin, is that amount as a percentage of revenue.
- Gross profit = revenue - cost of goods sold.
- Gross margin = gross profit / revenue.
- Multiply by 100.
The calculator also solves the formula for the other two numbers:
- Revenue needed = cost of goods sold / (1 - gross margin / 100). Costs of $125,000 at a 75% target need $125,000 / 0.25 = $500,000 of revenue.
- Highest COGS = revenue x (1 - gross margin / 100). To hold 75% on $500,000 of revenue, cost of goods sold must stay at or under $125,000.
Use revenue and costs from the same period.
What counts as cost of goods sold?
Cost of goods sold, or COGS, is every cost that exists because a sale was delivered, and nothing else. Sales, marketing, product development and office costs are operating expenses and sit below gross profit.
| Business | Usually in COGS | Not in COGS |
|---|---|---|
| Software as a service | Hosting, third-party software inside the product, customer support, onboarding, payment fees | Sales, marketing, building new features |
| Online store | Product cost, packaging, shipping to the customer, payment fees | Advertising, website costs, office staff |
| Agency or services | Pay for the people doing client work, contractors, tools bought for a client | New business, management, rent |
The line is a judgment in places, so decide it once and keep it the same every period. A margin that improves because support costs were moved out of COGS has not improved.
How to read the result
A gross margin of 75% means each $1 of revenue leaves 75 cents to pay for sales, marketing, product, overheads and profit. Everything else in the business is funded from that share, which is why it sets the limit on what you can afford to spend to win a customer.
It also feeds other metrics. Customer lifetime value should be worked out on gross profit, not revenue, and break-even return on ad spend is 1 divided by gross margin.
What is a good gross margin?
A good gross margin is one high enough to cover operating costs at the size you plan to reach, and it varies by business model. These are rules of thumb, not benchmarks:
- Software sits highest. Serving one more customer costs little, so a common rule of thumb for subscription software is a gross margin of 70% to 80% or more. A figure well under that usually means heavy hosting, support or services costs.
- Services sit lower. Each hour sold needs a paid hour of someone's time, so the margin depends on rates and how fully people are booked.
- Physical goods depend on the category. Product cost and shipping are in every sale, so the margin follows pricing power and volume.
- Direction matters as much as level. Gross margin should hold or rise as you grow, because fixed delivery costs are spread over more revenue. If it falls, each new customer is costing more to serve.
Common mistakes
- Putting too little in COGS. Leaving out support, onboarding or payment fees makes the margin look better than it is.
- Confusing gross margin with markup. Margin divides gross profit by revenue. Markup divides it by cost. See the markup calculator for the conversion.
- Using bookings instead of revenue. Match revenue recognised in the period with the costs of delivering it in the same period.
- Blending very different lines. Subscriptions and one-off services have different margins. Calculate each, then the total.