Margin calculator

Give any two of cost, price, margin and markup and get the rest, with the profit.

How it works

  1. Pick which two values you know: cost, price, margin or markup
  2. Type those two values
  3. Read the profit, margin, markup, cost and price

Which two values you can type

The I know choice has five pairs: cost and price, cost and margin, cost and markup, price and margin, price and markup. Only the two you choose are shown as boxes, and the page works out the other two plus the profit. Margin and markup together are not offered, because they describe the same ratio from two sides and do not fix the amounts: a 25% markup and a 20% margin fit a cost of 80 and a cost of 8,000. Cost and price must be more than 0. Margin goes from -1,000 to below 100, markup from -100 (excluded) upwards, so a loss can be entered as a negative figure.

The formulas

Profit = price − cost. Margin % = profit ÷ price × 100. Markup % = profit ÷ cost × 100. The reverse formulas are price = cost ÷ (1 − margin ÷ 100) and price = cost × (1 + markup ÷ 100), and cost = price × (1 − margin ÷ 100) or price ÷ (1 + markup ÷ 100). With cost 60 and price 100 the profit is 40, the margin 40% and the markup 66.67%. The page opens on exactly this example and the box under the answer shows each step with your numbers.

Margin against markup

Both use the same profit but divide by different things, so the same sale has two different percentages. Margin is a share of the selling price and can never reach 100%. Markup is a share of the cost and can be above 100%. A 25% markup on a cost of 80 gives a price of 100 and a margin of only 20%. A 25% margin on a price of 200 means a cost of 150 and a markup of 33.33%. Mixing the two up when setting a price is a common reason a price comes out too low.

Rounding and what is left out

Calculations use full precision and values are rounded to 2 decimals only when shown. A margin of 100 or more, or a markup of -100 or less, is refused with a message under the box, because it would mean a cost of 0 or a price of 0 or below. The price is taken as before any sales tax, and costs other than the one you type (shipping, fees, discounts) are not added. This is an estimate, not financial advice.

Frequently asked questions

What is the difference between margin and markup?

Margin is profit ÷ price and markup is profit ÷ cost. With cost 60 and price 100 the profit is 40, so the margin is 40% and the markup is 66.67%. Same sale, two percentages. Markup can exceed 100%, margin cannot.

How do I find the selling price from a margin?

Choose Cost and margin. Price = cost ÷ (1 − margin ÷ 100). For a cost of 75 and a 25% margin the price is 75 ÷ 0.75 = 100.00, the profit 25.00 and the markup 33.33%.

How do I find the cost if I know the price and the margin?

Choose Price and margin. Cost = price × (1 − margin ÷ 100). For a price of 200 and a 25% margin the cost is 150.00 and the profit 50.00.

Why can margin not be 100% or more?

A margin of 100% would need a cost of 0, since profit ÷ price = 1 only when profit equals price. The page asks for a margin below 100 in that case. Negative margins are allowed and mean a loss.

Does the calculator include tax or shipping?

No. It uses only the numbers you type. Take sales tax out of the price first, and add any shipping or fees to the cost if you want them counted.