Skip to content
UniKit

Margin and markup calculator

Two-way conversion across cost, price, gross margin and markup: enter the price in the main field and either the cost, the margin or the markup in the controls to derive the rest, plus target prices from a target margin or markup. The margin uses price as its denominator and the markup uses cost, and the result states the difference.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Selling price (CNY)

Result

Computed locally; amounts round to cents and the formula is printed with the result.

Enter a price to convert between margin and markup

Gross profit (CNY): 0 · Gross margin (%): 0 · Markup (%): 0

What this tool does

  • Work out the gross margin before pricing and avoid confusing it with markup.
  • Back out the required price from a target margin.
  • Check whether a purchase price and sell price reach the intended margin.

Example

Input

150

Output

Cost / price / margin / markup converter
Selling price: 150.00 CNY
Cost: 100.00 CNY
Gross profit: 50.00 CNY

Margin (denominator = price) = gross profit / price = 33.33%
Markup (denominator = cost) = gross profit / cost = 50%
Cross-check: markup = margin / (1 − margin) = 49.99%

Note: the margin’s denominator is the selling price (common in retail) while the markup’s denominator is the cost (common in purchasing), so they are not the same number;
for example a 40% margin corresponds to a 66.67% markup. Amounts are rounded to the cent and ratios keep up to 4 decimals.

Example: a price of 150 with a cost of 100 gives 50.00 gross profit, a 33.33% margin and a 50% markup; a 40% margin corresponds to a 66.67% markup.

Frequently asked questions

What is the difference between margin and markup?

Margin is gross profit over price, while markup is gross profit over cost. Purchasing often speaks in markups and retail analysis in margins, and the conversion is markup = margin / (1 - margin).

Why does a 40% margin mean a 66.67% markup?

A gross profit of 40 against a price of 100 implies a cost of 60, so the markup is 40/60 = 66.67%. That is also why adding 40% to cost only yields a 28.57% margin.

Can any two values be combined?

Yes: price plus cost gives both ratios directly, price plus a margin or markup backs out the cost, and a target margin or markup backs out a target price. If neither a cost nor a ratio is supplied the tool reports an error rather than inventing a figure.

Can the margin reach 100%?

No. A margin approaching 100% means a cost approaching zero, so the price cannot be back-calculated proportionally and the tool reports an error; a markup has no upper bound.

Keywords:margin calculatormarkup calculator

Related tools