Profit Margin Calculator – Margin, Markup and Selling Price

Enter cost and selling price to get the profit, profit margin and markup — or enter a target margin to find the price you need to charge.

Runs in your browser 100% free No sign-up
Quick answer

Profit margin = (price − cost) ÷ price × 100. If something costs $40 and sells for $100, the profit is $60 and the margin is 60 %. To reach a target margin, price = cost ÷ (1 − margin); for a 40 % margin on a $40 cost, that is $66.67.

How to use Profit Margin Calculator

  1. Enter the cost of the product or service.
  2. Choose “I know the price” and enter the selling price — or “I know the margin” and enter the margin you want.
  3. Read the profit margin or the selling price you need.
  4. Compare margin and markup in the results; they are not the same number.

Margin formula

Profit margin (gross margin) shows what share of the selling price you keep as profit:

Margin = (price − cost) ÷ price × 100

Markup is related but different — it compares the profit with the cost instead of the price:

Markup = (price − cost) ÷ cost × 100

Margin vs markup

MarkupMarginPrice for a $100 cost
20 %16.7 %$120
25 %20 %$125
50 %33.3 %$150
100 %50 %$200
150 %60 %$250

Margin can never reach 100 %, while markup has no upper limit. Mixing the two up is one of the most common pricing mistakes: a business that “adds 30 %” to its costs earns only a 23 % margin.

Pricing for a target margin

If you know the margin you need, work backwards: price = cost ÷ (1 − margin). For a 40 % margin on a $40 cost: 40 ÷ 0.6 = $66.67. Simply adding 40 % to the cost would give $56 — a margin of only 28.6 %.

What is a good profit margin?

It depends on the industry. Grocery and fuel retailers often work with gross margins under 25 %, restaurants with food-cost margins around 65–70 %, and software or digital products with 80 % or more. Compare yourself with businesses like yours, and remember that gross margin must still cover rent, wages, marketing and taxes before anything is left as net profit.

Gross margin vs net margin

This calculator shows gross margin on a product: price minus the direct cost of that product. Net margin subtracts all business expenses and is calculated from your profit and loss statement. To find how many units you must sell to cover fixed costs, use the Break-Even Calculator; to price from your costs, try the Markup Calculator.

You may also find these free tools useful: Compound Interest Calculator, Fuel Cost Calculator and Electricity Cost Calculator.

Frequently asked questions

How do I calculate profit margin?

Subtract the cost from the selling price, divide by the selling price and multiply by 100. A $100 price with a $40 cost gives a 60 % margin.

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 50 % markup equals a 33.3 % margin.

How do I find the price for a 30 % margin?

Divide the cost by 0.7 (that is, 1 − 0.30). A $70 cost needs a price of $100.

Can profit margin be over 100 %?

No. Margin is a share of the price, so it is always below 100 %. Markup, however, can be any size.

Is this gross or net margin?

Gross margin: price minus the direct cost of the item. Net margin also subtracts overheads such as rent, salaries and taxes.

Last updated: