Gross margin calculator
By Jude Wallis
Gross margin is gross profit divided by sales. $500,000 of sales less $300,000 of cost of goods sold is $200,000 of gross profit, and that is a 40 percent gross margin.
Gross margin
40.00%
$200,000.00 of gross profit on $500,000.00 of sales.
- Gross profit
- $200,000.00
- Gross margin
- 40.00%
Put this on a class page: one iframe, free, for Google Sites, Canvas, WordPress or Notion.
On this page
The formula
Sales is revenue for the period and COGS the direct cost of what was sold. The numerator is gross profit; dividing by sales makes it comparable across businesses.
Margin and markup are not the same number
Gross profit of $200,000 on $500,000 of sales is a 40 percent margin. The same profit measured against the $300,000 of cost is a markup of about 66.7 percent. Both describe the same transaction and they are not interchangeable.
Margin divides by sales; markup divides by cost. Pricing conversations use markup, financial statements use margin, and quoting one as the other is the single most expensive arithmetic confusion in small business pricing.
What belongs in cost of goods sold
Direct costs only: materials, the labour that made the thing, freight in. Rent, salaries for people who did not make the product, marketing and administration are operating expenses and sit below the gross profit line.
Moving a cost across that line changes the margin without changing the business, which is why comparisons between companies need the same definition on both sides. The operating margin calculator measures the next line down, after those operating costs.
The percentage is scale free
The second example, $250,000 of sales and $150,000 of cost, produces $100,000 of gross profit and the same 40 percent margin. Half the size, identical economics, and the percentage says so immediately while the amounts do not.
That is what makes margin the first ratio anyone looks at. It survives comparison across periods and across companies of different sizes, which raw profit never does.
What gross margin covers
One period of sales against the direct cost of those sales. It sets the ceiling on every profit measure below it, because operating costs, interest and tax all come out of what gross margin leaves. Gross margin against net margin traces the distance between the two, and variable costs covers what usually sits in COGS. This is educational material, not financial advice.
Worked examples
\$500,000 of sales at \$300,000 of cost
Sales are $500,000 and cost of goods sold is $300,000. What is the gross profit and the gross margin?
- Gross profit: .
- Margin: , which is 40 percent.
Gross profit is $200,000 and the gross margin is 40 percent on $500,000 of sales.
Half the size, same margin
A second business has $250,000 of sales and $150,000 of cost of goods sold.
- Gross profit: .
- Margin: , again 40 percent.
Gross profit is $100,000 and the margin is 40 percent. Half the scale of the $500,000 business, identical margin.
Setting prices from margin as if it were markup
Wanting a 40 percent margin on $300,000 of cost means pricing at $500,000, not at $300,000 plus 40 percent. The second gives 420000 and a margin under 29 percent. Divide cost by one minus the margin instead of multiplying it up.
Common questions
What is the difference between margin and markup?
Margin divides gross profit by sales; markup divides it by cost. On this example that is 40 percent against roughly 66.7 percent.
Should labour be in cost of goods sold?
The labour directly making the product usually is. Administrative and sales salaries are operating expenses.
Is this financial advice?
No. It is educational material for the gross margin identity.
Keep reading
This page is educational material, not financial advice. The figures come from the formula shown and assume the inputs you enter hold for the whole term. Your own rate, fees, taxes and timing will differ, so treat the output as arithmetic to check a decision against, not as a recommendation.