Profit Margin Calculator

Calculate gross profit margin and markup, or find the selling price you need for a target margin

Last updated: October 20, 2026

How to Use the Profit Margin Calculator

How to calculate profit margin and markup

  1. Pick what you need. Choose Margin and markup to analyse an existing price, or one of the other options to price a product from a target margin or markup.
  2. Enter your numbers. Use your total cost per item (what you paid or spent to make it) and the selling price, or the percentage you are aiming for.
  3. Read the results. You will see gross profit in dollars, gross margin as a percentage of price, and markup as a percentage of cost.
  4. Test prices. Switch to Selling price from a target margin to see the price needed for a 30%, 40% or 50% margin before you set your prices.

This calculator shows gross margin: it only subtracts the direct cost of the item. It does not include overhead, shipping, payment fees or tax.

Formula & Methodology

Profit margin formulas

Gross profit = Selling price − Cost

Gross margin % = Gross profit ÷ Selling price × 100

Markup % = Gross profit ÷ Cost × 100

Worked example

You buy a product for $60 and sell it for $100.

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

Margin vs. markup

Both describe the same profit, but measured against different bases. Margin compares profit to the selling price; markup compares it to the cost. A 40% margin is the same as a 66.67% markup, and a 50% markup is only a 33.3% margin.

| Margin | Markup | |---|---| | 20% | 25% | | 25% | 33.3% | | 30% | 42.9% | | 40% | 66.7% | | 50% | 100% |

Finding a selling price

  • From a target margin: Price = Cost ÷ (1 − Margin %)
  • From a target markup: Price = Cost × (1 + Markup %)
  • Cost from price and margin: Cost = Price × (1 − Margin %)

About Profit Margin Calculator

Our profit margin calculator is a free, easy-to-use tool designed to help you calculate gross profit margin and markup, or find the selling price you need for a target margin. For professionals or those who need quick calculations, our calculator provides accurate results instantly.

Frequently Asked Questions

How do you calculate profit margin?

Subtract your cost from the selling price to get gross profit, divide that by the selling price, and multiply by 100. A product that costs $60 and sells for $100 has a gross profit of $40 and a margin of 40%.

What is the difference between margin and markup?

Margin is profit divided by the selling price; markup is profit divided by the cost. Because the selling price is larger than the cost, margin is always a smaller percentage than markup for the same sale. Mixing them up is one of the most common pricing mistakes: a 50% markup gives only a 33% margin.

What is a good profit margin?

It depends on the industry. Many retailers work with gross margins of roughly 25% to 50%, software and digital products are often far higher, and grocery and distribution can be in single digits. Compare your number with businesses like yours rather than a single benchmark.

How do I convert margin to markup?

Markup = Margin ÷ (1 − Margin). A 25% margin becomes 0.25 ÷ 0.75 = 33.3% markup. To go the other way, Margin = Markup ÷ (1 + Markup), so a 100% markup is a 50% margin.

How do I price a product to get a 40% margin?

Divide your cost by 0.60 (that is 1 − 0.40). A product that costs $60 needs to sell for $60 ÷ 0.60 = $100. Choose "Selling price from a target margin" above to calculate this for any cost.

Is gross margin the same as net margin?

No. Gross margin only subtracts the direct cost of the goods sold. Net margin also subtracts operating expenses such as rent, salaries, marketing, fees and taxes, so it is always lower. This tool calculates gross margin.

Can profit margin be negative?

Yes. If you sell below cost, your profit is negative and so is the margin. For example, selling a $60 item for $50 is a loss of $10, which is a −20% margin.

Enter your values
$

What it costs you to buy or make the item (COGS)

$

The price your customer pays

Your result will appear here

Loading…