Skip to content

Profit margin and markup calculator

Enter your cost and selling price to get the profit margin and markup, or enter a target margin or markup to get the price you should charge. The formula under the result shows the exact calculation.

What you pay per unit, before tax.

Result

Margin60%
Markup150%
Profit per unit30.00

Formula

Margin = (Selling price − Unit cost) ÷ Selling price × 100 · Markup = (Selling price − Unit cost) ÷ Unit cost × 100

This tool runs in your browser. The numbers and prices you enter are not sent to or stored on our servers.

How to use the margin calculator

  1. Choose what you know: a price, a target margin, or a markup.

  2. Enter the product cost (what you pay per unit, before tax).

  3. Enter the price, margin or markup. Results update as you type.

  4. Use the formula line to check the math or repeat it in a spreadsheet.

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. A product that costs $20 and sells for $50 makes $30 profit: a 60% margin ($30 ÷ $50) and a 150% markup ($30 ÷ $20). Same profit, two different percentages, and mixing them up is a common pricing mistake.

MarkupMargin
25%20%
50%33.3%
100%50%
150%60%
200%66.7%

Margin and markup formulas

  • Margin % = (price − cost) ÷ price × 100
  • Markup % = (price − cost) ÷ cost × 100
  • Price from a target margin = cost ÷ (1 − margin)
  • Price from a markup = cost × (1 + markup)
  • Markup = margin ÷ (1 − margin) · Margin = markup ÷ (1 + markup)

A margin can never reach 100%, but a markup can be any size. That's why a 100% markup is only a 50% margin. More in profit margin vs markup.

How do discounts change your margin?

A discount comes straight out of the margin. A product with a 50% margin keeps only 37.5% margin at 20% off: the price drops from $50 to $40 while the $25 cost stays, so profit falls from $25 to $15. Check the margin of your lowest-margin products with the discount calculator before a storewide sale.

Apply your sale prices to Shopify, then restore them

Sale Scheduler by SalePilot applies price rules across your catalog with a preview of every variant, schedules the start and end, and restores previous prices automatically.

Frequently asked questions

Is a 50% markup the same as a 50% margin?

No. A 50% markup on a $20 cost gives a $30 price and a 33.3% margin. A 50% margin needs a $40 price, which is a 100% markup.

What is a good profit margin for an online store?

It depends on the category, your costs and your channel. Compare your gross margin with your other costs (shipping, fees, marketing) rather than with a general benchmark.

Should cost include shipping and fees?

For gross margin, use the landed cost of the product (purchase price plus inbound shipping and duties). Payment fees and marketing are usually tracked below gross margin.

Does the calculator include VAT or sales tax?

No. Enter prices without tax. Tax is collected for the government and isn't part of your margin.

Is the calculator free?

Yes. It's free, needs no sign-up, and runs in your browser.

Related features

LivePricing rules

Bulk price editor

Increase, decrease or set prices across many variants by percent or amount, with a preview of every result.

Read more →

Related guides

All guides →

More free tools

Chat with us on WhatsAppQuestions before or after you install