Money

Profit Margin Calculator

Enter your cost and selling price to see profit, margin and markup, or flip it to find the price that hits a target margin.

FreeNo sign-upRuns in your browserReviewed 2026-10-24

Your numbers

What do you want to find?
Price & cost

What it costs you to deliver one unit.

What the customer pays.

Saved on this device

Result

Updates as you type

Enter a cost and a selling price to see the result.

What this calculates

Profit margin is the share of each sale you keep after paying the cost of what you sold. It is the number most pricing decisions turn on, and it is easy to confuse with markup.

Use the first mode when you already know your price and cost. Use the second when you know the margin you want and need the price that delivers it.

The formula

Profit = Selling price − Cost
Margin % = Profit ÷ Selling price × 100
Markup % = Profit ÷ Cost × 100
Price for target margin = Cost ÷ (1 − Margin %/100)
Selling price
What the customer pays, before any tax you collect on behalf of a tax authority.
Cost
What it costs you to supply one unit: materials, subcontractors, direct labour.
Margin
Profit as a share of the selling price. It can never exceed 100%.
Markup
Profit as a share of cost. It can exceed 100%.

Assumptions

  • Gross margin only: overheads, tax and payment fees are not deducted unless you include them in cost.
  • All amounts are in one currency.

Worked example

You sell a product for $100 and it costs you $60 to supply.

  1. 01Profit = $100 − $60 = $40
  2. 02Margin = $40 ÷ $100 × 100 = 40%
  3. 03Markup = $40 ÷ $60 × 100 = 66.7%

A 40% margin is the same deal as a 66.7% markup.

How to read the result

A healthy margin depends on your model. Retail and resale often run on 20–50% gross margin; services and software are frequently higher because the cost of supply is mostly time. Compare against your own history and your overheads, not a universal number.

A negative margin means you are selling below cost: each sale loses money before overheads.

Common mistakes

  • Treating a 50% markup as a 50% margin. A 50% markup gives a 33.3% margin.
  • Leaving out costs that scale with each sale, such as payment fees, shipping or subcontractor time.
  • Using a target margin of 100% or more. Margin is a share of price, so it is always below 100%.

Frequently asked questions

What is the difference between margin and markup?
Both measure profit, but against different bases. Margin divides profit by the selling price; markup divides profit by the cost. The same sale always has a higher markup than margin.
How do I price something for a 40% margin?
Divide your cost by 0.6 (that is 1 minus 0.4). A $60 cost becomes a $100 price. The calculator's second mode does this for any target.
Is this gross or net margin?
Gross, based only on the cost you enter. Add overheads into the cost field if you want a fuller picture.
How do I calculate gross profit?
Subtract the cost of what you sold from the selling price. A $100 sale that cost $60 to supply leaves $40 of gross profit, a 40% gross margin. Overheads such as rent and salaries come out later, on the way to net profit.

Keep going