Profit margin and markup calculator

Margin is profit divided by the selling price. Markup is profit divided by the cost. Enter a cost and a price to see both, or enter a cost and a target margin or markup to solve for the price.

Changes the symbol on the results. It does not convert the amounts.

Cost
$40.00
Selling price
$50.00
Gross profit
$10.00
Margin
20%
Markup
25%

Formula

Profit = selling price − cost
Margin = profit / selling price
Markup = profit / cost
Price from a target margin = cost / (1 − margin)
Price from a target markup = cost × (1 + markup)
Markup = margin / (1 − margin)
Margin = markup / (1 + markup)

The solved price is rounded to the cent, and profit is recalculated from that rounded price.

Worked example

A unit that costs $40.00 and sells for $50.00 makes $10.00 of gross profit. Margin is $10.00 / $50.00 = 20%. Markup is $10.00 / $40.00 = 25%.

Starting from the cost of $40.00, a target margin of 20% gives a price of $50.00, because 40 / (1 − 0.20) = 50. A target markup of 25% gives the same price, because 40 × 1.25 = $50.00.

FAQ

What is the difference between margin and markup?

Margin divides profit by the selling price. Markup divides profit by the cost. A cost of 40 and a price of 50 is a profit of 10, a 20% margin, and a 25% markup. They describe the same profit with two different bases.

Why is a 20% margin not a 20% markup?

Markup = margin / (1 − margin). A 20% margin is a 25% markup. A 50% margin is a 100% markup, because the profit is then as large as the cost. Going the other way, margin = markup / (1 + markup).

Can the price sit below the cost?

Yes. Profit, margin, and markup are then negative. A target margin of 100% or more cannot produce a finite price, because the whole price would be profit and none of it would be left for cost. A markup of −100% or lower wipes out the price.

Does this include tax or shipping?

No. Enter the cost and the price on the same basis, either both before tax or both after, and decide whether shipping belongs in the cost. The page does not look up a tax rate.

The result is a planning estimate from the numbers on this page. It is not an invoice, a tax filing, or a marketplace statement.