Unit economics

Gross margin

Also known as Gross profit margin

Gross margin is gross profit as a percentage of revenue: what proportion of each sales dollar is left after the direct cost of delivering the product.

Parag Jain, CPA
Parag Jain, CPAFounder, Zinance·Last updated September 2026

Summarize this article

Key takeaways

  1. Gross Margin % = ((Revenue − COGS) ÷ Revenue) × 100
  2. 70–85% for B2B SaaS; 25–45% for e-commerce
  3. Gross margin is the ceiling on every other margin you will ever report, and it is the number an investor uses to decide what kind of company you are rather than what you call yourself.

What is gross margin?

Gross margin is gross profit as a percentage of revenue: what proportion of each sales dollar is left after the direct cost of delivering the product. It is the ceiling on every other margin in the business, and because it is a percentage it stays comparable as revenue grows — which gross profit in dollars does not.

Formula

Formula

Gross Margin % = ((Revenue − COGS) ÷ Revenue) × 100

  • RevenueNet revenue for the period, after discounts, refunds and returns
  • COGSCost of goods sold: the costs that scale with the number of customers served

Worked example

On $400,000 of quarterly revenue with $92,000 of COGS, gross profit is $308,000 and gross margin is 77% ((400,000 − 92,000) ÷ 400,000).

Benchmarks by stage

Public B2B SaaS companies cluster in the 70–80% range, and investors treat sustained sub-70% margins in a company calling itself software as a sign that services or infrastructure costs are heavier than the label implies. E-commerce is a different business: 25–45% is normal once landed cost, merchant fees and returns are all inside COGS, and anything above 50% usually means something is being left out.

Source: Public SaaS comparables and operator benchmarks (2026)

Gross margin vs gross profit

They are the same calculation reported two ways, and the difference matters more than it sounds. Gross profit is a dollar figure: revenue minus COGS. Gross margin is that figure divided by revenue and expressed as a percentage.

Gross profitGross margin
UnitDollarsPercent
AnswersHow much is left to cover overheadsHow efficiently each sales dollar converts
Comparable across periods as you growNo — it rises with revenue whatever happens to efficiencyYes
Comparable to other companiesOnly at the same sizeYes, within the same model

Use gross profit when the question is whether there is enough money to fund the operating plan. Use gross margin for every trend, every board slide and every comparison, because a rising gross profit can sit on top of a falling margin and usually does in a company growing quickly.

What belongs in COGS

Gross margin is decided almost entirely by where you draw the line between cost of revenue and operating expense, which means it is decided in your chart of accounts rather than in the calculation.

The test is whether the cost scales with the number of customers you serve.

  • In COGS: production hosting and infrastructure, payment processing fees, third-party APIs consumed per customer, implementation and onboarding staff, customer support, and for physical goods the landed cost of inventory, inbound freight and returns.
  • Not in COGS: sales and marketing, engineers building new product, general and administrative, office, and the finance function.

The error that moves the number most

Putting all engineering salary into cost of revenue. It reports 35% for a company whose real margin is 78%, and it is the first thing a diligence process unwinds. Split the team: whoever keeps the existing product running for existing customers is COGS, whoever is building next year's product is R&D.

Three things that quietly distort it

  1. Gross revenue instead of net. Discounts, refunds and returns have to come out of the numerator. An e-commerce business with a 20% return rate reports a margin about ten points too high if it starts from gross sales — and the gap widens exactly when returns are getting worse.
  2. Annual prepayments. Cash collected up front is not revenue for the period. If deferred revenue is not being released properly, margin swings month to month for a reason that has nothing to do with the business.
  3. Free users. Their infrastructure cost sits in COGS while they contribute no revenue, so a growing free tier pushes reported margin down. That is real and worth knowing, but it is a go-to-market fact, not a cost-efficiency one.

Moving it

Only two things change gross margin: charge more, or spend less per customer served. In practice the order of effectiveness is fairly consistent.

  1. Price. A 10% price rise usually falls almost entirely to gross profit, because COGS barely moves. Nothing else on this list is close.
  2. Mix. Shifting volume toward higher-margin plans or products moves the blended number without touching either lever directly.
  3. Infrastructure cost per customer. Real, but slow, and it tends to improve on its own with scale.
  4. Support cost per customer. Usually a product problem wearing a cost-centre costume: the tickets are telling you which part of the product does not work.

Why it matters for fast-growing companies

Gross margin is the ceiling on every other margin you will ever report, and it is the number an investor uses to decide what kind of company you are rather than what you call yourself. It also determines how much revenue you need to cover a given operating plan, which makes it the first input to any hiring or fundraising decision.

Frequently asked questions

What is a good gross margin?+
It depends entirely on the model. B2B SaaS generally runs 70–85%, e-commerce 25–45%, and services businesses 30–50%. Comparing across models tells you nothing useful. Compare to companies with your cost structure, and to your own trend.
What is the difference between gross margin and gross profit?+
Gross profit is the dollar amount left after COGS. Gross margin is that amount as a percentage of revenue. Gross profit answers whether there is enough money to fund the plan; gross margin is the one that stays comparable as the company grows.
Should engineering salaries be in COGS?+
Only the portion keeping the existing product running for existing customers — infrastructure, reliability, implementation, support engineering. Engineers building new product are R&D and belong in operating expenses. Putting all of engineering in COGS understates margin by tens of points.
Why did my gross margin fall while revenue grew?+
Usually mix, discounting, or a free tier growing faster than the paid one. Occasionally it is infrastructure cost outrunning revenue, which is the serious version. Break the number down by plan or product line before concluding anything — the blended figure hides which.

Want these numbers tracked for you?

Zinance handles the books, the reporting, and the CFO-level read-outs for fast-growing companies, so your metrics stay current every day and investor-ready, without the back-office bloat.

✓ Live in 7 business days✓ No long-term contracts✓ Your books belong to you