Profit Margin Calculator

Enter your cost and selling price to get gross profit, profit margin, and the equivalent markup — margin and markup side by side, so you never confuse the two. Or switch the known value to solve for the price from a target margin. Looking to price up from cost instead? Use the markup calculator.

How to calculate profit margin

Profit margin is your gross profit as a share of the selling price: margin = (price − cost) ÷ price. Sell a $30 item for $40 and the $10 profit is 25% of the $40 price — a 25% margin. It's the answer to "of every dollar a customer pays me, how much is profit?" Because it's measured against the price, margin can never exceed 100%.

To work backwards from a target — say you want a 40% margin on a $30 cost — divide the cost by one minus the margin: $30 ÷ 0.60 = $50. That's the part people get wrong: you don't add 40% to the cost (that's markup), you gross the cost up so profit is 40% of the final price. Set the known value above to "Profit margin %" and the calculator solves for the price.

Margin vs markup — the one to get right

Margin and markup measure the same profit against different bases. Margin is profit ÷ price; markup is profit ÷ cost. Same $10 on that $30/$40 item: a 25% margin but a 33.3% markup. Since the cost is always smaller than the price, the markup percentage is always the bigger number — which is exactly why quoting "30%" without saying which one leads to mispricing.

The calculator shows both for every input, and the table below converts between them. A rule of thumb: for the same item, markup is always higher than margin, and the gap widens as the numbers grow.

Margin to markup — quick conversion

The same profit, expressed each way (markup = margin ÷ (1 − margin)):

Profit marginEquivalent markup
10%11.1%
15%17.6%
20%25.0%
25%33.3%
30%42.9%
40%66.7%
50%100.0%
60%150.0%

Reverse of this — markup to margin — is on the markup calculator.

Common questions

How do you calculate profit margin?

Margin = (selling price − cost) ÷ selling price × 100. A $30 item sold for $40 makes $10 profit, which is 25% of the $40 price — a 25% margin. Margin is always against the price, not the cost.

What's the difference between margin and markup?

Same profit, different base. Margin is profit ÷ price; markup is profit ÷ cost. $10 on a $30 cost / $40 price is a 25% margin but a 33.3% markup. Markup is always the larger percentage.

How do I find the price from a target margin?

Price = cost ÷ (1 − margin). For a 40% margin on a $30 cost: $30 ÷ 0.60 = $50. Don't just add 40% to cost — that's markup, and only about a 28.6% margin. Switch "Also known" to Profit margin % to solve it.

Is this before or after tax?

It's gross margin — the profit on a sale before overhead, operating costs and income tax. Net profit margin (after all expenses and tax) is a separate, lower figure from your full income statement.