Business and Pricing

Profit Margin Calculator

Find profit margin from cost and price, or the price needed for a target margin, with markup shown alongside.

Your numbers

What do you want to find?

Result

Profit margin

40%

Profit per sale
$40.00
Profit margin
40%
Markup on cost
66.67%
Selling price
$100.00
How this was calculated
  1. Profit = price - cost = $100.00 - $60.00 = $40.00.
  2. Margin = profit / price = $40.00 / $100.00 = 40%.
  3. Markup = profit / cost = 66.6667%. Margin and markup are different measures.

Next step

How to use the profit margin calculator

  1. Choose Profit margin from cost and price or Price needed for a target margin.
  2. Enter your cost, then either the selling price or the target margin.
  3. Read the profit, the margin and the markup side by side.

Formula

Profit = price - cost

Margin = profit / price x 100

Markup = profit / cost x 100

Price for a target margin = cost / (1 - margin)

Margin is a share of the selling price. Markup is a share of the cost. For the same sale the markup is always the larger number.

Worked example: a $60 item sold for $100

Profit is $100 - $60 = $40. Margin is $40 / $100 = 40%. Markup is $40 / $60 = 66.67%.

To earn a 40 percent margin on a $60 cost you must charge $60 / (1 - 0.40) = $100. Charging $60 plus a 40 percent markup gives only $84, which is a 28.57 percent margin.

Margin versus markup

Mixing them up is one of the most expensive pricing mistakes. A 50 percent markup is a 33.33 percent margin. A 50 percent margin needs a 100 percent markup. The markup calculator shows both numbers for a given price.

Gross margin and net margin

This calculator treats "cost" as whatever you enter. If you include only the direct cost of the product, the result is a gross margin. Net margin subtracts all expenses, such as rent, wages and fees, so it is lower.

Setting prices with margin

If your costs rise, margin shrinks unless you raise prices. A 40 percent margin on a $60 cost needs a $100 price. If the cost rises to $66 and the price stays at $100, margin falls to 34 percent. Recheck margin whenever a supplier changes its price.

Assumptions and limits

  • A target margin must be below 100 percent.
  • Prices must be above zero. Selling below cost shows a negative margin and a warning.
  • Taxes, fees and shipping are included only if you add them to the cost.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

What is a good profit margin?

It depends on the industry. Retail, restaurants and software have very different norms, so compare against businesses like yours rather than a single number.

How do I calculate selling price from margin?

Divide the cost by 1 minus the margin. A $30 cost with a 25 percent margin sells at $30 / 0.75 = $40.

Can the margin be negative?

Yes. If the price is lower than the cost you are losing money on each sale.