Skip to content

Margin Calculator

Profit margin, markup and selling price from any two values. Runs in your browser.

Loading tool…

About this margin calculator

This margin calculator works out profit margin, markup, profit and selling price from any two numbers you know. Type a cost and a price, or a cost and the margin you want, and the other three boxes fill in.

It's for shop owners pricing stock, online sellers checking a product after marketplace fees, and anyone who has mixed up margin and markup on a quote. Those two get confused all the time, and the gap between them is big: a 50% markup is only a 33.33% margin.

Add units sold for totals, and a fee percentage or extra cost per unit to see your net margin. A table shows common margins next to the matching markup and the price you'd need for your cost.

Features

  • Solve from any two values

    Cost, selling price, profit, margin % and markup %. Fill any two (except margin with markup) and the rest are calculated.

  • Margin and markup side by side

    Both percentages are always shown, with the formula filled in with your numbers.

  • Net margin after fees

    Add a percentage fee on the price, such as a card or marketplace fee, and a fixed extra cost per unit like shipping.

  • Totals for a batch

    Revenue, cost of goods and profit for any number of units.

  • Useful limits

    The largest discount before you lose money, the break-even price, and how many units it takes to earn 1,000 of profit.

  • Margin to markup table

    Ten common margins with the matching markup and the price for your cost.

How to use the margin calculator

  1. 1Type any two values: cost, selling price, profit, margin % or markup %.
  2. 2Add units sold, a fee % or an extra cost per unit if you want net figures.
  3. 3Read the margin, markup, profit and totals, and check the markup table.

When to use it

  • Pricing a new product

    Enter the unit cost and a 40% target margin to get the shelf price straight away.

  • Checking a supplier quote

    A wholesaler says "50% markup". Check what margin that leaves you after fees.

  • Planning a sale

    See how deep a discount can go before each sale loses money.

  • Selling on a marketplace

    Put in the platform's fee and your shipping cost to see the margin you really keep.

How do you calculate profit margin?

Margin = (price − cost) ÷ price × 100. If you buy a mug for 25 and sell it for 40, the profit is 15 and the margin is 15 ÷ 40 = 37.5%.

Margin tells you how much of every sale you keep. At 37.5%, 37.5 of every 100 in sales is gross profit and 62.5 went on the goods.

This is gross margin. It covers the cost of the goods only. Net margin also takes out fees, shipping, rent, wages and tax, which is why the calculator lets you add fees and extra costs.

Margin vs markup: what's the difference?

Both use the same profit. Margin divides it by the selling price, and markup divides it by the cost. The mug above has a 37.5% margin and a 15 ÷ 25 = 60% markup.

Markup is always the bigger number when you make a profit. That's why a supplier's "100% markup" sounds generous: it's only a 50% margin.

  • Markup from margin: markup = margin ÷ (100 − margin) × 100. A 20% margin is a 25% markup.
  • Margin from markup: margin = markup ÷ (100 + markup) × 100. A 50% markup is a 33.33% margin.
  • Margin can never reach 100% while the item costs anything. Markup has no upper limit.

How do you set a price for a target margin?

Divide the cost by (1 − margin as a decimal). For a 40% margin on a 30 cost, the price is 30 ÷ 0.6 = 50. A common mistake is to add 40% to the cost instead, which gives 42 and only a 28.6% margin.

With a percentage fee on the price, the fee comes off the top too. To keep a 20% margin on an 80 cost with a 10% fee and 2 of shipping per unit, you need (80 + 2) ÷ (1 − 0.20 − 0.10) = 117.14.

How far can you discount before you lose money?

Without fees, the largest discount equals your margin. A 37.5% margin means you break even at 37.5% off. With a percentage fee, the limit is lower, because the fee is still taken from the reduced price. The calculator includes your fee and extra cost in this figure.

Why use Mavros

 MavrosTypical upload sites
InputsAny two of five valuesCost and price only
MarkupAlways shown beside marginSeparate tool
Fees and shippingNet margin after % fee and extra costGross margin only
Discount limitBreak-even discount and priceNot shown
Reference tableMargin, markup and your priceStatic image
PrivacyRuns in your browserInputs sent to a server

Tips

  • Always say which one you mean. Writing "30% margin" or "30% markup" on a quote avoids an expensive misunderstanding.
  • Use landed cost: the purchase price plus freight, duty and packaging. A margin based on the invoice price alone looks better than it is.
  • Check a retail price against a percentage off with the discount calculator, which also handles VAT and sales tax.
  • Once the price is set, create an invoice for the order without leaving your browser.
  • Need a plain percentage change, such as how much your cost went up? The percentage calculator covers it.

Questions

What is a good profit margin?

It depends on the trade. High-volume sellers like supermarkets live on thin margins, while software and handmade goods can keep most of the price. Compare yourself with your own industry, and remember that gross margin has to cover all your running costs.

How do I calculate a 30% margin?

Divide the cost by 0.7. A product costing 70 needs a price of 100 for a 30% margin. Adding 30% to the cost gives only 91 and a 23% margin.

How do I convert markup to margin?

Margin = markup ÷ (100 + markup) × 100. A 25% markup is a 20% margin, and a 100% markup is a 50% margin.

Can margin be more than 100%?

No. Margin is a share of the price, so it can only reach 100% if the item cost nothing. Markup can be any size: buying at 10 and selling at 50 is a 400% markup.

Is margin the same as profit?

No. Profit is an amount of money, such as 15. Margin is that profit as a percentage of the price, such as 37.5%. The calculator shows both.

What is the difference between gross and net margin?

Gross margin only subtracts the cost of the goods. Net margin also subtracts fees, shipping, overheads and tax. Add a fee % and an extra cost here to get closer to net.

How do I calculate margin in Excel?

With price in A1 and cost in B1, use =(A1-B1)/A1 and format the cell as a percentage. For markup, use =(A1-B1)/B1.

Why can't I enter margin and markup together?

They describe the same ratio, so together they don't pin down a price. Add a cost, a price or a profit amount and the calculator can solve the rest.