Margin Calculator

Type any two of cost, selling price, margin and markup to get the other two and your gross profit — with the formulas worked through and a margin-vs-markup table.

Margin Calculator

Enter any two values. The other two are calculated and update as you type.

$
$
%
%

$15.00 gross profit per unit

Margin 37.5% · markup 60%

Cost
$25.00
Selling price
$40.00
Margin calculated
37.5%
profit ÷ price
Markup calculated
60%
profit ÷ cost

Working

  1. Gross profit = price − cost = $40.00 − $25.00 = $15.00
  2. Margin = profit ÷ price = $15.00 ÷ $40.00 = 37.5%
  3. Markup = profit ÷ cost = $15.00 ÷ $25.00 = 60%

Price for a target margin

At your cost of $25.00.

Selling price needed for common margins at a cost of $25.00
MarginMarkupPriceProfit
10%11.11%$27.78$2.78
20%25%$31.25$6.25
25%33.33%$33.33$8.33
30%42.86%$35.71$10.71
40%66.67%$41.67$16.67
50%100%$50.00$25.00
60%150%$62.50$37.50

How to use the margin calculator

Fill in any two of the four boxes. With the cost and the selling price you get the margin and markup; with the cost and a target margin you get the price to charge; with a price and a markup you can work back to the cost. The two boxes you didn’t type in are marked calculated and fill in automatically — type into one of them and it becomes an input, replacing the value you entered longest ago. At least one of your two values has to be a dollar amount, because a margin and a markup together describe a ratio, not a price.

Add the number of units sold to see total revenue, cost and gross profit. The table under the result shows the price you would need for common margins at your cost. The values you typed are saved in the page address, so you can bookmark or share the calculation.

Margin vs markup: the formulas

gross profit = price − cost margin % = gross profit ÷ price × 100 markup % = gross profit ÷ cost × 100 price = cost ÷ (1 − margin) price = cost × (1 + markup) margin = markup ÷ (100 + markup) markup = margin ÷ (100 − margin)

Both describe the same profit; they just divide it by a different number. Margin tells you what share of each sales dollar you keep before overheads, which is why income statements and most business targets use it. Markup tells you how much to add to the cost, which is how many retailers set prices. Mixing the two up is costly: a “40%” that was meant as a margin but applied as a markup leaves you short on every sale.

Markup to margin conversion table

MarkupMargin
10%9.09%
20%16.7%
25%20%
30%23.1%
33.3%25%
40%28.6%
50%33.3%
60%37.5%
75%42.9%
100%50%
150%60%
200%66.7%
300%75%

Margins are rounded to three significant figures. A 50% markup is a 33.3% margin; a 100% markup (doubling the cost) is a 50% margin.

Worked example

The calculator opens with an item that costs $25 and sells for $40:

  • Gross profit: $40 − $25 = $15.
  • Margin: $15 ÷ $40 = 37.5%. Markup: $15 ÷ $25 = 60%.
  • Check with the conversion formula: 60 ÷ (100 + 60) = 0.375, the same 37.5% margin.

Now suppose you want a 40% margin on the same $25 cost. The price must be $25 ÷ (1 − 0.40) = $41.67, a markup of 66.67%. Simply adding 40% to the cost gives $35, which is a margin of only $10 ÷ $35 = 28.6%. And if you later run a 20% off sale on the $40 price, the $32 sale price leaves a margin of $7 ÷ $32 = 21.9% — the discount calculator helps you check a sale before you run it.

Gross margin, net margin and taxes

This calculator works out gross margin: the price minus the direct cost of the item (what the IRS calls the cost of goods sold, which it subtracts from net receipts to get gross profit on Schedule C). Net margin also subtracts rent, wages, advertising, payment processing and other operating costs, so it is always lower. Use prices before sales tax — the tax is collected for the state, not earned; the sales tax calculator separates it from a total. For quick percentage questions, the percentage calculator covers the rest.

Frequently asked questions

What is the difference between margin and markup?

Both compare the same gross profit (price − cost) with a different base. Margin divides it by the selling price; markup divides it by the cost. An item that costs $25 and sells for $40 makes $15: a 37.5% margin ($15 ÷ $40) but a 60% markup ($15 ÷ $25). Markup is always the larger number when there is a profit.

How do I find the selling price from cost and margin?

Divide the cost by (1 − margin as a decimal): price = cost ÷ (1 − margin). For a 40% margin on a $25 cost, $25 ÷ 0.6 = $41.67. Adding 40% to the cost instead gives $35, which is only a 28.6% margin — the most common pricing mistake.

What markup do I need for a 50% margin?

A 100% markup — doubling the cost. In general markup = margin ÷ (100 − margin), so a 25% margin needs a 33.3% markup and a 60% margin a 150% markup. The table on this page lists the common pairs.

Can a profit margin be more than 100%?

No. Margin is profit as a share of the price, and profit can never exceed the price unless the item cost less than nothing, so margins stay below 100%. Markup has no upper limit: selling a $10 item for $50 is a 400% markup but an 80% margin. Both turn negative when you sell below cost.

What is a good profit margin?

It depends on the business. The gross margin this calculator shows has to cover everything that isn’t the cost of the goods — rent, wages, marketing, shipping, card fees — before any net profit is left, so businesses with high overheads need higher gross margins. Compare the margin with your own overhead as a percentage of sales rather than with a general rule of thumb.

Sources

Last reviewed · Built and checked by the Reeliy team · How we test our tools