Free tool

Margin calculator, profit margin and markup.

Type a cost and a price to see the gross margin, the markup and the profit. Or turn it around: find the price for a target margin, the cost for a price and margin, or the revenue you need for a profit goal. Put many items in a table to get totals and an overall margin, and see what a discount does to your margin and to the units you must sell. The page explains margin and markup with your own numbers, because they are easy to mix up. It is gross margin only, before tax and running costs.

Download table (CSV)

Gross margin only: before tax, fees and running costs. Plain maths, not financial advice.

Worked out in your browser. Nothing is sent anywhere.

The maths

Profit over price, or over cost.

01 / Margin

Profit ÷ price

The share of each sale you keep after the cost of the goods. It can never reach 100%.

02 / Markup

Profit ÷ cost

How much you add on top of the cost. It can be 100%, 200% or more.

03 / Discounts

Less price, less profit

A discount comes straight out of the profit, so the units you must sell to stay level grow fast.

Guide

How to calculate margin, and how it differs from markup.

A margin calculator works out gross profit margin: the part of the selling price that is left after you pay for the goods. Type the cost and the price, and you get the margin, the markup and the profit on each unit. The same page runs the sums backwards: the price you need for a target margin, the most you can pay for something that sells at a set price, and the revenue you need to reach a profit goal. It is gross margin only, so it leaves out tax, fees and running costs.

How to use the margin calculator

  1. Under Work out, pick what you want to find. The boxes change to match.
  2. For Margin from cost and price, type the Cost of one unit and the Selling price of one unit.
  3. For a price or a cost, type the other figure and a Percent, and choose Margin or Markup under As.
  4. For several products, choose Many items in a table and type one item per line, as name, cost, price and the number sold.
  5. Use Discount to test (%) to see one price cut, and read the discount table for the usual steps.
  6. Copy result copies a short line, Download table (CSV) saves the items or the discount table, and Copy link to these numbers shares your inputs.

Margin and markup, with one example

Take a product that costs 60 and sells for 100. The profit is 40.

  • Margin is profit divided by the price: 40 ÷ 100 = 40%.
  • Markup is profit divided by the cost: 40 ÷ 60 = 66.67%.

It is the same sale, said two ways. The two figures only match at zero. The mix-up is expensive: if you want a 40% margin and add a 40% markup, the price is 60 × 1.4 = 84, and the margin is only 16 ÷ 84 = 19.05%. To get a 40% margin you need a price of 60 ÷ (1 − 0.40) = 100.

If the markup isthe margin isIf the margin isthe markup is
10%9.09%10%11.11%
25%20%20%25%
50%33.33%30%42.86%
100%50%40%66.67%
150%60%50%100%
200%66.67%75%300%

The formulas behind the table: margin = markup ÷ (1 + markup), and markup = margin ÷ (1 − margin). Switching Margin to Markup under As converts the percent for you.

Price from cost, cost from price

With a target margin, price = cost ÷ (1 − margin). A cost of 60 and a 40% margin gives 100. With a target markup, price = cost × (1 + markup), so a 40% markup gives 84. Going the other way, cost = price × (1 − margin). A price of 100 and a 35% margin means you can pay at most 65.

Revenue for a profit target

Revenue = (profit you want + fixed costs) ÷ margin. To earn 10,000 at a 40% margin you need 10,000 ÷ 0.40 = 25,000 of sales. If you must also cover 5,000 of fixed costs, you need 15,000 ÷ 0.40 = 37,500. At 50 a unit that is 750 units, with 22,500 going to the cost of goods. It assumes every sale earns the same margin.

What a discount does to margin

A discount comes straight off the profit, not off the cost. Take the 60 cost and the 100 price. At 10% off, the price is 90, the profit is 30 and the margin falls to 33.33%. To make the same total profit you must sell 40 ÷ 30 = 1.333 times as many units, which is 33.3% more. At 20% off the profit is 20, the margin is 25% and you need 100% more units. A discount equal to the margin, 40% here, leaves no profit at all. The discount table shows the steps from 0% to 30% and adds the figure you type.

Many items at once

In the items mode each line gives the margin and markup of one product, and the footer adds up the lot. With a mug (cost 4.50, price 12, 100 sold), a T-shirt (8, 25, 40 sold) and a poster (2.20, 15, 60 sold), the revenue is 3,100, the cost is 902 and the profit is 2,198. The overall margin is 2,198 ÷ 3,100 = 70.9%, and the markup is 2,198 ÷ 902 = 243.7%. The overall margin is a weighted figure. It is not the average of the three margins, because the items sold in different amounts.

Common mistakes

  • Adding the margin as a markup. A 30% markup on a cost of 70 gives a price of 91, and a margin of 21 ÷ 91 = 23.08%, not 30%.
  • Averaging margins. A product with a 50% margin and one with a 10% margin do not make a 30% margin unless they sell in equal money. Use the items table, which weighs each one by what it sold.
  • Mixing tax in. If the price includes sales tax or VAT, take it off first. Tax is not your revenue.
  • Forgetting that a discount is not on the cost. The cost stays the same when the price falls, so a small discount can take a large share of the profit.

A quick check for any answer: profit = price − cost, margin = profit ÷ price, markup = profit ÷ cost. If the margin is 40% and the cost is 60, then the cost is the other 60% of the price, so the price is 100.

To find a percentage of a number or a percent change, use the percentage calculator. To work out a tip or a split bill, try the tip calculator.

Questions

Good to know.

How do I calculate profit margin?

Subtract the cost from the price to get the profit, then divide the profit by the price. A price of 100 and a cost of 60 give a profit of 40 and a margin of 40%.

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. The same 40 of profit on a 60 cost is a 40% margin and a 66.67% markup.

How do I get a price from a margin?

Divide the cost by 1 minus the margin. A cost of 60 and a 40% margin gives 60 ÷ 0.6 = 100.

What is a good profit margin?

It depends on the business, and this page states no standard. Compare your margin with your own costs, such as rent and pay, and with the margins of similar shops you can check from their published accounts.

Is gross margin the same as net margin?

No. Gross margin takes off only the cost of the goods. Net margin also takes off running costs, interest and tax. This page works out gross margin.

Can the margin be more than 100%?

No. A margin is part of the price, so it stays below 100%. A markup can be above 100%.

How do I include a discount?

Type it under Discount to test. The page shows the new price, the profit, the margin and how many more units you need to sell to earn the same total profit.

Does the calculator include tax?

No. Add or remove sales tax or VAT first, and type the price before tax if you want a margin on the money you keep.

Is anything sent anywhere?

No. Everything is worked out in your browser, and your last numbers are kept on this device only.