Profit margin and markup calculator

Find your margin, your markup, or the price that hits a target.

Everything it costs you to buy or deliver one unit, before tax.

The price a customer pays, before tax.

Results

Profit per unit

0.00

The figure this mode finds. The label changes with the mode.

Profit per unit
0.00
Profit per unit
0.00
Margin
0.00%
Markup
0.00%
Selling price
0.00
Cost
0.00
Total profit
0.00

Your data stays in your browser. Nothing is uploaded.

For information only, not financial, tax or legal advice.

Last updated 2026-10-30. Method checked 2026-10-30. Methodology

Margin and markup describe the same gap between what an item costs and what it sells for, but they measure it against different things. Mixing them up can quietly erase a profit. This calculator has four modes. Enter cost and selling price to see the profit, the margin, and the markup. Enter cost and a target margin to get the price to charge. Enter cost and a markup to get the price and the margin it gives you. Or enter a price and a target margin to see the cost you must stay under. Add a quantity for the total profit of an order. Prices are before tax. It runs in your browser and nothing you type is sent anywhere.

How to use the Profit Margin and Markup Calculator

  1. Choose what you know: cost and price, cost and margin, cost and markup, or price and margin.
  2. Enter the cost or the selling price, whichever the mode asks for. Tip: Use the full cost of one unit, including delivery, packaging, and any fees you pay on each sale.
  3. Enter the margin or markup percentage if the mode asks for one, and pick your currency.
  4. Read the profit, margin, markup, and price. Add a quantity to see the total profit for an order.

Worked example

A product bought for USD 60.00 and sold for USD 100.00. All figures are USD.

Inputs of the worked example
InputValue
ModeCost and selling price
Cost per unitUSD 60.00
Selling price per unitUSD 100.00
Profit = 100.00 - 60.00 = USD 40.00
Margin = 40.00 / 100.00 x 100 = 40.00%
Markup = 40.00 / 60.00 x 100 = 66.67%
Same cost with a 35% target margin: 60.00 / (1 - 0.35) = USD 92.31
Same cost with a 35% markup: 60.00 x 1.35 = USD 81.00
With a quantity of 250, total profit = 40.00 x 250 = USD 10,000.00
Profit per unit
USD 40.00
Margin
40.00%
Markup
66.67%

When you give a margin or a markup, the other percentage comes from the exact conversion between them, not from the rounded price. For example, a 40% margin always shows a 66.67% markup, even when the rounded money would give a figure a cent away.

How it is calculated

Profit = price - cost
Margin % = profit / price x 100
Markup % = profit / cost x 100

Profit is the selling price minus the cost. Margin measures that profit against the selling price, and markup measures it against the cost. Because the cost is smaller than the price, the markup is always the larger percentage for the same sale. A 50% markup is a 33.33% margin, and a 100% markup is a 50% margin.

The other modes run the same relationship backward. A price from a target margin is cost / (1 - margin / 100). A price from a markup is cost x (1 + markup / 100). A cost from a price and a margin is price x (1 - margin / 100). To convert one percentage to the other, margin = markup / (100 + markup) x 100, and markup = margin / (100 - margin) x 100.

Money is rounded half up to the currency decimals, once for each line. Percentages are rounded half up to 2 decimals. When you enter a margin or a markup, the percentage the tool shows for the other measure comes from the exact conversion, not from the rounded price. That keeps a 40% margin at a 66.67% markup every time.

Edge cases are handled in the open. A selling price of 0 has no margin, so the tool asks for a price above 0. A cost of 0 gives a 100% margin and no markup, because dividing by zero has no answer. A price below the cost is a loss. The tool shows the loss in orange, and the margin is negative. With a quantity above 0, total profit is the profit per unit multiplied by the quantity.

The quick reference table lists markups from 10% to 100% with the margin each one gives. It is fixed and does not change with your inputs.

Frequently asked questions

What is the difference between margin and markup?

Margin is profit divided by the selling price. Markup is profit divided by the cost. Take a USD 40.00 item sold for USD 60.00. The profit is USD 20.00, which is a 33.33% margin and a 50.00% markup. Markup is always the larger figure for the same sale, so check which one a report or a supplier means.

How do I work out a price from a target margin?

Divide the cost by 1 minus the margin written as a decimal. For a 25% margin on a USD 80.00 cost, that is 80.00 / 0.75, which is USD 106.67. Multiplying the cost by 1.25 gives USD 100.00 instead, and that price only earns a 20.00% margin. This is a very common pricing slip.

Why can the margin not reach 100%?

A 100% margin would mean the profit equals the whole selling price, so the item would have cost nothing. The formula also divides by 1 minus the margin, which is zero at 100%. The calculator blocks any margin of 100% or more and asks for a lower figure. A markup has no such limit and can be any size.

Should tax be in the cost or the price?

Work with figures before sales tax, VAT, or GST, because that tax is collected for the government and is not part of your profit. If your cost includes tax you can reclaim, enter the cost without it. Once the price is set, add tax on top with the VAT and GST calculator.

Is this gross margin or net margin?

It gives gross figures. Gross margin only subtracts the direct cost of the item or job from the price. Net margin also subtracts overheads such as rent, wages, software, and interest. To see how many units you must sell to cover those overheads, use the break even calculator.

Guides for this tool

Sources