📈 Profit Margin Calculator

Enter your cost and selling price to get gross profit, margin (profit as a percent of revenue) and markup (profit as a percent of cost). This is a general calculation, not accounting or tax advice.

Margin and markup from the same two numbers

Profit is the difference between price and cost. Margin divides it by the price, markup divides it by the cost:

gross profit = selling price - cost
margin %     = gross profit / selling price × 100
markup %     = gross profit / cost × 100

Cost $40, price $60: profit is $20, margin is 20 / 60 = 33.33%, markup is 20 / 40 = 50.00%. Same sale, two very different percentages, which is why quoting "50%" without saying which one you mean causes so much trouble. A cost of zero gives an infinite markup, and the tool prints that rather than a number.

Working backwards to a price

This is gross margin only. Whatever you put in the cost box is treated as the entire cost of that unit, so rent, wages, advertising and tax are all still to come out of the $20. A product with a healthy gross margin can still lose money once overhead is spread across it.

Frequently asked questions

What is the difference between margin and markup?

Both measure the same dollars of profit against a different base. Margin is profit as a share of what the customer paid; markup is profit as a share of what you paid. Markup is always the larger number.

How do I convert markup to margin?

Divide the markup by one plus the markup. A 25% markup is 0.25 / 1.25 = 20% margin. Going the other way, markup = margin / (1 - margin), so a 20% margin is 0.20 / 0.80 = 25% markup.

What price gives me a 50% margin?

Double the cost. Margin of 50% means price = cost / 0.5, so a $40 item sells for $80. Adding 50% to the cost instead gives $60, which is only a 33.33% margin - the mistake that quietly halves a lot of profit.