Margin & Markup Calculator

Compute gross margin, markup and profit per unit from cost and price โ€” or solve for the price you need to hit a target margin.

Profit per unit$20.00
Gross margin20%
Markup25%
Selling price
$100.00
Cost
$80.00

What This Profit Margin & Markup Calculator Does

This calculator turns two numbers you already know โ€” your cost and your selling price โ€” into the figures that actually matter for pricing: gross profit margin, markup, and profit per unit. You can also work backward and let it solve for the price you need to hit a target margin.

It's built for small business owners, retailers, freelancers, e-commerce sellers, and anyone setting prices. If you've ever wondered whether a 40% markup is the same as a 40% margin (it isn't), this profit margin calculator clears that up instantly.

How the Calculations Work (The Formulas)

Margin and markup both measure the gap between price and cost, but they divide by different things. That single difference is where most pricing mistakes come from.

The core formulas are:

  • Profit per unit = Price โˆ’ Cost
  • Profit margin = (Price โˆ’ Cost) / Price, expressed as a percentage of the selling price
  • Markup = (Price โˆ’ Cost) / Cost, expressed as a percentage of the cost
  • Price for a target margin = Cost / (1 โˆ’ Margin), where margin is a decimal (e.g. 0.40 for 40%)

Worked Example With Real Numbers

Say a product costs you $60 and you sell it for $100. Profit per unit is $100 โˆ’ $60 = $40.

Margin = $40 / $100 = 0.40, or 40%. Markup = $40 / $60 = 0.667, or about 66.7%. Same $40 of profit, two very different percentages โ€” because margin divides by the $100 price and markup divides by the $60 cost.

Now reverse it. If that $60 item needs a 40% margin, the price = $60 / (1 โˆ’ 0.40) = $60 / 0.60 = $100. That confirms the math, and it's exactly how to price a new item from a margin goal instead of guessing.

Margin vs. Markup: The Most Common Mistake

Because markup divides by the smaller number (cost), it always looks bigger than the margin for the same sale. A 50% markup is only a 33.3% margin; a 100% markup is a 50% margin. Confusing the two leads to underpricing.

A common error: a shop wants a 30% margin and applies a 30% markup instead. On a $70 cost, a 30% markup gives a $91 price and only a 23% margin โ€” short of the goal. The correct price for a 30% margin is $70 / 0.70 = $100. Always confirm which percentage a supplier or report is quoting.

Tips and Factors That Affect Your Result

These figures are only as good as the cost you feed in. Decide upfront whether you're measuring gross margin or net margin, and keep it consistent.

  • Use full landed cost โ€” include shipping, duties, and payment processing fees, not just the wholesale price.
  • Gross margin ignores overhead (rent, salaries, marketing); your net margin will always be lower.
  • Decide whether your price includes sales tax or VAT, and strip it out before calculating so margins aren't overstated.
  • Margin can never reach 100% (that would mean zero cost), but markup has no upper limit.
  • Discounts cut margin fast: a 20% discount on a 40%-margin item drops the margin to roughly 25%.