📈 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
- For a target margin: price = cost / (1 - margin). A 40% margin on a $40 cost needs 40 / 0.60 = $66.67.
- For a target markup: price = cost × (1 + markup). A 40% markup on $40 is $56.00, which is only a 28.57% margin.
- To convert: margin = markup / (1 + markup). A 100% markup is a 50% margin; a 300% markup is a 75% margin.
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.