Margin Calculator by Tech Media Daily

Margin Calculator

Enter any two numbers. Get your profit, margin and markup straight away — or work backwards from the margin you want to the price you should charge.

What do you know?
$
$

Your result

Profitable
Sales price $100.00
Cost $60.00
Profit$40.00
Profit margin40.00%
Markup66.67%
Cost Profit — this share is your margin
Show the maths
Add tax, a discount, and selling costs

The figures above are your gross margin — selling price minus the cost of the product itself. Add what it actually costs you to make each sale and you get your contribution margin, which is the number that tells you whether a sale is worth making.

Price adjustments

%

Confirm the current sales tax rate that applies to your business before relying on this figure.

%

Cost of making the sale

$
$
%
$
%
$
$

Operating margin and net margin sit below this line. They need your overheads — rent, wages, software, insurance — which this calculator doesn't ask for, so it doesn't pretend to know them. How the four margins differ.

Everything is worked out in your browser. Your numbers are never sent to our server.

same profit, two different baselines

Margin vs markup

Margin and markup describe the same profit. They just divide it by different things — and that one difference is why a 50% markup is only a 33.3% margin.

Margin measures profit against the price you charge. Markup measures the same profit against what the item cost you. Because the price is always the bigger number, the margin is always the smaller percentage.

Margin and markup compared on one transactionOne sale is shown as a bar made of cost plus profit. Measured against the whole selling price, that profit is a 33.33 percent margin. Measured against the cost portion alone, the same profit is a 50 percent markup.ONE SALE$100.00 cost$50.00 profit$150.00 selling price$50.00 ÷ $150.00 selling price= 33.33% MARGIN$50.00 ÷ $100.00 cost= 50% MARKUPThe green bar is measured against the full price. The amber bar stops at the cost. Same profit either way.
An item bought for $100.00 and sold for $150.00 makes $50.00. That profit is a 33.33% margin or a 50% markup depending only on what you divide it by.

Converting between them

markup = margin ÷ (1 − margin)
margin = markup ÷ (1 + markup)
Equivalent values. Notice how the gap widens as margins rise — at 75% margin you need to quadruple your cost.
If you want this marginYou need this markupOn a $100.00 cost, charge
10%11.11%$111.11
20%25.00%$125.00
25%33.33%$133.33
30%42.86%$142.86
40%66.67%$166.67
50%100.00%$200.00
60%150.00%$250.00
70%233.33%$333.33
75%300.00%$400.00
profit ÷ revenue × 100

The profit margin formula

Profit margin is the share of your selling price that you keep once the cost of the item is paid for. Two steps:

profit = selling price − cost
margin % = profit ÷ selling price × 100

Sell for $100.00 an item that cost you $60.00 and you keep $40.00, which is 40% of what the customer paid. That is a 40% margin.

Markup answers a different question — how much you added on top of cost:

markup % = profit ÷ cost × 100

The same $40.00 against a $60.00 cost is a 66.67% markup.

Worked examples

CostPriceProfitMarginMarkup
$60.00$100.00$40.0040.00%66.67%
$100.00$150.00$50.0033.33%50.00%
$80.00$100.00$20.0020.00%25.00%
$25.00$100.00$75.0075.00%300.00%
$100.00$200.00$100.0050.00%100.00%
$120.00$100.00-$20.00−20.00%−16.67%

The last row is a loss. Margin can be negative, and the calculator will say so rather than hiding it.

cost ÷ (1 − margin)

Working out a selling price from a target margin

This is where most pricing goes wrong. If an item costs you $60.00 and you want a 40% margin, adding 40% gives $84.00 — and that is a 28.57% margin, not 40%.

Why adding your target percentage doesn't work

Adding 40% to your cost is a 40% markup, and markup is measured against cost. Margin is measured against the selling price, which you don't know yet. So you can't add it on — you have to divide it out.

selling price = cost ÷ (1 − margin)

$60.00 ÷ (1 − 0.40) = $60.00 ÷ 0.60 = $100.00. That gives $40.00 profit on a $100.00 sale, which is a genuine 40% margin.

The cost of getting it wrong on a $60.00 item. The right-hand column is what you lose per sale by adding the percentage instead of dividing by it.
Target marginCorrect pricePrice if you just add the %Margin you'd actually getLost per sale
20%$75.00$72.0016.67%$3.00
30%$85.71$78.0023.08%$7.71
40%$100.00$84.0028.57%$16.00
50%$120.00$90.0033.33%$30.00
60%$150.00$96.0037.50%$54.00

Select Cost + target margin in the calculator to work this out for your own figures.

discounts come out of profit, not revenue

What a discount really costs you

A discount comes off the price, but your cost doesn't move. So the entire discount comes out of your profit — which is why a modest-looking discount can take a large bite out of your margin.

