Gross Margin Calculator

Cost and price in, gross margin and markup out. Both, every time, because they are different numbers and mixing them up sets prices too low.

Live output

Enable JavaScript to customise; default output below.

What the item costs you: materials, manufacturing, the wholesale price you paid.

What you sell it for, before tax.

Add the totals for a batch. One unit leaves them out.

Live preview margin.txt
Cost             $40.00
Price            $70.00
Profit per unit  $30.00

Gross margin     42.9%
Markup           75%

Units            250
Revenue          $17,500.00
Total profit     $7,500.00

42.9% of the price is profit, and the price is 75% above the cost. Those
two are the same money described from opposite ends.

Output is valid and updates as you type.

Margin and markup are the same money divided by two different numbers, and mixing them up is the most expensive arithmetic mistake in small business pricing. Margin divides the profit by the price. Markup divides it by the cost. A 50 percent markup is a 33 percent margin, so a shop that means “margin” and types “markup” sells at a third less profit than it planned.

This reports both, from the same two figures, every time.

How to use

  1. Put in what the item costs you and what you sell it for.
  2. Read the two percentages. They will not match, and the gap is the point.
  3. Set Units to a batch size to see the revenue and total profit.

Example

A product that costs 40 and sells for 70:

Cost             $40.00
Price            $70.00
Profit per unit  $30.00

Gross margin     42.9%
Markup           75%

Thirty dollars of profit is 42.9 percent of the seventy you charged, and 75 percent of the forty it cost you. Both are true. Which one you mean depends on who you are talking to: a retailer talks in margin, a maker talks in markup, and a spreadsheet does whichever it was told.

The rule of thumb worth memorising is the 50 to 33 pair. Doubling your cost is a 100 percent markup and a 50 percent margin. Adding half is a 50 percent markup and a 33 percent margin.

Pitfalls

A 100 percent margin is impossible. Margin is a share of the price, so it caps at 100 percent, which would mean the item cost you nothing. Markup has no ceiling. If a tool reports a margin above 100, it is reporting markup.

Cost means landed cost. Materials, manufacturing, shipping into your warehouse, import duty, and the payment processing fee on the sale. Leaving the fee out is how a 3 percent margin becomes a loss.

This is gross margin, not profit. It does not know about your rent, your salaries or your tax. A healthy gross margin and no money at the end of the year is an ordinary outcome; the profit margin calculator on this site shows where it goes.

Discounts hit margin harder than they look. Ten percent off a price with a 40 percent margin takes a quarter of the profit, not a tenth of it.

Tax is not part of the price here. Use the price before VAT or sales tax. Tax is collected on behalf of the tax office and is never yours.

Compatibility

Arithmetic, done in the browser: nothing is uploaded and nothing is stored. The currency only changes how the numbers are printed, and yen is rounded to whole units because that is how it is spent.

The share link at the bottom of the page carries the figures, so a price you worked out can be sent to someone else exactly as you saw it.

Frequently asked questions

Which number should I use when a supplier asks for my markup?
Markup, and say so explicitly: “75 percent on cost”. The ambiguity is the reason to name the divisor out loud.
What margin should I aim for?
It depends on the trade, and anyone who gives you one number is selling something. Physical retail often works on 50 percent, food service on 60 to 70 percent of food cost, software on 80 percent and up because the marginal cost is near zero. The useful question is not the industry average, it is whether the margin covers your operating costs at the volume you can actually sell.
How do I work backwards from a margin I want?
Divide the cost by one minus the margin. For a 40 percent margin on a 40 dollar cost: 40 / 0.6 = 66.67. The markup calculator does that in the other direction.
Why does the profit per unit not match my accounts?
Because accounts include the costs this does not: the processing fee, the returns, the breakage, the discount you gave to close the sale. Gross margin is the ceiling, not the outcome.
Does it handle a loss?
Yes, and it says so plainly rather than printing a negative percentage and leaving you to notice.
Weekly drops

New tools, when there are new tools

One email when something worth using ships. No schedule to fill, so no filler.

Your address goes nowhere else, and one click unsubscribes.