Free online margin and markup calculator. Enter cost and price for profit, gross margin % and markup % — or work back from a target. Runs in your browser.
The calculation runs in your browser. Nothing is uploaded.
You have the cost and the selling price — we find profit, margin % and markup %.
Margin is % of price; markup is % of cost.
This is an arithmetic calculator, not financial or accounting advice.
Pick From price if you have the cost and the selling price. Pick From margin if you have the cost and a target gross margin %. Pick From markup if you have the cost and a target markup %. The tool fills in everything else.
Type the cost, then the price, margin % or markup % depending on the mode you chose. Margin is a percentage of the selling price; markup is a percentage of the cost — they are different, so enter the one you actually mean.
Profit, gross margin % and markup % are calculated instantly and rounded to two decimals, with the selling price shown when you work backwards. If the price is below cost the profit and margin come out negative — that is a real loss, not an error.
No. The calculation runs entirely in your browser with JavaScript — the cost and price you enter never leave your device and nothing is uploaded. There is no registration and no tracking of what you calculate.
They measure the same profit against different bases, so they are not interchangeable. Profit = price − cost. Margin (gross margin) is profit as a percentage of the selling PRICE: margin = profit ÷ price × 100. Markup is profit as a percentage of the COST: markup = profit ÷ cost × 100. Example: cost 80, price 100 → profit 20 → margin = 20 ÷ 100 = 20%, but markup = 20 ÷ 80 = 25%. The same deal is a 20% margin and a 25% markup. Margin is always below 100%; markup can exceed 100%. Confusing the two is a common and costly pricing mistake — this tool computes both so you can see them side by side.
From a target markup: price = cost × (1 + markup ÷ 100) — e.g. cost 80 at 25% markup = 100. From a target margin: price = cost ÷ (1 − margin ÷ 100) — e.g. cost 80 at 20% margin = 100. A margin of 100% or more is impossible (it would need an infinite or negative price), so the tool rejects it. This is an arithmetic calculator, not financial or accounting advice.