Take a $100.00 item that costs you $60.00. That's a 40% margin. Offer 20% off and you now sell it for $80.00. Your cost is still $60.00, so your profit drops from $40.00 to $20.00, and your margin falls from 40% to 25%.

Put another way: a 20% discount cost you half your profit.

Turn on Add tax, a discount, and selling costs in the calculator to model your own.

A $100.00 item costing $60.00, at a starting margin of 40%.
DiscountYou chargeProfitMargin
0%$100.00$40.0040.00%
10%$90.00$30.0033.33%
20%$80.00$20.0025.00%
30%$70.00$10.0014.29%
40%$60.00$0.000.00%
50%$50.00-$10.00−20.00%
four margins, four different questions

Gross, contribution, operating and net margin

"Profit margin" isn't one number. It depends on which costs you've taken off, and people comparing margins are often comparing different things entirely. These are the four levels, in the order costs come out.

MarginWhat's deductedQuestion it answers
GrossThe cost of the product itselfIs this product worth selling at all?
ContributionProduct cost plus every variable cost of the sale — shipping, packaging, payment and marketplace fees, advertisingDoes each individual sale leave money behind?
OperatingThe above plus overheads — rent, wages, software, insuranceDoes the business itself work?
NetEverything, including interest and taxWhat do you actually keep?

This calculator gives you the first two. It stops there deliberately: operating and net margin need your overheads, and a calculator that invented them would be giving you a confident number built on a guess.

Which costs go where

CostGrossContribution
What you paid for the product or its materialsYesYes
Shipping you pay to get it to the customerNoYes
PackagingNoYes
Card and payment processing feesNoYes
Marketplace or platform commissionNoYes
Advertising spend per saleNoYes
Rent, salaries, software, insuranceNoNo — these are overheads
Sales tax you collectNeither — it isn't your moneyNeither

Sales tax and your margin

In the US, sales tax is normally added at checkout rather than built into the shelf price, so for most sellers it never touches the margin calculation at all. If you do quote tax-inclusive prices, strip the tax out first — the tax you collect is not revenue.

questions people actually ask

Frequently asked questions

What is a profit margin?

The share of your selling price left over after costs, written as a percentage. A 40% margin means that for every $100.00 you take, $40.00 is profit and $60.00 went on costs.

How do I calculate a 20%, 30% or 40% margin?

Divide your cost by 1 minus the margin as a decimal. For 20%, divide by 0.8. For 30%, divide by 0.7. For 40%, divide by 0.6. A $60.00 item at a 40% margin is $60.00 ÷ 0.6 = $100.00.

What's the difference between margin and markup?

Both describe the same profit against a different baseline. Margin divides profit by the selling price, markup divides it by the cost. Because the price is the larger number, margin is always the smaller percentage — a 50% markup is a 33.3% margin.

Can a profit margin be more than 100%?

No. Margin is a share of your selling price, so 100% would mean the item cost you nothing and anything above that is impossible. Markup has no ceiling — a $25.00 item sold for $100.00 is a 300% markup and a 75% margin.

Can a margin be negative?

Yes, and it's worth seeing. A negative margin means you're selling below cost. Sometimes that's deliberate — a loss leader, or clearing old stock — but it should be a decision rather than a surprise.

Should shipping be included in my margin?

Not in gross margin, which covers the product cost only. But shipping you pay for absolutely belongs in contribution margin, and for most online sellers contribution margin is the more useful number. Open the advanced section to include it.

Should payment and marketplace fees be included?

Yes, in contribution margin. A 2.9% payment fee plus a 15% marketplace commission takes nearly 18% off every sale. On a 25% gross margin that leaves very little, which is exactly the sort of thing worth finding out before you set a price rather than after.

Should sales tax be included in margin?

Usually it does not arise. Sales tax is typically added at checkout, so your quoted price is already the revenue figure. If you quote tax-inclusive prices, remove the tax before working out margin — money you collect for a state is not yours.

Is margin the same as gross margin?

Usually, in casual use. "Margin" on its own normally means gross margin — price minus the cost of the product, over the price. It's worth checking though, because someone quoting a margin at you may be including costs you aren't.

How do I calculate margin in Excel or Google Sheets?

With cost in A2 and selling price in B2: profit is =B2-A2, margin is =(B2-A2)/B2, and markup is =(B2-A2)/A2. Format the last two as percentages. To find a price for a target margin in C2, use =A2/(1-C2).

What is a good profit margin?

There's no single answer, and anyone giving you one without asking what you sell is guessing. Margins vary enormously by industry, business model and country — a supermarket and a software company are both healthy at wildly different numbers. A more useful question is whether your margin covers your overheads at your current sales volume. A break-even calculation answers that; a benchmark doesn't.