Skip to content

Margin Calculator

Use this margin calculator to find the profit, gross margin and markup on a product from its cost and selling price. You can also work backwards: enter your cost and the margin you want, and get the price to charge.

Calculate from

Profit per unit

$40.00

Each sale earns $40.00, a 40% margin on the selling price.

Gross margin
40%
Markup
66.67%
Selling price
$100.00

The result is a simple price and profit calculation. It ignores overheads, tax and other costs, and it is not financial advice.

How to use this calculator

  1. 1 Choose whether to start from cost and price, or from cost and a target margin.
  2. 2 Enter your cost per unit.
  3. 3 Enter the selling price, or the margin you want to keep.
  4. 4 Read the profit per unit, the gross margin and the markup (or the price you need to charge).

What is profit margin?

Gross margin is the part of the selling price that you keep as profit, shown as a percentage. If an item sells for $100 and costs you $60, you keep $40. That is a 40% gross margin.

Margin tells you how much of every sale is left after the direct cost of the goods. Then you use that money to pay rent, wages, marketing and other costs.

Margin and markup are not the same

Margin is profit divided by the selling price, but markup is profit divided by the cost. They use the same profit but a different base, so markup is always the larger number.

This is a common source of pricing mistakes. For example, a 50% markup does not give a 50% margin. Adding 50% to a $60 cost gives $90, and the profit of $30 is only 33.33% of that price.

Margin and markup side by side

The table below uses a cost of $60. It shows the price you need for each target margin, and also the markup that goes with it.

Cost of $60 per unit
Target marginSelling priceProfit per unitMarkup
20%$75.00$15.0025%
25%$80.00$20.0033.33%
30%$85.71$25.7142.86%
40%$100.00$40.0066.67%
50%$120.00$60.00100%

How to set a price from a margin

To reach a target margin, divide your cost by (1 − margin). For a $60 cost and a 40% margin, that is 60 ÷ 0.60 = $100. Do not just add 40% to the cost, because that gives a margin of only 28.57%.

The “cost and margin” option does this for you. However, a margin must be below 100%, since you cannot keep the whole price as profit when you have a cost.

Tips and limits

Keep these points in mind, because they affect how you use margin to price a product:

  • This is gross margin. It counts only the direct cost of the item. Overheads such as rent and wages come out of the margin later.
  • Include every direct cost. Add shipping, packaging and any fees you pay per sale.
  • Discounts reduce margin fast. See what a sale does to your price with the discount calculator.
  • Taxes are separate. Sales tax and VAT are not part of your margin. Use the VAT calculator to add or remove VAT.
  • Measure the return on a spend. For a larger purchase or a project, the ROI calculator is the better fit.

The formula

Gross margin

Margin = (Price − Cost) ÷ Price × 100

Price
selling price per unit
Cost
cost per unit

Markup

Markup = (Price − Cost) ÷ Cost × 100

Price − Cost
profit per unit

Price from a target margin

Price = Cost ÷ (1 − Margin)

Margin
target margin as a decimal (40% is 0.40)

Worked example

A product costs $60 and sells for $100

  1. 1.Profit: $100 − $60 = $40
  2. 2.Gross margin: $40 ÷ $100 × 100 = 40%
  3. 3.Markup: $40 ÷ $60 × 100 = 66.67%

Profit $40.00 per unit, gross margin 40%, markup 66.67%.

Frequently asked questions

How do you calculate profit margin?

Subtract the cost from the selling price, divide by the selling price, and multiply by 100. For a $60 cost and a $100 price, the margin is 40%.

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. The same $40 profit on a $60 cost is a 40% margin and a 66.67% markup.

How do I find the selling price for a target margin?

Divide your cost by (1 − the margin as a decimal). For a 25% margin on a $60 cost, the price is 60 ÷ 0.75 = $80.

What is a good profit margin?

It depends on the industry. Some businesses work with thin margins and high volume, and others need high margins to cover costs. Compare with similar businesses and your own costs.

Why can the margin not be 100%?

A 100% margin would mean the whole price is profit, which is only possible with a cost of zero. For any real cost, no price reaches 100%, so the tool accepts margins up to 99.99%.

Is gross margin the same as net margin?

No. Gross margin counts only the cost of the goods. Net margin also subtracts overheads, interest and tax, so it is lower.

Last reviewed by the GridCalculators team.