Profit Margin Calculator · Practical guide

How to Calculate Selling Price From Cost and Margin

Divide the cost by (1 minus the margin) — and never just add the percentage on top of cost.

At a glance

The Formula

To price an item for a target margin, use selling price = cost / (1 - margin / 100). For a $50 cost at a 40% margin: 50 / (1 - 0.40) = 50 / 0.60 = $83.33. That price yields $33.33 of gross profit, which is exactly 40% of the $83.33 selling price. Enter cost and margin in the calculator above and it returns the price, profit, and equivalent markup instantly.

Interactive tool

Profit Margin Calculator

Enter your own values, then compare the result with the examples below.

Profit Analysis

Gross Profit -
Margin % -
Markup % -
Revenue -
Cost -

Price Lookup: $50 Cost

Target MarginSelling PriceGross ProfitEquivalent Markup
20%$62.50$12.5025%
30%$71.43$21.4342.86%
40%$83.33$33.3366.67%
50%$100.00$50.00100%

The Mistake Almost Everyone Makes

Adding the margin percentage to the cost is wrong. Marking a $50 item up to $70 (adding 40%) does not give a 40% margin — the profit of $20 divided by the $70 price is only a 28.57% margin. Margin is measured against the selling price, not the cost, so the divisor formula above is the only correct route. To hit a true 40% margin you must charge $83.33.

Working Backwards From a Price

If the selling price is already set and you need the margin, flip the formula: margin = (price - cost) / price x 100. Selling that $50 item at $80 gives (80 - 50) / 80 = 37.5%. The calculator handles this direction too — enter cost and revenue and it fills in margin and markup.

Frequently Asked Questions

Why can't I just add the margin percentage to the cost?

Because margin is a share of the selling price, not of the cost. Adding 40% to a $50 cost gives $70, which is only a 28.57% margin — you need $83.33 for a true 40%.

What price gives a 50% margin on a $50 cost?

Charge $100. Using the formula: 50 / (1 - 0.50) = $100, which leaves $50 of profit — exactly half the selling price.

Does the calculator solve for price from margin?

Yes. Enter a cost and a target margin percentage, leave the other fields blank, and it calculates the required revenue, profit, and markup.

What markup equals a 40% margin?

A 40% margin equals a 66.67% markup. The calculator shows both percentages in every result so you never have to convert by hand.