Margin Calculator

Enter selling price and cost. The calculator computes margin: (price − cost) / price × 100. At 100 and 70 the result is 30% margin and about 42.9% markup. That is not the same: a 25% markup on 80 makes a 100 price, and then margin is only 20%.

Inputs

Options: quantity and VAT
Optional extras

Result

Enter a value. The result shows up here.

Markup on the same cost: markup percent. Price for a target margin: price from margin. Cash per unit: gross profit.

How it works

(100 − 70) / 100 = 30% margin
Price100
−
Cost70
→
Margin30%

Margin says how much of the price is left after cost. You subtract cost from price, divide by price, and multiply by one hundred. At 100 and 70 you keep 30 from every 100, so 30%. At 150 and 90 you keep 60 of 150, so 40%. When price equals cost, margin is zero: you sell at cost. When cost is higher, margin goes negative and you see a loss per unit, not a form error.

People mix this up with markup, because both look like “a profit percent.” Markup divides the same gap by cost, not by price. A 25% markup on 80 lifts the price to 100. On that 100 you keep 20, so margin is 20%, not 25%. To hold a 25% margin at a cost of 80, the price has to be about 106.67. That is already a 33% markup. Another pair: 100 and 70 is 30% margin, but about 43% markup.

Price must be greater than zero, because you divide by it. Cost zero at a positive price is 100% margin: the whole price is profit. Negative amounts will not run. Quantity does not change the percent on one unit. If you enter 10 at 100 and 70, you see 1000 revenue, 700 cost, and 300 profit, and margin stays 30%.

Optional VAT treats the entered price as gross. Net is price divided by (1 plus VAT/100). The calculator then also reports margin on that net against cost, which we take as net. 123 at 23% VAT is 100 net. If cost is 70, margin on gross and margin on net are two different percents, both on the page.

The percent is a ratio. Optional money rows use the same currency you entered for price and cost. 100 and 70 stay 100 and 70 whether you label them dollars, euros, or zloty. A comma and a period in 99.90 mean the same amount. Skip thousand spaces.

The markup page next door computes the other fraction from the same pair. Price from margin goes the other way: you know cost and want 30% of the future price, not a percent from two ready amounts. Gross profit leaves the cash gap and does not divide.

Article hook: the pair 100 and 70 is 30% margin and about 42.9% markup. Someone saying “I give 30%” may mean markup — then price from 70 would be 91, not 100.

How to use

  1. In selling price, enter the amount, for example 100. Optional profit rows will use that same currency.
  2. In cost, enter what one unit costs you, for example 70. Zero cost is fine and gives 100% margin.
  3. Click Calculate. 100 and 70 give 30.0%. 80 and 80 give 0.0%. 150 and 90 give 40.0%.
  4. Leave quantity empty if you are pricing one unit. 10 units at 100 and 70 keep 30% and show 300 total profit.
  5. Leave VAT empty when the price is already net. If you enter 23, the calculator peels tax off the price and adds a net-margin row.

Formula

margin % = (price − cost) / price × 100

markup % = (price − cost) / cost × 100 (when cost > 0)

At 100 and 70: margin 30%, markup ≈ 42.9%. Both appear in the result panel.

Margin, VAT, and markup in this calculator

The calculator divides profit by price. 100 and 70 give 30% margin. 123 at 23% VAT is 100 net, and net margin is then a second percent.

margin
The slice of price left after cost: (price − cost) / price × 100. At 100 and 70 that is 30. At 150 and 90 it is 40. Cost 0 at 100 is 100%.
markup
The same cash divided by cost, not by price. A 25% markup on 80 makes a 100 price and leaves only 20% margin in this calculator.
VAT
Optional tax treated as already inside a gross price. 123 at 23% peels to 100 net. An empty field leaves the 30% from 100 and 70 alone.

Real-life examples

Example 1

150 and 90 -> 40.0% margin.

Example 2

100 and 70 -> 30.0% of price.

Example 3

200 and 100 -> 50.0% margin.

Example 4

80 and 80 -> 0.0%, price = cost.

Example 5

120 and 90 -> 25.0% margin.

Example 6

50 and 40 -> 20.0% of price.

Example 8

250 and 200 -> 20.0% margin.

Ways to use this calculator

  • You check that a 100 list price at cost 70 really holds 30% margin before you cut the price on a call.
  • You compare two SKUs with different costs when someone says “I give 25%” and you do not know if that is margin or markup.

FAQ

How is margin calculated?

Margin = (price − cost) / price × 100. At 100 and 70 the result is 30%.

How is markup shown in results?

Markup = (price − cost) / cost × 100. At 100 and 70 that is about 42.9%. Both percents appear side by side.

How does margin differ from markup?

Margin divides by price; markup divides by cost. 25% markup on 80 yields price 100 and only 20% margin.

What if cost is zero?

Margin is 100%. Markup has no denominator — the result shows a dash.

Why the quantity field?

Percent per unit does not change. Quantity scales revenue, cost, and batch profit.

How does optional VAT work?

Price is treated as gross. Net = price / (1 + VAT/100), then margin on net versus cost.

How do I calculate percent margin from a sale?

Margin = (price − cost) / price × 100. At 100 and 70: 30 / 100 = 30%. At 150 and 90: 40%. At 200 and 100: 50%.

Why is 30% margin not the same as 30% markup?

Margin divides profit by price; markup divides by cost. At 100 and 70, margin is 30% and markup is about 42.9%. A 25% markup on 80 makes a 100 price and only a 20% margin.

Does this calculator solve for price from a target margin?

No. Here you enter a ready price and cost. Price from a target margin lives on the price-from-margin page (price = cost / (1 − margin/100)).

How does this differ from the markup calculator?

The markup page treats markup as the main path. Here the primary result is margin on price; markup appears beside it for comparison.

Does the result include income tax?

No. It is gross margin on a unit sale. Income tax and fixed costs are outside this page — break-even is separate.

Margin = (price − cost) / price × 100. At 100 and 70 the result is 30%.

Knowledge sources

Margin is (price − cost) over price. This is arithmetic, not a valuation.

Page updated in 2026.