Business and e-commerce · Calculator

Margin and markup calculator

Enter the cost price and the price to see the profit, margin and markup, or set a desired margin or markup, and the calculator works out the selling price you need.

Exact calculation Formula shown Your data stays in your browser

Your data

1. What do you want to calculate

Choose a task, and the fields below will adjust.

Margin and markup are always calculated; in the other two tasks, the calculator finds the price you need.
2. Numbers

The cost price and the price are per unit, excluding VAT and fees. Prices are in your currency.

What one unit costs you: purchase or production.
What you sell one unit for.
The share of the price that should remain as profit. Less than 100%: a margin of 100% is impossible with a positive cost price.
By what percentage the price is above the cost price. Not below −100%: otherwise the price would become negative.

How we calculate

  1. profit = price − cost price
  2. margin = profit ÷ price × 100%
  3. markup = profit ÷ cost price × 100%
  4. price for a desired margin = cost price ÷ (1 − margin)
  5. price for a desired markup = cost price × (1 + markup)

Assumptions

  • Profit is calculated before VAT, tax on profits, marketplace fees, card processing fees and shipping.
  • Margin and markup are per unit; quantity is not taken into account.

Limitations

  • A cost price of 0 makes the markup undefined (division by zero), and the margin at a positive price becomes 100%.
  • A price of 0 with a positive cost price means losing the whole cost price; the margin is then undefined.
  • Returns, discounts, advertising and overheads are not included. There is a unit economics calculator for them.

Sources

A universal formula with no external constants. Default values are labelled as approximate examples, not verified facts.

Questions and answers

How is margin different from markup?

Margin is the share of profit in the price; markup is how much the price exceeds the cost price. With a cost price of 600 and a price of 1,000, the profit is 400: a margin of 40% and a markup of 66.7%.

Why is a margin of 100% not possible?

A margin of 100% would mean that the whole price is profit, that is, the cost price is zero. With any positive cost price, the price you need becomes infinite.

Related tools

The result is mathematically exact for the data you entered and the calculation rules described; real conditions (tariffs, a supplier’s rounding, your contract) may differ from what you entered.

Formula version margin-markup@1.1.0 · checked 25 September 2026

Checked by the Calc editorial team: three independent implementations of the formula, test cases and the live page on a phone. Last check: 27 September 2026