Worldwide flag Worldwide

Margin calculator

Gross profit margin is the share of a selling price that is profit rather than cost, written as a percentage. Enter the price you sell at and the cost to you, and this tool returns the margin, the cash profit per unit, and the markup that the same sale represents. Margin is the figure most accountants and retailers mean when they talk about profitability, because it answers a clear question: out of every unit of revenue, how much do you keep before overheads. That makes it easy to compare products, departments or whole businesses on the same scale, regardless of how cheap or dear each item is. It is not the same as markup, which measures the same profit against the cost instead of the price, so margin is always the lower of the two percentages. This calculator works in gross terms, price minus cost, so the result is profit before rent, wages, tax and the other running costs that turn gross margin into the much smaller net margin a business actually banks.

Selling price ($)
Cost price ($)
Gross profit margin
28.6%
Profit per unit
$20
Equivalent markup
40%
Verdict
Selling above cost

Gross profit margin is the profit as a share of the selling price, the figure most accounts and retailers mean by "margin". It is always smaller than the markup on the same sale, because the price you divide by is larger than the cost. This is gross margin before overheads, wages, tax and other running costs, so the money you keep is lower again.

How it works

  1. Enter the selling price, the amount the customer pays you before any sales tax.
  2. Enter the cost price, what the item cost you to buy or produce.
  3. The tool subtracts the cost from the price to find the profit on each unit.
  4. It divides that profit by the selling price to give the gross profit margin as a percentage.
  5. It also shows the equivalent markup, the same profit measured against the cost, and flags any sale made below cost.

margin = (price - cost) / price x 100; profit = price - cost

The profit on a sale is the selling price minus the cost. Dividing that profit by the selling price and multiplying by a hundred gives the gross margin as a percentage of revenue. Dividing the same profit by the cost instead gives the markup. Because you always divide by a larger number for the margin, it comes out lower than the markup. To go the other way and find the price for a chosen margin, divide the cost by one minus the margin written as a decimal.

price
the selling price before sales tax
cost
what the item cost you
profit
price minus cost, before overheads
margin
profit as a percentage of the price

A margin and the markup behind it

10% margin 11.1% markup thin, typical of grocery
25% margin 33.3% markup common general retail
50% margin 100% markup price is double the cost
75% margin 300% markup high, as on bar drinks

Worked example

You sell an item for 70 that cost you 50: the profit is 20 per unit. As a margin that is 20 divided by 70, about 28.6 percent of the selling price. The same 20 against the 50 cost is a 40 percent markup. So a product described as carrying a 40 percent markup keeps 28.6 percent of its revenue as gross profit.

Key facts

Tips

Frequently asked questions

What counts as a good profit margin?+

It varies widely by sector. Supermarkets run on low single-digit gross margins on groceries, software can exceed 80 percent, and most retail and hospitality sit somewhere between. Compare against others in your own trade rather than a single benchmark.

How is margin different from markup?+

Margin divides profit by the selling price; markup divides the same profit by the cost. The price is larger than the cost, so the margin percentage is always smaller than the markup for one sale.

Is this gross margin or net margin?+

Gross. It is price minus cost over price. Net margin takes off overheads, wages, tax and interest too, and is always lower, sometimes much lower, than the gross figure shown here.

How do I work backwards from a target margin to a price?+

Divide the cost by one minus the margin as a decimal. To hit a 30 percent margin on a 50 cost, divide 50 by 0.70, which gives a selling price of about 71.43.

Can a margin be negative?+

Yes. If you sell below cost the profit is negative and so is the margin, which means a loss on every unit. The tool marks this as selling below cost.

Things to watch

Last updated: 2026

Estimate only

This is an estimate for general guidance, not financial, tax, legal or medical advice. Figures can change and individual circumstances vary. Always confirm with the official sources listed before making decisions.

Reviewed by Vikas Dulgunde. Editorial standards.

Related calculators