Profit Margin Calculator

Work out your profit margin and markup from cost and price, or set a target margin or markup and find the price to charge.

Updated September 2026 Formulas tested
$
$
%
%

Quick answer: Margin is profit as a share of the selling price: margin = (price − cost) ÷ price. Markup is profit as a share of the cost: markup = (price − cost) ÷ cost. An item that costs $60 and sells for $100 has a 40% margin and a 66.7% markup, which are the same profit described two ways.

Margin and markup both describe profit, but they measure it against different things, and mixing them up is one of the most common pricing mistakes. Margin compares profit to the selling price. Markup compares profit to your cost. A product with a 50% markup has only a 33% margin.

Use this calculator when you set prices for a shop, a marketplace listing, a service or a quote. Enter your cost and price to see both numbers, or start from the margin you need and let it calculate the price.

Margin and markup formulas

Profit = Selling price − Cost
Margin % = Profit ÷ Selling price × 100
Markup % = Profit ÷ Cost × 100
Price for a target margin = Cost ÷ (1 − margin)
Price for a target markup = Cost × (1 + markup)

The margin here is gross margin: it only subtracts the direct cost of the item. Fees, shipping, advertising and overheads need to be included in your cost, or your real profit will be lower than shown.

A worked example

Example. An item that costs $60 and sells for $100 earns $40 profit. That is a 40% margin (40 ÷ 100) and a 66.67% markup (40 ÷ 60). To earn a 40% margin on a $60 cost you must charge $60 ÷ 0.6 = $100. A 40% markup would only give $84.

Price needed for a target margin

Target marginPrice for a $60 costProfit
30%$85.71$25.71
40%$100.00$40.00
50%$120.00$60.00

To reach a margin you divide the cost by (1 − margin). Adding the same percentage to the cost would give a lower margin.

MarkupPrice for a $60 costProfit
30%$78.00$18.00
40%$84.00$24.00
50%$90.00$30.00

Markup is added to the cost, so a 50% markup on $60 gives $90, which is a margin of 33.3%.

Common mistakes to avoid

  • Mixing up margin and markup. A 50% markup is only a 33.3% margin, so adding 50% to your cost does not give a 50% margin.
  • Ignoring costs that are not in the price of the goods, such as shipping, fees, returns and your own time.
  • Setting a price from a target markup when your suppliers, or your bank, talk about margin. Convert both to the same measure first.
Please note. Results are estimates for planning and use the numbers and simplified assumptions you enter. Fees, taxes and lender rules can change the real figures. This is not financial advice. See our disclaimer.

Frequently asked questions

Which is better, margin or markup?

Neither is better. They are two views of the same profit. Margin is easier to compare with financial statements and industry benchmarks. Markup is quick for setting prices from cost. Just be clear which one you are using.

What is a good profit margin?

It depends heavily on the industry. Software can run at very high gross margins, while grocery retail is often in the low single digits. Compare against businesses like yours rather than a single target.

Should marketplace fees be included in cost?

Yes. If you sell on a platform that charges fees or ships for you, add those per-item costs to your cost. Otherwise the margin shown will be higher than what you actually keep.

Can the margin be negative?

Yes. If the selling price is below cost, profit and margin are negative, and the calculator flags it.

People also search for this as: margin calculator, markup calculator, gross profit margin calculator, selling price calculator, markup vs margin, how to calculate profit margin.

Sources and further reading

Formulas on this page are checked by automated tests against independent references. See how we test our tools.

Press Esc to close