Profit Margin and Markup Calculator

Margin and markup, without the mix-up

Margin divides profit by the price. Markup divides profit by the cost. Same profit, different denominator, different percentage, and confusing them is one of the most expensive small errors in pricing. This page works in both directions: analyse a cost and a price, or start from the margin or markup you want and solve for the price, or start from a price and a margin and solve for the most the item may cost you.

Everything the unit costs you before fees: product, packaging, inbound freight, the direct costs you count in your gross margin.

Disclaimer: This calculator gives estimates for general information only. It is not financial, medical or other professional advice. It works out gross margin on the figures you enter; it does not decide which of your costs belong in gross margin, which is an accounting policy choice for you and your accountant.

What this calculator does

Four jobs share one page because they share two formulas. The analyser takes a cost and a price and returns profit, margin and markup, with fees taken off the profit, sales tax stripped out of the price before the margin is struck, totals for a quantity, and a discount scenario that shows what a sale does to the margin before you run it. The two pricing modes run the formulas backwards from a target margin or a target markup, and each one also reports the other measure, so a price built on markup can be checked in margin language before it reaches a finance meeting. The cost mode answers the buying question: at this price and this protected margin, the most this unit may cost is a specific number, and anything above it is a negotiation, not a purchase.

Margin versus markup: the denominator trap

Profit is the same in both measures: price minus cost. The measures differ only in what the profit is divided by. Margin divides by the price, so it can never reach 100% while the cost is above zero, and it is the language of accounts and income statements. Markup divides by the cost, so it can run to hundreds of percent, and it is the language of shop floors and price lists. A 40% margin is a 66.67% markup; a 50% markup is only a 33.33% margin. The trap springs when a business prices with one and reports with the other: mark a $60 item up 40% and the price is $84, but the margin on that price is 28.57%, not 40%. To actually earn a 40% margin the price must be $100. That gap, repeated across a catalogue, is the difference between a plan and a surprise.

If the margin isThe markup isIf the markup isThe margin is
10.00%11.11%10.00%9.09%
20.00%25.00%25.00%20.00%
25.00%33.33%50.00%33.33%
30.00%42.86%75.00%42.86%
40.00%66.67%100.00%50.00%
50.00%100.00%200.00%66.67%

How to use it

  • Decide what your cost includes, then be consistent. Gross margin normally counts direct costs: the product, its packaging, inbound freight, direct labour where it applies. Rent, salaries and marketing sit below gross profit in operating costs. Mixing a fully loaded cost into a gross margin comparison bends every decision that follows; the page computes on whatever cost you enter, so the discipline is yours.
  • Fees come off profit, not off the price. A marketplace percentage or a per-order platform fee reduces what you keep. Enter fees per unit in dollars; if your fee is a percentage of the price, work it out on your price and enter that figure. The margin shown is then the margin after fees, which is the only margin that reaches your bank.
  • Tax is never margin. If your price includes sales tax, say so and give the rate: the page backs the tax out and strikes the margin on the net price, which is how accounts do it and the only way margins compare across tax regimes.
  • Run the discount before you announce it. A 10% discount does not cost 10% of margin; on the worked example it takes a 37% margin to 30% and cuts profit per unit by more than a quarter. The discount field exists so the sale is priced with open eyes, and so the volume needed to make the discount worthwhile can be judged against a real number.
  • Losses are shown, not hidden. Price below cost produces negative profit, margin and markup, flagged as a loss. Clearance, loss leaders and market entry pricing can all be rational; an accidental loss discovered at year end is not.

How it is calculated

  • Net price = the price as entered, or price / (1 + tax rate / 100) when the price includes sales tax.
  • Profit per unit = net price – cost – fees per unit.
  • Margin = profit / net price x 100. Markup = profit / cost x 100.
  • Price for a target margin = cost / (1 – margin / 100). Price for a target markup = cost x (1 + markup / 100).
  • Cost a price and margin allow = price x (1 – margin / 100).
  • Discount scenario: the price is reduced by the discount percentage, fees held as entered, and profit and margin are restruck. Totals multiply the per-unit figures by the quantity, with each money line rounded to cents.

Worked examples

