Margin Calculator

Find gross margin % and profit from cost and selling price, or the price you need to hit a target margin.

$
What the item costs you (cost of goods sold per unit).
Your rate is remembered on this device.
$

Results

Gross margin
40.00 %
Selling price
$100.00
Gross profit per unit
$40.00
Equivalent markup on cost
66.67 %

Estimate only. This tool is for informational and educational purposes. Results depend on your inputs and simplifying assumptions, and are not a substitute for professional engineering, design or financial advice. Always verify with a qualified professional and applicable codes before purchasing, building or making decisions.

How it’s calculated

Gross margin is gross profit as a share of the selling price (net sales). Gross profit is price minus cost of goods sold.

Gross profit = Price − Cost Gross margin % = (Price − Cost) ÷ Price × 100 Price for a target margin = Cost ÷ (1 − margin)

Example: an item costs 60 and sells for 100. Gross profit = 40, so gross margin = 40 ÷ 100 = 40%. The same 40 profit is a 40 ÷ 60 = 66.67% markup on cost. Going the other way, to earn a 40% margin on a 60 cost you need a price of 60 ÷ (1 − 0.40) = 100.

This is general pricing arithmetic, not tax or financial advice.

Frequently asked questions

What is the difference between margin and markup?

Both use the same profit (price − cost), but margin divides it by the selling price while markup divides it by the cost. A 60 cost and 100 price is a 40% margin but a 66.67% markup. Margin can never reach 100%; markup can be any size.

Why can’t margin be 100% or more?

Margin is profit ÷ price. Profit can only equal the whole price if the cost is zero, so any real cost keeps margin below 100%.

Is gross margin the same as net profit margin?

No. Gross margin subtracts only the cost of goods sold. Net profit margin also subtracts operating expenses, interest and taxes, so it is lower.

How do I price for a 30% margin?

Divide your cost by 0.70. For a 35 cost: 35 ÷ 0.70 = 50. Simply adding 30% to cost (45.50) gives only a 23% margin.

Embed this calculator

Add this free calculator to your own website. Copy the code below into your page’s HTML:

Sources

Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.

Spotted a mistake or missing option? Report a problem · GitHub issue· Suggest a calculator