Profit Margin Calculator

✓ Formula checked against cited sourcesLast updated October 11, 2026How we test

Enter cost and price to see your gross profit margin, or choose a target margin to find the right selling price.

$
$

Gross margin

33.33 %

  • Cost 67%
  • Profit 33%
Markup
50 %
Selling price
$60.00
Profit per unit
$20.00
Cost
$40.00

The short answer

Gross profit margin is profit divided by selling price, times 100. A product that costs $40 and sells for $60 makes $20 profit, a 33.3% margin. To price for a target margin, divide cost by (1 − margin ÷ 100): a 25% margin on a $75 cost needs a $100 price. Margin can never reach 100%, because that would mean the item cost nothing.

Formulas

  • Gross profit = selling price − cost
  • Gross margin % = gross profit ÷ selling price × 100
  • Price for a target margin = cost ÷ (1 − margin ÷ 100)
  • Markup % = gross profit ÷ cost × 100

Worked example

You want a 35% gross margin on a product that costs $26:

  1. Price: 26 ÷ (1 − 0.35) = 26 ÷ 0.65 = $40.00
  2. Profit: $40 − $26 = $14
  3. Markup: 14 ÷ 26 × 100 = 53.8%

Margin to markup conversion

Target margin Required markup Price for a $100 cost
10% 11.1% $111.11
20% 25.0% $125
25% 33.3% $133.33
30% 42.9% $142.86
40% 66.7% $166.67
50% 100% $200
60% 150% $250
75% 300% $400

Using margin to run a business

  • Set margin targets by product line. Low-margin items can still be worth stocking if they sell in volume or bring customers in.
  • Watch for fee creep. Card processing, marketplace and shipping fees come straight out of margin.
  • Revisit prices when costs rise. Keeping the same price after a cost increase quietly shrinks your margin.

Frequently asked questions

How do I calculate profit margin?

Subtract cost from the selling price, divide the result by the selling price, and multiply by 100. Price $80, cost $52 gives 28 ÷ 80 × 100 = 35% margin.

How do I price a product for a 40% margin?

Divide the cost by 0.60 (that is, 1 − 0.40). A $30 cost needs a $50 price for a 40% margin.

What is a good profit margin?

It depends on the industry and on whether you mean gross or net margin. Gross margins for software can exceed 70%, while grocery and fuel retailers run on thin margins. Compare against businesses like yours.

What is the difference between gross and net margin?

Gross margin subtracts only the direct cost of the goods sold. Net margin also subtracts overheads, interest and taxes, so it is always lower. This calculator works out gross margin per unit.

Why is my margin lower than my markup?

Because margin divides the same profit by the bigger number, the selling price. A 50% markup is a 33.3% margin.

Sources

  1. US Small Business Administration – Manage your finances

Related calculators

Add this calculator to your website

Free for any site: paste this code where you want the calculator to appear. It stays up to date automatically.

About this calculator. Every formula on this page is tested against worked examples from the sources above before publishing. Results are estimates for planning; confirm with your supplier, employer or local rules.

Spotted a problem? Tell us and we will check it.