The textbook pair. Cost $60, price $100: profit is $40.00, the margin is 40.00% and the markup is 66.67%. One profit, two percentages, both correct, which is precisely why the denominator has to be named every time either word is used.

Fees and a sale, together. The same item with $3.00 of fees per unit: profit is $37.00, margin 37.00%, markup 61.67%. Across 250 units that is $25,000.00 of revenue, $15,000.00 of cost, $750.00 of fees and $9,250.00 of profit. Now discount the price 10%: the price becomes $90.00, profit falls to $27.00 and the margin to 30.00%. The discount took 10% off the price and 27% off the profit; that asymmetry is the whole lesson.

Tax in the price. A price of $120 including 20% sales tax is a net price of $100.00. Against a cost of $80 the profit is $20.00, the margin 20.00% and the markup 25.00%. Strike the margin on the $120 and you would report 33.33%, a figure no accountant would recognise and no comparison would survive.

Pricing backwards. To earn a 40% margin on a $60 cost, the price is $100.00 (and the markup at that price, 66.67%, is reported alongside). To apply a 50% markup to the same cost, the price is $90.00 and the margin only 33.33%. And buying: at a $100 price protecting a 40% margin, the cost ceiling is $60.00; a supplier quote of $64 is not close enough, it is a different margin.

The loss. Cost $100, price $80: profit is -$20.00, margin -25.00%, markup -20.00%, and the page says plainly that the price sells at a loss. Sometimes that is a strategy. It should never be a discovery.

Reading your results

Ask which language the result will be quoted in before you quote it. Margin belongs in financial reporting and in comparisons between products of different prices, because it is a share of the selling price. Markup belongs in pricing conversations on the shop floor, because it is applied to a known cost. When a result crosses from one audience to the other, convert it with the table above or the pricing modes here, and write the word margin or markup next to every percentage in the document. Most margin disputes inside a business are two people using the same percent sign for different denominators, and they end the moment the denominators are on the table.

Limitations

  • This is gross margin. It takes the cost you enter at face value and stops there; overheads, salaries, rent and marketing are not allocated. A healthy gross margin can still sit inside an unprofitable business, and a net margin question belongs to your accounts, not to this page.
  • Percentage fees are entered as dollars. A fee charged as a percentage of the price must be converted at your price before entering. At a discounted price the real fee would also fall; the discount scenario holds the entered fee fixed, which slightly understates the discounted margin where fees are truly proportional.
  • One product, one price. Bundles, tiered pricing, shrink, returns and rebates all bend real-world margins away from the single-unit arithmetic here. The page gives the clean per-unit truth those complications start from.
  • Tax handling is the standard back-out only. Jurisdictions differ on what is taxable and how; the toggle exists to keep tax out of the margin, not to compute anyone’s tax.

Frequently asked questions

What is the difference between margin and markup?

The denominator. Margin is profit divided by the selling price; markup is profit divided by the cost. On a $60 cost and a $100 price, profit is $40 either way, the margin is 40% and the markup is 66.67%. Margin is capped below 100% while cost is positive; markup is not capped at all. Every percentage in a pricing conversation should carry its word with it.

How do I price for a 40% margin?

Divide the cost by (1 – 0.40), that is by 0.60. A $60 cost needs a $100 price. The common error is to add 40% to the cost, which gives $84 and a margin of only 28.57%. The target margin mode on this page does the division for you and shows the equivalent markup alongside, so the price can be defended in both languages.

Can margin be over 100%?

No, not while the cost is positive: margin is a share of the price, and profit cannot exceed the whole price unless the cost is negative. Markup can exceed 100% easily; tripling a $10 cost to a $30 price is a 200% markup and a 66.67% margin. A claimed margin above 100% is a markup wearing the wrong label, every time.

Should fees and tax be inside the margin?

Fees, yes, in effect: a fee you pay per sale reduces the profit the margin measures, and this page takes entered fees off the profit before striking the margin. Tax, no: sales tax collected for the state is never your revenue, so the margin is struck on the net price after the tax is backed out, which the tax toggle on this page does for you.

Related calculators

Method: profit as net price less cost and fees; margin on the net price; markup on the cost; target prices solved from those identities, exactly as defined on this page. Last reviewed: 13 October 2026.