Profit Margin Calculator

Profit margin = (selling price − cost) ÷ selling price × 100. An item that costs $60 and sells for $100 has a $40 gross profit, a 40% margin and a 66.67% markup. Enter cost and price to see all three, or set a target margin to get the price you need to charge.

By the Calculators With Steps team · Updated November 10, 2026 · How we check our math

What the item costs you (cost of goods sold).

Gross profit margin
40%
$40.00 profit on $100.00 of revenue
Gross profit
$40.00
Gross margin
40%profit ÷ selling price
Markup
66.67%profit ÷ cost
Selling price
$100.00
Cost
$60.00
Step-by-step working
  1. Gross profit = $100.00 − $60.00 = $40.00
  2. Gross margin = $40.00 ÷ $100.00 × 100 = 40%
  3. Markup = $40.00 ÷ $60.00 × 100 = 66.6667%
Selling price at other margins (cost $60.00)
Gross marginMarkupSelling priceProfit
10%11.11%$66.67$6.67
20%25%$75.00$15.00
25%33.33%$80.00$20.00
30%42.86%$85.71$25.71
40%66.67%$100.00$40.00
50%100%$120.00$60.00
60%150%$150.00$90.00
70%233.33%$200.00$140.00

Gross margin uses only the direct cost of the item. Net margin also subtracts overheads, interest and tax.

How to use the profit margin calculator

Pick one of three modes:

  1. Margin and markup from cost and price. Enter what the item costs you and what you sell it for. You get gross profit, gross margin and markup.
  2. Selling price for a target margin. Enter the cost and the margin you want, such as 40%. The calculator gives the price to charge.
  3. Selling price from a markup. Enter the cost and your markup percentage to get the price and the margin it produces.

Every mode also lists the price you would need at common margins from 10% to 70%, so you can compare pricing options quickly.

Profit margin formula

Gross profit = selling price − cost

Gross margin % = gross profit ÷ selling price × 100

Markup % = gross profit ÷ cost × 100

Price for a target margin = cost ÷ (1 − margin)

In Excel or Google Sheets, with cost in A2 and price in B2, the margin is =(B2-A2)/B2 and the markup is =(B2-A2)/A2, both formatted as percentages.

Worked example

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

Measure Working Result
Gross profit $100 − $60 $40
Gross margin $40 ÷ $100 40%
Markup $40 ÷ $60 66.67%

Now suppose you price by adding a 50% markup to the same $60 cost. The price is $90, the profit is $30 and the margin is 33.33%. Same cost, different method, and a margin 6.67 points lower.

Margin vs markup conversion table

Margin and markup describe the same profit from two angles. Margin divides by price, markup divides by cost.

Gross margin Equivalent markup
10% 11.11%
20% 25%
25% 33.33%
30% 42.86%
40% 66.67%
50% 100%
60% 150%
70% 233.33%

Use markup = margin ÷ (1 − margin) and margin = markup ÷ (1 + markup) to convert any other value. A margin can never reach 100% unless the cost is zero, while a markup has no upper limit.

Gross, operating and net profit margin

This calculator works out gross margin, which looks only at the direct cost of the goods sold. Two other margins appear on an income statement:

  • Operating margin subtracts operating expenses such as rent, salaries and marketing, then divides by revenue.
  • Net margin subtracts every expense, including interest and tax. A business with $500,000 of revenue and $40,000 of net income has an 8% net margin.

A healthy gross margin can still leave a thin net margin if overheads are high, so track both.

Common profit margin mistakes

  • Mixing up margin and markup. A retailer who asks for a 30% margin and gets a 30% markup ends up with only 23.08%. Always confirm which base a quoted percentage uses.
  • Leaving costs out. Shipping, packaging, card fees and marketplace commissions are part of the cost of each sale. A seller who buys a product for ₹800 and sells it for ₹1,000 has a 20% margin, but a ₹100 marketplace fee cuts that to 10%.
  • Adding margins across products. A 50% margin on a small item and a 20% margin on a large one do not average to 35%. Add up total profit and total revenue and divide those instead.
  • Ignoring returns and discounts. Use the price you actually receive after coupons and refunds, not the list price.

Pricing tips

  • Set prices from the margin you need. Work out the gross margin that covers overheads and leaves a profit, then use the target-margin mode to price each product.
  • Watch discounts. A 20% discount on an item with a 40% margin gives away half of its profit. Check sale prices with the discount calculator.
  • Keep tax out. Sales tax and GST are collected for the government, so exclude them from both cost and revenue. The sales tax calculator and GST calculator separate tax from a total.
  • Compare investments differently. For a one-off investment rather than a product, the ROI calculator is the better measure.

Profit Margin Calculator: frequently asked questions

How do I calculate profit margin?

Subtract cost from the selling price to get gross profit, divide the profit by the selling price and multiply by 100. A product that costs $60 and sells for $100 has a ($100 − $60) ÷ $100 = 40% gross 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 cost. The same $40 profit on a $60 item sold for $100 is a 40% margin but a 66.67% markup, so markup is always the larger number.

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

Divide the cost by (1 − target margin). For a 40% margin on a $60 cost, the price is $60 ÷ 0.60 = $100. For a 25% margin on a $15 cost, it is $15 ÷ 0.75 = $20.

Why does a 40% markup not give a 40% margin?

Markup is based on cost and margin on price. Adding 40% to a $60 cost gives an $84 price, but the $24 profit is only 28.57% of $84. To earn a 40% margin you need a 66.67% markup.

How do I convert markup to margin?

Margin = markup ÷ (1 + markup). A 50% markup equals a 33.33% margin and a 100% markup equals a 50% margin. Going the other way, markup = margin ÷ (1 − margin).

What is a good profit margin?

It depends on the industry. Grocery stores often run on thin net margins, while software and consulting firms can keep a much larger share of revenue. Compare your margin with businesses like yours and with your own past years rather than with a single universal figure.

How do I calculate profit margin with GST?

Leave GST out of both cost and price, because it is collected for the government and claimed back as input credit. A product bought for ₹800 and sold for ₹1,000 before GST has a 20% margin and a 25% markup.

Disclaimer: This calculator gives estimates for planning and education only. Actual rates, fees and terms vary by lender and provider. It is not financial advice, so check the figures with your bank or a qualified adviser before you make a decision.

How we checked this page: every figure in the examples and FAQs above is produced by this calculator and verified by automated tests against known answers, and the rules and rates come from the sources below. Last updated . Spotted a problem? Tell us.

Browse all financial calculators →