Margin and markup both describe the profit on a sale, and they are easy to mix up. Mix them up when you set prices and you can quietly lose money: a 30% markup does not give you a 30% margin. This calculator removes the guesswork. Type in any two of cost, selling price, margin percentage and markup percentage, and it fills in the other two.
You also get gross profit per unit, optional totals for any number of units, and a table showing the price you would need at common margins from 10% to 60%, with the matching markup next to each. It works in both directions, so it suits a shop owner pricing stock, a freelancer checking a quote, or anyone reading a supplier's markup and wondering what it means for margin.
Reviewed by: CalcMojo Editorial Team
Margin vs markup: the one difference that matters
Both numbers start from the same profit: profit = price - cost. They differ in what they divide by.
- Gross margin = profit / price x 100. It answers: of every dollar a customer pays, how many cents are profit?
- Markup = profit / cost x 100. It answers: by what percentage did I raise the price above what I paid?
Take a product that costs $60 and sells for $100. Profit is $40. Margin is 40 / 100 = 40%. Markup is 40 / 60 = 66.67%. Same sale, two different percentages, and the markup is always the bigger number when profit is positive because cost is smaller than price.
The formulas
Given any two of the four values, the rest follow:
| You know | Price | Cost |
|---|---|---|
| Cost and margin % | cost / (1 - margin) | cost |
| Cost and markup % | cost x (1 + markup) | cost |
| Price and margin % | price | price x (1 - margin) |
| Price and markup % | price | price / (1 + markup) |
To convert between the two percentages directly:
- Margin = markup / (1 + markup)
- Markup = margin / (1 - margin)
with percentages written as decimals (40% is 0.40). A 50% markup gives a margin of 0.5 / 1.5 = 33.3%. A 25% margin needs a markup of 0.25 / 0.75 = 33.3%. A 50% margin needs a 100% markup, which is why "double the cost" gives you exactly half of the price as profit.
Worked examples
Pricing from a target margin. A product costs $60 and you want a 40% margin. Price = 60 / (1 - 0.40) = $100. Gross profit is $40, and the markup you applied is 66.67%. Many people try 60 x 1.40 = $84 here, which is only a 28.6% margin: (84 - 60) / 84.
Pricing from a supplier's markup. You pay $80 and the retail convention in your trade is a 25% markup. Price = 80 x 1.25 = $100, profit $20, margin 20%.
Working backward from a price. A customer pays $150 and your margin on that job is 20%. Cost = 150 x (1 - 0.20) = $120, profit $30, and the markup is 25%.
Selling below cost. Cost $100, price $80. Profit is -$20, margin is -25% and markup is -20%. The calculator accepts negative results so you can see a loss clearly.
Price at common margins
The table in the calculator uses your cost and shows what price each margin requires. For a $60 cost:
| Margin | Equal markup | Price | Profit |
|---|---|---|---|
| 10% | 11.11% | $66.67 | $6.67 |
| 20% | 25.00% | $75.00 | $15.00 |
| 30% | 42.86% | $85.71 | $25.71 |
| 40% | 66.67% | $100.00 | $40.00 |
| 50% | 100.00% | $120.00 | $60.00 |
| 60% | 150.00% | $150.00 | $90.00 |
Notice how quickly the required markup climbs as the margin target rises. Going from 40% to 60% margin takes the markup from 67% to 150%.
Gross margin is not net profit
Gross margin only subtracts the direct cost of what you sold: materials, goods bought for resale, or direct labour. It does not subtract rent, software, marketing, payment-processing fees, shipping you absorb, discounts, returns, wages, loan interest or tax. A 40% gross margin can still end in a loss if overheads are higher than the gross profit.
So choose a margin target by working backward: add up your monthly overhead, estimate how many units you can sell, and see what gross profit per unit covers it with something left over. The units box in the calculator gives you total revenue, total cost and total gross profit for a given quantity, which is a quick check on that.
A quick break-even check
Gross profit per unit also tells you how many sales you need to cover fixed costs. Break-even units = monthly overhead / gross profit per unit. With the default example, each unit earns $40. If your fixed costs are $2,000 a month, you need 50 units a month just to break even, and every unit after that is profit before tax. If a price cut drops the profit per unit to $30, the same overhead needs about 67 units. Run both prices through the calculator and compare before you discount.
Which one should you use?
- Use margin when you talk about profitability, compare products, or report results. Margin is a share of revenue, so it is directly comparable with other percentages in your income statement.
- Use markup when you set prices from cost and need a simple multiplier, as in retail and many trades.
- Always say which one you mean. "We make 30%" is ambiguous. If a supplier, accountant or manager quotes a percentage, confirm whether it is on cost or on price. Using the wrong one can shift a price by double digits.
Common mistakes
- Adding the margin percentage to cost. Cost plus 30% is a 30% markup, not a 30% margin.
- Forgetting that discounts cut margin faster than they look. A 10% discount on a 30% margin product takes the margin to about 22% (price 0.90, cost 0.70, profit 0.20, margin 0.20 / 0.90 = 22.2%).
- Ignoring fees. If a marketplace takes 15% of the sale price, subtract it before judging margin.
- Using 100% margin. A margin of 100% means cost is zero. The formula breaks down above that, so the calculator rejects margins of 100% or more.
Related tools: the discount calculator shows the effect of price cuts, the percentage calculator handles general percentage questions, and the sales tax calculator adds tax to a price.
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. For the same sale, markup is always the larger percentage. A product bought for $60 and sold for $100 has a 40% margin and a 66.67% markup.
How do I calculate selling price from cost and margin?
Divide cost by one minus the margin as a decimal. For a $60 cost and 40% margin: 60 / (1 - 0.40) = $100.
How do I calculate selling price from cost and markup?
Multiply cost by one plus the markup as a decimal. For an $80 cost and 25% markup: 80 x 1.25 = $100.
How do I convert markup to margin?
Margin = markup / (1 + markup). A 50% markup is 0.5 / 1.5 = 33.3% margin. To go the other way, markup = margin / (1 - margin).
What is a good profit margin?
It depends heavily on the industry, the product and your overheads, so no single number is right. Judge it by whether gross profit covers your operating costs with something left over, not by comparison with an unrelated business.
Why can't I enter a 100% margin?
A 100% margin would mean a cost of zero and an infinite markup. The formulas cannot produce a price from a cost at that point, so the calculator asks for a margin below 100%.
Does this include tax, shipping or fees?
No. It calculates gross margin from the cost and price you enter. Add shipping, fees or other direct costs to your cost figure if you want them reflected.
Sources & Methodology
- Margin and markup are arithmetic definitions rather than regulated figures, so there is no single official rate or limit. The formulas on this page (margin = profit / price, markup = profit / cost) are the standard definitions.
- IRS Publication 334, Tax Guide for Small Business — includes a chapter on figuring gross profit (sales less cost of goods sold) for tax reporting, which is the gross profit concept used here.
- All calculations run in your browser. Results are rounded for display only.
This calculator provides estimates for educational purposes only. It does not constitute financial, tax or accounting advice. Results show gross margin before overheads, taxes and fees. Confirm pricing and profitability decisions against your own full costs or with a qualified accountant.
Data accurate as of: November 2026