Skip to content

Margin Calculator

A profit margin and gross margin calculator: enter any two of cost, selling price, margin, markup or profit and the rest update as you type, in dollars, pounds or euros, with or without VAT.

Runs in your browser. Nothing you enter or paste is sent to OrderSync.

Gross margin

60%

Selling at $100.00 on a cost of $40.00 earns $60.00 per unit: a 60% margin and a 150% markup.

Markup
150%
Profit
$60.00

Type into any two fields and the other three are calculated. The two you edited last are your inputs.

What one unit costs you: invoice cost, or landed cost if you pay freight.

Calculated from your other inputs. Type a value to use it as an input.

Profit as a share of the selling price. Always under 100%.

Calculated from your other inputs. Type a value to use it as an input.

Profit as a share of the cost. Can be any size.

Calculated from your other inputs. Type a value to use it as an input.
Show the working
  1. Profit:price − cost = 100 − 40 = 60
  2. Margin:profit ÷ price × 100 = 60 ÷ 100 × 100 = 60%
  3. Markup:profit ÷ cost × 100 = 60 ÷ 40 × 100 = 150%

Gross Margin Calculator: The Formula

Gross margin is gross profit as a percentage of the selling price. The formula is:

Gross margin % = (selling price - cost) / selling price x 100

Gross profit is the money left from a sale after the cost of the goods: gross profit = selling price - cost. To set a price that hits a target margin, divide the cost: price = cost / (1 - margin). Multiplying cost by (1 + margin) is the most common pricing mistake, because that applies a markup.

Worked example: a wholesale case

  1. Case cost from the supplier: $36.00
  2. Selling price to your customer: $48.00
  3. Gross profit = 48.00 - 36.00 = $12.00
  4. Gross margin = 12.00 / 48.00 x 100 = 25%

A $36 case sold at $48 earns a 25% gross margin (a 33.3% markup).

Worked example: pricing a retail unit to a target margin

  1. Unit cost: £12.00 ex VAT, target margin: 45%
  2. Price ex VAT = 12.00 / (1 - 0.45) = £21.82
  3. Shelf price with 20% VAT = 21.82 x 1.2 = £26.18

Price the unit at £26.18 inc VAT (or round up to £26.99) to keep a 45% margin.

Margin and markup describe the same profit against different bases, so a 50% margin is a 100% markup. If you set prices from cost, see markup vs margin on the markup calculator, with conversion tables in both directions.

Profit Margin Calculator: Gross vs Net

"Profit margin" can mean either of two numbers, and this calculator works out the first. Gross profit margin is price minus the cost of the goods. Net profit margin also takes off overheads such as wages, rent, delivery and software, so it is always lower. A distributor can run a healthy 25% gross margin and still make 3% net. Use gross margin to price products and net margin to judge the business.

To get a net figure for a whole month, enter total sales as the selling price and total costs (goods plus overheads) as the cost. The margin the calculator shows is then your net profit margin for that month.

Margin With VAT (UK and EU)

VAT is collected for the tax authority, so it is never part of your margin. If your selling price includes VAT, divide by 1.2 (at 20%) before you work out margin: a £120 shelf price is £100 net. If you are VAT registered you reclaim the VAT on purchases, so enter cost ex VAT too. Pick GBP or EUR above and tick "Selling price includes VAT" to do this automatically.

Margin Math on Real Invoices

Distributors and retailers run this math on every line of every vendor invoice. A price change of a few cents per case moves the margin on thousands of units. When freight or duty is involved, work from landed cost, not invoice cost, or your margin will look better than it is. To turn a cost into a shelf price with .99 endings, use the retail price calculator. And if you key those invoice lines by hand, you can extract every line from a vendor invoice automatically.

Frequently Asked Questions

What is the gross margin formula?

Gross margin % = (selling price - cost) / selling price x 100. A product that costs $40 and sells for $100 has a gross profit of $60 and a gross margin of 60 / 100 = 60%. To set a price from a target margin, divide instead: price = cost / (1 - margin).

What is a good profit margin?

It varies by industry, so compare against your own category. Grocery runs on 1 to 3% net margins at high volume. Gift and specialty retail typically targets 45 to 55% gross margin. Wholesale distributors often work on 15 to 35% gross margin depending on the line. A good margin covers your operating costs with room left over.

How do I calculate profit margin?

Subtract cost from the selling price to get profit, divide the profit by the selling price, and multiply by 100. A case you buy for $36 and sell for $48 makes $12 profit: 12 / 48 x 100 = 25%. Using the cost of goods gives the gross profit margin; take off overheads too and you get the net profit margin.

Why can't margin be 100% or more?

Margin is profit as a share of the selling price, and profit can never be more than the whole price. A 100% margin would need the product to cost nothing, and the price formula cost / (1 - margin) divides by zero there. Markup has no ceiling: a 300% markup is a 75% margin.

How do I calculate margin with VAT?

Take VAT out of the selling price first, then work out margin on the net price. A £120 shelf price at 20% VAT is £100 ex VAT; with a £60 cost that is a 40% margin, not 50%. Tick 'Selling price includes VAT' above and the calculator does this for you.

Can margin be negative?

Yes. When cost is higher than the selling price, profit and margin are negative and you lose money on every unit. The calculator shows the loss per unit instead of hiding it.

What is keystone pricing?

Keystone pricing means doubling your wholesale cost to set the retail price: a 100% markup, which works out to a 50% gross margin. It is the traditional starting point in gift, apparel and specialty retail.