Margin and selling price calculator

Calculate the selling price from a cost and a margin (or a markup), or work backwards to find the margin and markup from a selling price that's already set. The calculation runs entirely in your browser.

Example:

How it works

"Margin" and "markup" are often confused, but they're calculated differently: margin is a percentage of the selling price, while markup is a percentage of the cost. This tool starts from what you know (cost + target margin, cost + markup, or cost + a price that's already set) to work out all the others.

Why don't a 30% margin and a 30% markup give the same selling price?

Because the base of the calculation is different. A 30% markup on a cost of €20 gives a selling price of €26 (20 × 1.30). A 30% margin means the profit must make up 30% of the final selling price, which gives a selling price of €28.57 (20 / (1 - 0.30)) — higher, because the profit is calculated on a selling price that isn't known at the outset.

Why can't the margin ever reach 100%?

A 100% margin would mean a cost of zero relative to the selling price, which only makes sense if the product truly costs nothing to make or buy. Mathematically, the formula price = cost / (1 - margin) tends toward infinity as the margin approaches 100%, which is why this tool caps it at 99.99%.

Your costs and prices are never sent to a server: the calculation stays entirely local to your browser.