# Profit margin calculator: margin on price and markup on cost

> A free profit margin calculator for profit, margin on the price and markup on the cost, and the price that gives your target margin, per unit or for a quantity.

This profit margin calculator shows the profit on a unit two ways: as a share of the selling price, the margin, and as a share of the cost, the markup. Type the cost with the selling price or with the rate you want, and see the price, the profit and both rates, per unit and for a quantity.

## What is the difference between margin and markup?

Margin is the profit divided by the selling price; markup is the same profit divided by the cost. The profit is the same, but the two rates differ because each divides by a different number.

```text
Profit  = selling price − cost
Margin  = profit ÷ selling price × 100
Markup  = profit ÷ cost × 100

Example: cost 80, selling price 100
Profit  = 100 − 80        = 20
Margin  = 20 ÷ 100 × 100  = 20%
Markup  = 20 ÷ 80 × 100   = 25%
```

So always ask: is the figure you hear a share of the selling price or of the cost? The calculator shows both side by side.

## How do I work out the selling price from the cost and the margin I want?

Divide the cost by what is left of a hundred per cent after the margin: that is the price that gives the margin exactly.

```text
Selling price = cost ÷ (1 − margin ÷ 100)

Example: cost 70, target margin 30%
Selling price = 70 ÷ (1 − 0.30) = 70 ÷ 0.70 = 100

The common mistake: 70 × 1.30 = 91
The profit is then only 21, and the margin 21 ÷ 91 = 23.08%, not 30%
```

When the result is a fraction that does not end, the calculator rounds the price to two or three decimals or to a whole number, as you choose, because a price must be an amount someone can pay. It then works out the actual margin from the rounded price and tells you if it moved slightly from the one you typed.

## How do I convert a margin to a markup?

Divide the margin by what is left of a hundred after it, and multiply by a hundred. The other way round: divide the markup by a hundred plus the markup, and multiply by a hundred.

```text
Markup = margin ÷ (100 − margin) × 100
Margin = markup ÷ (100 + markup) × 100

10% margin  = 11.11% markup
20% margin  = 25% markup
25% margin  = 33.33% markup
30% margin  = 42.86% markup
40% margin  = 66.67% markup
50% margin  = 100% markup
```

## How do I use the calculator?

Pick the numbers you know, then type the cost and the second number, and the result appears as you type.

1. Pick "Cost and selling price" if the price is set, or "Cost and the margin you want" or "Cost and markup on cost" if you are looking for the price.
2. Type the cost per unit: purchase or materials, packaging, shipping to you.
3. Type the selling price before tax, or the rate you want.
4. If you like, type the number of units to see sales, cost and profit for a whole quantity, such as a month of sales.
5. Press "Copy the result" for text with the numbers and the working.

When the selling price is below the cost, the calculator shows the loss per unit instead of a profit.

## What does Mujib do with the prices you set?

The Mujib agent tells your customers your prices as you wrote them in your knowledge or your prices. It does not lower them, offer a discount you do not have, or work out a price by itself. If you take orders, the agent takes the order from your menu at its prices, and the system works out the total. The details are in [AI agent limits](https://docs.mujib.ai/en/agent/what-it-does-not-do/) and [WhatsApp ordering](https://docs.mujib.ai/en/features/orders-menu/).

## Frequently asked questions

### Can a profit margin reach a hundred per cent?

No, unless the cost is zero. A margin is a share of the selling price, and profit is always part of the price. Markup on cost, on the other hand, has no upper limit.

### Which should I price with, margin or markup?

Both are fine as long as you know which one you mean. What matters is not mixing them up. If you want a given margin, do not multiply the cost by one plus that rate, as that gives you a lower margin than you wanted.

### Should the selling price include VAT?

No. Type the price before tax, because tax is not your profit. To see the gross price afterwards, use the VAT calculator.

### What goes into the cost per unit?

Everything you pay to have the unit ready to sell, such as the purchase price or materials, packaging and shipping to you. Rent and salaries are fixed costs; see their effect in the break-even calculator.

---

Source: https://docs.mujib.ai/en/tools/profit-margin-calculator/ · Last updated: 2026-11-05
