Free tool

Gross Margin Calculator

Gross profit and gross margin from revenue and cost of goods sold, with the part that is actually hard: deciding what belongs in cost of goods sold.

Work it out

Opens on a worked example. Change any line and every figure follows. Cost of goods sold and operating expenses go in before depreciation and amortisation.

Cost of goods sold, line by line

Runs entirely in your browser. Nothing you enter is sent to us or stored.

Gross margin

71.0%

How it is worked out

RatioFormula
Gross margin(Revenue - COGS) / Revenue

Cost of goods sold and operating expenses are entered before depreciation and amortisation, which are their own lines.

The formula

Gross profit = Revenue - COGS Gross margin = Gross profit / Revenue

What the number means

The arithmetic is trivial and the classification is not. Two companies in the same business can report gross margins twenty points apart purely because one puts customer support, hosting and payment fees above the line and the other puts them below it. Neither is wrong. They are not comparable.

The lines people disagree about, with the convention this tool uses and the reason:

  • Shipping out to the customer. Commonly a selling expense, not COGS, though a company that prices delivered goods often puts it in. Pick one and be consistent, because moving it is a free way to improve a margin and someone will notice.
  • Payment processing fees. Frequently in COGS for a company that sells direct, because they scale exactly with revenue and nothing else does.
  • Hosting and infrastructure, for software. In COGS where it serves customers. Development and test environments are not COGS, they are R&D.
  • Customer support. The genuine dividing line in software gross margins. Support that is part of delivering the product is COGS; support that is a sales function is not.
  • Depreciation on production assets. In COGS, and the reason a capital-heavy company's gross margin looks worse than a competitor who leases.

A worked example

A SaaS company reporting 88% gross margin that is 71% once hosting, support and the data provider it resells are classified consistently, and why the 71% is the number its board should see.

Ratios are downstream
of the close.

Connected accounts, reconciled at zero tolerance, with statements for any period and any entity. Your team approves what the agents propose, and the numbers the ratios come from are ones you can sign.