Profit Margin Calculator

Enter the cost of one unit and either its selling price or the margin you want. You get the profit per unit, the gross margin and the markup, with the steps of the working.

Free Runs in your browser Checked Tuesday, November 10, 2026

What do you know?

Choose the price you sell at, or the margin you want to keep.

What one unit costs you to buy or make.

What the customer pays for one unit, before any discount or sales tax.

Result

Profit per unit — Selling price minus cost.
Gross margin — Profit as a share of the selling price.
Markup on cost — Profit as a share of the cost.
Selling price needed — The price that gives your target margin.

How the figures are worked out

This tool runs in your browser. What you enter is not sent to us.

How to use it

  1. Choose Selling price if you know the price, or Target margin if you want the price that gives a margin.
  2. Type the Cost per unit.
  3. Type the Selling price per unit, or the Target gross margin in percent.
  4. Read the Profit per unit, the Gross margin and the Markup on cost, then the steps below them.

How margin and markup are calculated

Profit is what is left of the selling price after the cost. The gross margin divides that profit by the selling price, and the markup divides it by the cost. Both measure the same profit against a different base, so a 40% margin is not a 40% markup.

The selling price for a target margin follows from the same definition: the cost is the part of the price that is left once the margin is taken, so the price is cost ÷ (1 − margin).

Profit = selling price − cost
Gross margin = profit ÷ selling price
Markup = profit ÷ cost

Selling price for a target margin m = cost ÷ (1 − m)
  • A cost of 60 and a 40% margin give a selling price of 60 ÷ 0.60 = 100, a profit of 40 and a markup of 66.67%.
  • The margin must be below 100%: no price gives a margin of 100% or more.

Margin and markup are not interchangeable

On the same price the markup is always the larger percentage, because it uses the smaller cost as its base. The two convert into each other: margin = markup ÷ (1 + markup), and markup = margin ÷ (1 − margin).

The markup table in the Markup calculator lists the pairs for common values.

What this calculator does not include

  • Discounts, sales tax and VAT, shipping and payment fees.
  • Overheads such as rent, wages and advertising, which are shared between products. They come out of the gross profit, not out of the gross margin.
  • A mix of products with different margins. The average margin of a mix depends on how many units of each you sell.

Worked example: cost 60, selling price 100

The profit per unit is 100 − 60 = 40. The gross margin is 40 ÷ 100 = 40.00%, and the markup is 40 ÷ 60 = 66.67%.

For a 40% margin on the same cost, the selling price is 60 ÷ (1 − 0.40) = 100, which gives the same three figures.

Figure
Profit per unit 40.00
Gross margin 40.00%
Markup on cost 66.67%

Frequently asked questions

What is the difference between margin and markup?

Margin is profit as a share of the selling price. Markup is profit as a share of the cost. With the same profit the markup is always the larger of the two percentages, so a 50% markup is only a 33.33% margin.

Is a 50% markup the same as a 50% margin?

No. A 50% markup on a cost of 100 gives a price of 150 and a margin of 33.33%. A 50% margin on the same cost needs a price of 200, which is a 100% markup.

How do I find the selling price for a target margin?

Divide the cost by one minus the margin. For a cost of 60 and a 40% margin the price is 60 ÷ 0.60 = 100.

Does the gross margin include my overheads?

No. The gross margin uses only the cost of the product. Rent, wages and advertising are taken from the gross profit, which gives the operating margin.

Are my figures sent to a server?

No. The calculation runs in your browser, and nothing you enter is sent to us.

Sources

Figures and text last checked on Tuesday, November 10, 2026.

We use necessary cookies to run the site. With your consent, Google also uses advertising cookies to show personalised ads. If you reject them, you still see ads, but they are not personalised.