# Profit Margin Calculator

> Margin and markup describe the same profit against two different bases, and swapping them always loses money in the same direction. This works out both from a cost and a price, or sets the price from a target you choose.

Use it: https://tessalor.com/en/money/profit-margin

This tool runs entirely in the browser. Nothing entered into it is uploaded.

## Formula

```
From a cost and a price:
  profit = price - cost
  margin = profit / price
  markup = profit / cost

Setting the price from a target:
  from a margin   price = cost / (1 - margin)
  from a markup   price = cost x (1 + markup)

Converting one percentage to the other:
  markup = margin / (1 - margin)
  margin = markup / (1 + markup)

round = to the nearest minor unit for money,
        and to two places for the percentages.
```

## Assumptions

- One unit at full price. Discounts, returns, shrinkage and payment fees all reduce the price without reducing the cost, so they come out of the margin and are not modelled here.
- Cost means whatever you put in it. For a gross margin that is the direct cost of the goods; for a net margin it is everything. The arithmetic does not care, and the label on the answer depends on which you used.
- A margin target of 100% or more is rejected rather than clamped, because it has no solution — it needs a cost of zero or below.
- Selling below cost is allowed. It makes the profit and both percentages negative, which is correct and is a thing businesses model on purpose.
- The figures carry no currency symbol on purpose. The arithmetic is the same in pounds, euros or dollars, and the tool follows whichever currency your locale uses.

## Inputs

| Name | Label | Type | Default | Range |
| --- | --- | --- | --- | --- |
| `cost` | Cost | currency | 60 | 0 to 1000000000 |
| `price` | Selling price | currency | 100 | 0 to 1000000000 |
| `mode` | What you know | select | fromPrice |  |
| `target` | Target percentage | percent | 40 | 0 to 10000 |

## Outputs

- `profit` — Profit (currency), primary
- `sellingPrice` — Selling price (currency)
- `margin` — Margin (percent)
- `markup` — Markup (percent)

## Questions

### What is the difference between margin and markup?

They divide the same profit by different things. Margin divides it by the selling price; markup divides it by the cost. Sell something costing 60 for 100 and the profit is 40 — a 40% margin and a 66.67% markup, from one transaction. Markup is always the larger of the two, and the gap widens as the numbers rise.

### What price gives a 40% margin?

Divide the cost by 0.6. On a cost of 60 that is 100. Adding 40% to the cost instead gives 84, which is a margin of 28.57% and 16 less profit on every unit — the single most common pricing error there is, and it is invisible in the arithmetic because both calculations look reasonable.

### What is a good profit margin?

There is no figure that answers this across industries, and anyone quoting one is describing their own. Grocery retail runs on low single digits and survives on volume; software can run above 80% because the cost of one more unit is close to nothing. The useful comparison is against your own last quarter and against the specific businesses you compete with, not against an average of everything.

### Which figure should I use for pricing?

Set targets in margin and apply them in markup. Margin is the figure that matters, because it is the share of revenue that survives and it is comparable across products with different costs. Markup is the figure you can act on at the point of pricing, because it works forward from a cost you already know. The conversion between them is the table below.

### Does a 10% discount cost me 10% of my margin?

No — it costs more. A discount comes off the price and not off the cost, so the whole of it comes out of the profit. Ten per cent off a price of 100 with a cost of 60 leaves a profit of 30 rather than 40, so a 40% margin becomes 33.3%. A quarter of the profit, for a tenth off the price.

## Sources

- [IAS 1 — Presentation of Financial Statements](https://www.ifrs.org/issued-standards/list-of-standards/ias-1-presentation-of-financial-statements/) — IFRS Foundation, applies to the presentation of gross profit, and what sits above and below it. Retrieved 2026-07-31.
- [NIST Guide to the SI (Special Publication 811)](https://www.nist.gov/pml/special-publication-811) — National Institute of Standards and Technology, applies to percent as a ratio, and the need to state what it is a ratio of. Retrieved 2026-07-31.

## Variants

- [What is the difference between margin and markup?](https://tessalor.com/en/money/profit-margin/margin-versus-markup)
- [What price gives a 40% profit margin?](https://tessalor.com/en/money/profit-margin/price-for-a-40-percent-margin)

---

Estimate, not advice. See https://tessalor.com/en/disclaimer.
Machine-readable catalogue: https://tessalor.com/api/tools.json
