Skip to main content
Tools

Free pricing calculator

Margin and markup 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.

Your numbers

What do you want to work out?

You know what one unit costs you and what you charge for it.

You know the cost and the share of the selling price you want to keep as gross profit.

You know the cost and the percentage you want to add on top of it.

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.

Results

Still needed: Unit cost and Selling price.

Download this result

Complete every field without errors to download a summary. Unfinished calculations are never exported.

Margin vs. markup: same profit, different base

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

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

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

Margin and markup questions

What is the difference between margin and markup?

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.

Why is markup always higher than margin?

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.

Why can a target margin not be 100%?

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%.

Is this my net profit margin?

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.

Is anything I type stored or sent?

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.

Keep your real margins in your books

Beancount.io records every sale and cost in plain text, so your actual gross margin is a query away instead of a guess.