Gross margin
gross margin = (price − cost) ÷ price
The share of every sale you keep after paying for what you sold. It can never reach 100%, because that would mean the item cost nothing.
Free pricing calculator
Turn a unit cost and selling price into gross profit, gross margin and markup — or find the price that hits a target margin or markup, rounded up to the smallest unit of your currency.
Runs entirely in your browser. Nothing you enter is stored, sent or put in the URL.
Three-letter code such as USD, EUR or JPY. It sets how many decimal places amounts may have and where prices are rounded.
What one unit costs you to buy or make — direct costs only, not rent or salaries.
What the customer pays for one unit, before sales tax.
Still needed: Unit cost and Selling price.
Complete every field without errors to download a summary. Unfinished calculations are never exported.
Both percentages start from the same gross profit. Margin divides it by the selling price; markup divides it by the cost. A product that costs 80 and sells for 100 earns 20 — a 20% margin and a 25% markup.
gross margin = (price − cost) ÷ price
The share of every sale you keep after paying for what you sold. It can never reach 100%, because that would mean the item cost nothing.
markup = (price − cost) ÷ cost
How much you add on top of cost. It has no ceiling: doubling the cost is a 100% markup but only a 50% margin.
To convert: markup = margin ÷ (1 − margin), and margin = markup ÷ (1 + markup).
This calculator covers one product's gross pricing. It does not judge whether a margin is good for your industry. Read the markup-versus-margin guide
Both use the same gross profit (price minus cost). Gross margin divides it by the selling price; markup divides it by the cost. Cost 80 and price 100 give a 20% margin and a 25% markup.
For a profitable sale the cost is smaller than the price, so the same profit is a larger share of the cost. That is why a 50% markup is only about a 33% margin.
A 100% margin means the whole price is profit, so the cost would have to be zero. For any positive cost, the price cost ÷ (1 − 100%) would be infinite, so the calculator asks for a target below 100%.
No. It is gross margin for one unit: only the direct cost of what you sell. Rent, salaries, fees and taxes come out later, in operating and net margin.
No. The calculation runs in your browser, and your numbers are not saved, uploaded or added to the page address. Reloading the page clears them.
Beancount.io records every sale and cost in plain text, so your actual gross margin is a query away instead of a guess.