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
| Ratio | Formula |
|---|---|
| Gross margin | (Revenue - COGS) / Revenue |
Cost of goods sold and operating expenses are entered before depreciation and amortisation, which are their own lines.
Related reading
Where the figures behind a ratio come from, and what it takes to trust them.
- Glossary
General Ledger
The general ledger is the master record of an entity's accounts, holding every posted debit and credit by account and period. Subledgers feed it, the chart of accounts defines its structure, and the trial balance is its summary.
- Glossary
Balance Sheet Reconciliation
Balance sheet reconciliation is the practice of reconciling every balance sheet account, not just cash, on a documented schedule with a named owner and risk tier per account. It is the close deliverable auditors test first, and account reconciliation is the technique it applies, account by account.
- Glossary
Variance Analysis
Variance analysis compares an actual result against a benchmark, usually budget, forecast, or prior period, and explains the difference with specific, evidenced causes. It is distinct from flux analysis, which reviews period-over-period fluctuations during the close.
- Free tool
Financial Ratio Calculators
Every ratio from one set of statements.
- Free tool
13-Week Cash Flow Forecast
What a ratio is a snapshot of, week by week.
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.