← Investing & Wealth Calculators

Margin Calculator

Use this free margin calculator to work out gross profit, gross margin, and markup from a selling price and a cost. As a profit margin calculator it shows the same profit three ways, so you can see how margin and markup differ and price with confidence.

How it works

Gross profit is the simplest figure on the page: Selling Price minus Cost. Everything else is that same profit expressed as a percentage, and the only difference between margin and markup is what the percentage is taken against.

Gross margin divides the profit by the selling price: Margin = (Price − Cost) / Price × 100. A $100 sale with a $60 cost leaves $40 of profit, which is a 40% margin — 40 cents of every sales dollar is profit. Margin can never exceed 100%.

Markup divides the same $40 profit by the cost instead: Markup = (Price − Cost) / Cost × 100. The same sale is a 66.67% markup, because the price is two thirds higher than the cost. Markup can exceed 100%, which is why the two numbers must not be swapped when pricing: marking up by 40% gives a smaller price than earning a 40% margin.

Example: Sell an item for $100 that cost $60 and the gross profit is $40.00, a 40.00% gross margin and a 66.67% markup.

Frequently asked questions

How do I calculate gross margin?

Enter the selling price and the cost, then click Calculate. Gross margin is the profit divided by the selling price, times 100. A $100 sale with a $60 cost leaves $40 of profit, which is a 40% margin.

What is the difference between margin and markup?

Margin divides the profit by the selling price, while markup divides the same profit by the cost. The same $100 sale with a $60 cost is a 40% margin but a 66.67% markup, so the two numbers must not be swapped when pricing.

Can markup be over 100%?

Yes. Markup divides the profit by the cost, so it can exceed 100% when the selling price is more than double the cost. Gross margin can never exceed 100%, because the profit can never be larger than the selling price.

More Investing & Wealth Calculators

← Back to all calculators