Margin & Markup Calculator

Calculate profit margin and markup percentage from cost and selling price, with gross profit, and see why a 50% markup is only a 33% margin.

Runs in your browser. Files never leave your device.
Gross Profit Margin
37.50%

Gross Profit: $30.00

Markup Percentage: 60.00%

Margin = profit ÷ selling price; markup = profit ÷ cost. Amounts are to the cent; percentages are rounded to 2 decimals (halves away from zero).

About the Margin & Markup Calculator

Find the profit margin and the markup percentage of a product from two numbers: what it costs you and what you sell it for. This margin and markup calculator shows the gross profit in money, the margin as a share of the selling price and the markup as a share of the cost, updating as you type.

The two get mixed up constantly, in shops, online listings and quotes, and the gap between them is large: a 50% markup is only a 33.33% margin. With both figures side by side, you're less likely to underprice a product you meant to sell at a healthy profit.

Margin versus markup

Both figures start from the same gross profit, the selling price minus the cost. Margin divides that profit by the selling price, so it tells you how much of every sale you keep. Markup divides the same profit by the cost, so it tells you how much you added on top of what you paid. When you make a profit the price is always larger than the cost, so the margin is always the smaller percentage.

Both prices are rounded to whole cents before any division, and each percentage is shown with two decimals. If the selling price is below the cost, the profit, margin and markup come out negative, and the margin and profit are shown in red so a loss is obvious; the markup figure keeps its usual blue colour, with a minus sign.

gross profit = selling price − cost
margin % = gross profit ÷ selling price × 100
markup % = gross profit ÷ cost × 100

margin = markup ÷ (1 + markup)     markup = margin ÷ (1 − margin)

Assumptions and limits

  • This is gross margin: only the item's cost is counted. Shipping, platform fees, payment fees, rent and wages are not taken off unless you include them in the cost.
  • A cost of 0 is allowed. The margin is then 100% and the markup can't be calculated (it would mean dividing by zero), so it is shown as undefined.
  • The selling price must be more than 0. Costs and prices can't be negative.
  • Tax is ignored, so enter prices without VAT or sales tax for a true margin.

Worked examples

The default: cost $50, price $80

The profit is $30. Divided by the $80 price that is a 37.50% margin; divided by the $50 cost it is a 60.00% markup.

30 ÷ 80 = 37.50% margin    30 ÷ 50 = 60.00% markup

Profit margin on a $19.99 product

A seller buys an item for $12.40 and lists it at $19.99. The gross profit is $7.59, a 37.97% margin and a 61.21% markup, before any marketplace fees.

Selling below cost

Clearing stock that cost $45 at $40 loses $5.00 per item: a margin of −12.50% and a markup of −11.11%. The margin is further below zero than the markup because the same $5 loss is divided by the smaller figure, the $40 price.

Markup and the margin it gives

Worked from margin = markup ÷ (1 + markup), rounded to two decimals.

MarkupMarginPrice on a $10 cost
25%20.00%$12.50
33.33%25.00%$13.33
50%33.33%$15.00
66.67%40.00%$16.67
100%50.00%$20.00
150%60.00%$25.00
200%66.67%$30.00
300%75.00%$40.00

How to use the Margin & Markup Calculator

  1. Enter the item cost. Type what one unit costs you in the Item Cost Price box.
  2. Enter the selling price. Type the price your customer pays in the Revenue / Selling Price box.
  3. Read margin and markup. The gross profit margin, the profit in dollars and the markup percentage update as you type, with no button to press.

Frequently asked questions

What is the difference between margin and markup?

Margin is profit as a share of the selling price; markup is profit as a share of the cost. Buying at $60 and selling at $100 is a $40 profit, which is a 40% margin but a 66.67% markup.

How do I price a product for a 40% profit margin?

Divide the cost by one minus the margin: $60 ÷ (1 − 0.40) = $100. Adding 40% to the cost instead gives $84, which is only a 28.57% margin. Enter your cost and the result price here to confirm the margin.

Can a profit margin be more than 100%?

No. Margin is a share of the selling price, and profit can never be larger than the price, so the highest possible margin is 100%, when the cost is zero. Markup has no upper limit: selling a $5 item for $50 is a 900% markup.

What is a good profit margin?

There's no single figure; it depends on the industry. Groceries and electronics often run on thin gross margins, while handmade goods, software and services can carry much higher ones. Compare your margin with what you need to cover fees, overheads and the profit you want left over.

Should I include shipping and fees in the cost?

Yes, if you want a realistic picture. If an online sale costs $3.50 in fees and postage, add it to the item cost before you enter it. The margin you see is then what you actually keep from each sale.

The figures are gross margin and markup on the prices you enter, for pricing decisions, not accounting or tax advice. Your real profit also depends on fees, overheads and tax.

This tool runs entirely in your browser. What you enter or upload stays on your device and is never sent to our servers.