Free tool

Profit margin calculator

Margin and markup describe the same profit from two sides. Enter a cost and a price, or a cost and the margin you want, and the sheet does the rest.

fx=B4/B3
AB
1From cost and price
2Cost
3Selling price
4Profit20.00
5Margin40%
6Markup66.67%
7
8Price for a target margin
9Cost
10Margin you want (%)
11Selling price50.00
12
13Price for a markup
14Cost
15Markup (%)
16Selling price45.00
17That is a margin of33.33%

Blue cells are inputs: type a new value and the sheet recomputes. Click a result to see its formula.

The formulas

How it works, step by step

=(B3-B2)/B3
Margin. Profit divided by the selling price. Selling at 50 something that cost 30 leaves 20 profit, a 40% margin: 40 cents of every sale is profit.
=(B3-B2)/B2
Markup. Profit divided by the cost. The same 20 on a cost of 30 is a 66.7% markup. Markup is always higher than margin for the same sale.
=B9/(1-B10/100)
Price for a target margin. Divide the cost by (1 − margin). For a 40% margin on a cost of 30: 30 / 0.6 = 50. Adding 40% to the cost (42) would only give a 28.6% margin, the usual pricing mistake.
=B14*(1+B15/100)
Price for a markup. Multiply the cost by (1 + markup): a 50% markup on 30 is 45, which is a 33.3% margin.
FAQ

Questions

How do I calculate profit margin?

Subtract the cost from the selling price and divide by the selling price. Cost 30, price 50: (50 − 30) / 50 = 40% margin.

What is the difference between margin and markup?

Margin is profit as a share of the price; markup is profit as a share of the cost. A product that costs 30 and sells for 50 has a 40% margin and a 66.7% markup.

How do I set a price for a 40% margin?

Divide the cost by 0.6 (that is 1 − 40%). A cost of 30 needs a price of 50. Multiplying the cost by 1.4 gives 42, which is only a 28.6% margin.

How do I convert markup to margin?

Margin = markup / (1 + markup). A 50% markup is 0.5 / 1.5 = 33.3% margin. The other way round, markup = margin / (1 − margin).

Should the cost include shipping and fees?

For gross margin, use the cost of the goods sold: purchase price plus what it takes to get the product ready to sell. Payment fees, shipping and marketing usually come out later, in the net margin.

Run these formulas on live data

Sheets is a spreadsheet with 491 functions that reads your store, accounting or project data live, builds dashboards and e-mails reports on a schedule.