What this calculates
Enter a cost and a selling price, and this shows the profit, the margin and the markup on the sale. Or enter a cost and the margin you want, and it works out the selling price that gives it — then checks that margin at the price it found.
Margin and markup are the two figures most often confused, and they are never the same number. Both are shown side by side, so the difference is on screen rather than in a footnote.
The formula
Everything starts from the profit, which is simply what the price leaves after the cost.
The profit
Profit = price − costThe margin and the markup both divide that same profit — by different things.
Margin, a share of the price
Margin = profit ÷ price × 100Markup, a share of the cost
Markup = profit ÷ cost × 100Because the price is always the larger of the two on a profitable sale, the margin is always the smaller percentage. To go the other way — from the margin you want to the price that delivers it — divide the cost by the share of the price it has to fill.
Price for a target margin
Price = cost ÷ (1 − margin ÷ 100)That last formula is why a margin can never reach 100%: at 100 the divisor becomes zero, and no price exists.
Worked example
Now sell the same item at a loss. A cost of 120 sold at 100 gives a profit of −20, which is a margin of −20% and a markup of −16.67%. Every figure turns negative, and the markup is still the higher of the two — on a loss as much as on a gain.
Then work backwards from the margin. For a 40% margin on a cost of 60, the cost has to fill 1 − 40 ÷ 100 = 0.6 of the price, so the price is 60 ÷ 0.6 = 100. That leaves 40 of profit, a markup of 66.67%, and — checking the answer — a margin of exactly 40% at that price.
When to use it, and the mistakes to avoid
Use it when setting a price, when checking whether a price covers what you need it to, when a supplier or buyer quotes a percentage without saying which one, and when comparing two items that cost different amounts.
The mistakes that cost the most:
- Confusing margin with markup. They divide the same profit by different amounts, so they are never the same number unless the profit is zero. A cost of 80 sold at 100 is a 20% margin but a 25% markup. Quoting one when the other is meant overstates or understates the profit by a wide gap, and the gap grows with the figure.
- Adding the target percentage to the cost. This is the classic trap. Wanting a 40% margin on a cost of 60, the tempting move is 60 + 40% = 84 — but 84 leaves 24 of profit, which is only a 28.57% margin. Adding 40% to the cost gives a 40% markup, not a 40% margin. The price that really gives 40% is 100.
- Expecting the textbook conversion to the last digit. Prices are rounded to an amount that can be charged, and the markup is worked out at that price. At a cost of 80 and a 40% target the exact price is 133.333…, charged as 133.33, which leaves 53.33 of profit and a real markup of 66.66% — not the 66.67% a cost of 60 gives, where the price comes out at exactly 100. The margin still reads 40%. On a very small cost the rounding can move the margin as well, and the calculator says so when it does.
- Aiming for a margin of 100% or more. Margin is a share of the price, so it cannot reach the whole of it unless the cost is nothing. A markup can run past 100%; a margin cannot.
- Leaving costs out of the cost. The margin is only as good as the cost you enter. If the item carries costs that are not in the figure, the margin describes a sale more profitable than the one you are making.
- Comparing unlike figures. If the price includes tax and the cost does not, or the other way round, the margin describes neither. Enter both on the same footing.
FAQ
How do I calculate profit margin?
Take the cost away from the selling price to get the profit, then divide the profit by the price and multiply by 100. An item that costs 80 and sells for 100 makes 20 of profit, and 20 ÷ 100 × 100 is a 20% margin. The margin is always measured against the price — that is what separates it from markup.
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. On a cost of 80 sold at 100, the 20 of profit is a 20% margin and a 25% markup. The two are never equal unless the profit is zero, and markup is always the larger — a 50% margin is a 100% markup.
How do I work out a selling price from a target margin?
Divide the cost by one minus the margin as a decimal: price = cost ÷ (1 − margin ÷ 100). For a 40% margin on a cost of 60, that is 60 ÷ 0.6 = 100. Switch the calculator to 'From cost and target margin' and it does this for you, then checks the margin at the price it found.
How do I convert markup to margin, or margin to markup?
Margin = markup ÷ (1 + markup ÷ 100), and markup = margin ÷ (1 − margin ÷ 100). A 25% markup is a 20% margin, a 40% markup is a 28.57% margin, and a 100% markup is a 50% margin. Going the other way, a 40% margin is a 66.67% markup. The gap widens quickly as the figures grow.
Can a profit margin be 100% or more?
No. Margin is the share of the price left after the cost, so it reaches 100% only when the cost is zero, and it can never pass it. That is why the calculator will not price for a margin of 100% or more — no price exists that gives one. Markup has no such ceiling: a cost of 80 priced for a 60% margin sells at 200, which is a 150% markup.
What does a negative margin mean?
The item sold for less than it cost. A cost of 120 sold at 100 loses 20, which is a margin of −20% and a markup of −16.67%. Both figures go negative together, and the calculator says so in words under the result as well as in the numbers.