Profit Margin & Markup Calculator

Enter cost and price to get gross margin and markup, or enter a target margin to get the price you need to charge.

Runs in your browser; nothing you type is sent anywhere. · Updated

How to use the margin calculator

  • Know your price? Enter cost and selling price to see margin, markup and profit per unit.
  • Setting a price? Enter cost and a target margin; the calculator gives the price.

Margin vs. markup

Formula $40 cost, $65 price
Gross profit price − cost $25
Margin profit ÷ price 38.5%
Markup profit ÷ cost 62.5%

Margin is profit as a share of the price; markup is profit as a share of the cost. Margin is always lower than markup for the same product.

Markup Equals margin
25% 20%
50% 33.3%
100% 50%
200% 66.7%

Pricing for a target margin

Price = cost ÷ (1 − target margin)

To earn a 40% margin on a $40 item: $40 ÷ 0.60 = $66.67. A common mistake is adding 40% to cost ($56), which only gives a 28.6% margin.

What cost to use

For gross margin, use the cost of goods sold: product cost, inbound shipping, packaging and payment processing fees. Overhead like rent and salaries belongs in the break-even calculator. If you import, tariffs change your cost: see the tariff calculator.

Frequently asked questions

How do I calculate profit margin?

Subtract cost from price, divide by price and multiply by 100. $25 profit on a $65 sale is a 38.5% margin.

What is the difference between margin and markup?

Margin divides profit by the selling price; markup divides profit by the cost.

What is a good profit margin?

It varies by industry: grocery stores run on a few percent, while software and many online products have gross margins above 70%.