Free tool · no sign-up

Profit Margin Calculator

Enter a cost and selling price to see profit, margin and markup, or switch modes to find the selling price that gives you a target margin.

By Jamiul Alam Rejon · Updated

$
$
Profit margin40.0%
Gross profit
$40.00
Markup
66.7%
Selling price
$100
Price multiple
1.67x cost
Quick answer

Profit margin is the share of the selling price you keep as profit: margin = (price − cost) ÷ price × 100. Markup is the profit as a share of cost: markup = (price − cost) ÷ cost × 100. To price for a target margin, divide the cost by (1 − margin): a 60 cost at a 40% margin needs a price of 100.

Profit margin formula

Margin=Price − CostPrice×100
Example: (100 − 60) ÷ 100 × 100 = 40%
Gross profit margin: how much of each sale you keep after the cost of the product.
Price=Cost1 − Target margin
Example: 60 ÷ (1 − 0.40) = 100
The selling price for a target margin. Use this instead of adding a percentage to the cost.

Margin vs markup

People mix these up all the time, and it costs money. If you want a 40% margin and add 40% to your cost, you end up with a 28.6% margin. The difference is what you divide by.

Selling price $100Cost $60Profit $40Margin = 40 ÷ 100 = 40%Cost $60Markup = 40 ÷ 60 = 66.7%
Same product, two percentages. Margin divides the profit by the price; markup divides it by the cost.

Margin to markup conversion table

Profit marginMarkup needed
10%11.1%
20%25%
25%33.3%
30%42.9%
40%66.7%
50%100%
60%150%

Markup = margin ÷ (1 − margin). To double your cost (100% markup), you're working at a 50% margin.

Gross, operating and net margin

MarginFormulaWhat it tells you
Gross margin(Revenue − cost of goods) ÷ revenueHow much each sale leaves after the product itself
Operating marginOperating profit ÷ revenueWhat's left after running costs like staff, rent and marketing
Net marginNet profit ÷ revenueThe final share kept after everything, including tax and interest

What a discount does to your margin

Discounts come straight out of profit, so they cut margin much faster than they cut price.

Full price20% off
Price$100$80
Cost$60$60
Profit per unit$40$20
Margin40%25%
Units to earn $4,000 profit100200

A 20% discount on a 40% margin product halves the profit per unit, so you need to sell twice as many to stand still.

Why margin matters for advertising

Your margin decides how much you can spend to win a sale. The break-even ROAS for ads is 1 ÷ margin: a 40% margin needs at least 2.5x return on ad spend, while a 20% margin needs 5x. If your margin is thin, every rise in ad costs eats straight into profit. See where you stand with the ROAS Calculator, and for per-order profit after delivery, fees and returns, the E-commerce Profit Calculator.

Frequently asked questions

How do you calculate profit margin?

Profit margin = (selling price − cost) ÷ selling price × 100. A product that costs 60 and sells for 100 makes 40 profit, a 40% margin.

What's the difference between margin and markup?

Both use the same profit, but margin divides it by the selling price and markup divides it by the cost. 40 profit on a 60 cost and 100 price is a 40% margin and a 66.7% markup. Margin can never reach 100%; markup can be any size.

How do I set a price for a target margin?

Price = cost ÷ (1 − target margin). For a 40% margin on a 60 cost: 60 ÷ 0.6 = 100. Adding 40% to the cost (84) would only give a 28.6% margin, a common pricing mistake.

Gross margin or net margin?

Gross margin uses the direct cost of the product. Net margin subtracts every cost, including delivery, ads, salaries and rent. This calculator works out gross margin; for per-order profit after delivery, fees, ads and returns, use the E-commerce Profit Calculator.

What is a good profit margin?

It depends on the industry, how many you sell and your other costs. A low-margin product can work at high volume; a business with high ad and delivery costs needs a high gross margin to have anything left.