MARGIN CALCULATOR

Margin calculator

Enter your cost and price, get the margin and markup.

$
$

How do I calculate profit margin?

Margin = (price − cost) ÷ price × 100. An item that costs $60 and sells for $100 has a $40 profit and a 40% margin.

What is the difference between margin and markup?

Margin divides the profit by the price; markup divides it by the cost. The same $60-to-$100 item has a 40% margin but a 66.7% markup.

How do I price for a target margin?

Price = cost ÷ (1 − margin). For a 40% margin on a $60 cost: $60 ÷ 0.6 = $100. A margin can never reach 100%.

How do I price with a markup?

Price = cost × (1 + markup). A 50% markup on $60 is $90 — which is only a 33.3% margin.

Is this gross or net margin?

Gross margin — price minus the cost of the item itself. Net margin also subtracts rent, wages and other running costs.

How do I convert margin to markup?

Markup = margin ÷ (1 − margin). A 25% margin is 0.25 ÷ 0.75 = 33.3% markup. The other way, margin = markup ÷ (1 + markup).

How does a discount change my margin?

The cost stays the same while the price falls, so margin drops faster than the discount. A $60 item sold at $100 has a 40% margin; at 20% off ($80), the profit is $20 and the margin 25%.

Setting a price from a target

Because margin is a share of the price, the price you need is cost ÷ (1 − margin). Markup is a share of the cost, so price = cost × (1 + markup). The two are linked and a 100% margin is impossible, since it would need an infinite price. Conversions: 20% margin = 25.0% markup; 25% margin = 33.3% markup; 30% margin = 42.9% markup; 40% margin = 66.7% markup; 50% margin = 100.0% markup.

Worked example: a $42 item with a 35% target margin

Price = $42 ÷ (1 − 0.35) = $64.62. Profit is $22.62, the margin checks out at 35.0%, and the markup on cost is 53.8%. Pricing with a 35% markup instead would give $42 × 1.35 = $56.70, a margin of only 25.9%. A 20% discount on the earlier $60-cost, $100 item brings the price to $80 and the margin to 25%, and the markup to 33.3%.

When fees come out of the price

Marketplace and payment fees are usually a percentage of the selling price, so they work like a part of the margin you have to give up. If you want to keep a 35% margin after a 3% fee (an example rate; use your own), the price is cost ÷ (1 − 0.35 − 0.03) = $42 ÷ 0.62 = $67.74. Check: the fee is $2.03, the cost is $42.00, and $23.71 is left, which is 35.0% of $67.74. Pricing at $64.62 and then subtracting the fee would leave 32.0% instead. A flat per-order fee is added to cost instead, before dividing.

Margin of a mix of products

The margin of a whole sale is not the average of the individual margins. Item A sells for $50 and costs $30, a 40% margin; item B sells for $100 and costs $80, a 20% margin. The simple average is 30%, but together they bring in $150 on $110 of cost, a profit of $40, which is 26.7%. The larger item weighs more. Always add up revenue and cost first, then calculate the margin once.

Mistakes to avoid

The most costly error is mixing the two: a quote of "40% on cost" and "40% margin" are very different prices. Another is counting only the item's purchase cost. Shipping to you, packaging, payment fees and returns belong in cost if you want the margin to show what you keep. The tool shows gross margin only. Last, margin percent and profit in dollars do not move together: a lower margin on a higher price can bring in more money per sale.

Sources: the definitions are the standard ones (margin = profit ÷ price, markup = profit ÷ cost); no rate or legal source is involved. Related tools: break-even calculator, discount calculator.

Estimates for planning only — not financial, tax or legal advice. Your lender's or employer's figures decide. How we check our calculators.