Skip to content
Investment Math
Investment Math

Currency and number style

Only changes how amounts look. There is no currency conversion.

Margin explained: formula, worked example and common mistakes

Gross profit, margin against the selling price and markup against the cost, from whichever pair of figures you hold. Free, no sign-up.

Updated

What the margin calculator works out

Margin answers the question a price tag hides: of everything that comes in, how much is left once the cost of the thing sold is paid? This page turns cost and selling price into gross profit, margin and markup in one go, and it works in whichever direction suits: from cost and price, from cost and a target margin, from price and a known margin, or from cost and a markup. All four routes are the same arithmetic seen from different ends.

You type the pair of figures you have, and the mode that says which pair it is.

The formula

The core relations, in any mode:

profit   = price - cost
margin   = profit / price x 100
markup   = profit / cost x 100
multiple = price / cost

And the two pricing routes, when the price is the thing you want:

price from a target margin = cost / (1 - margin/100)
price from a markup        = cost x (1 + markup/100)

Here price is the selling price, cost is what the thing cost, and the margin and markup are typed as percentages, so 40 means 40 per cent. Margin and markup are the same profit over different bottoms, which is why they never agree, and why confusing the two misprices things.

A worked example

The default run starts from cost and selling price:

Cost                      = 60
Selling price             = 100
Gross profit              = 100 - 60 = 40
Margin                    = 40 / 100 x 100 = 40.00%
Markup                    = 40 / 60 x 100 = 66.67%
Price as multiple of cost = 100 / 60 = 1.667

A cost of 60 sold at 100 is a gross profit of 40: a margin of 40 per cent and a markup of 66.67 per cent. The same profit feeds both percentages; only the bottom of the fraction changes.

What changes the answer

The cost and the price pull the margin in opposite directions: a higher price at the same cost widens it, a higher cost at the same price narrows it, and the narrowing is faster than it looks because the profit falls while the price holds. The markup moves with the margin, always ahead of it while there is profit, because cost is the smaller bottom. The multiple moves with the price alone. And the mode changes nothing except which figures are the givens: all four modes agree with one another.

When to use it, and when not to

Use it for pricing, for checking a quote, for turning a target margin into a price, or for settling the margin-versus-markup confusion that runs through every trade negotiation.

It is gross margin only: the cost of the goods themselves, not the costs of running the business. It holds no tax rates, no wage figures and no industry norms of any kind, so whether a margin is enough to live on is a question about your other costs, and the page knows none of them.

Common mistakes people make

1. Using margin and markup as though they were the same number. A margin of 40 per cent is a markup of 66.67 per cent on the same trade. A price set with the wrong one is wrong by the whole gap between them.

2. Marking up by the margin. Adding the margin percentage to the cost prices too low, because the margin is measured against the larger price, not the cost. The cost-and-margin mode exists so this never has to be done by hand.

3. Comparing margins across businesses with different cost structures. A business that pays for service with people and one that pays for goods speak different margin languages, and a number that looks thin in one can be routine in the other.

4. Treating gross margin as profit kept. Every other cost of running the business comes out after this. Gross margin is the top of the story, not the end of it.

5. Pricing from a margin without checking what the market carries. The arithmetic gives a price, not a verdict; whether anyone pays it is outside the sum.

6. Rounding the markup and reading the margin off it. The two figures move together but not in step, so rounding one and converting by eye drifts, quietly, with every repeat. Type both into the page and let it hold the precision.

Frequently asked questions

What is the difference between margin and markup?

The bottom of the fraction. Margin is profit against the selling price, and markup is profit against the cost, so on the same profit the markup is always the larger number. In the default run the profit of 40 is a margin of 40 per cent and a markup of 66.67 per cent.

How do I set a price from a target margin?

Use the cost and margin mode and divide the cost by one minus the margin as a decimal. A cost of 60 at a target margin of 40 per cent prices at 100, which is the default run arrived at from the other end.

How do I set a price from a markup?

Multiply the cost by one plus the markup as a decimal. A markup of 66.67 per cent on a cost of 60 prices at 100, the same figure the margin route reaches.

What is the multiple?

The selling price divided by the cost. In the default run it is 1.667, meaning the price is that many times the cost. It is the cleanest way to compare two pricings at a glance.

Is this gross or net margin?

Gross. The page takes the cost of what was sold away from the selling price and stops there. Rent, wages, marketing and every other running cost are outside the sum, so the figure that reaches the bottom line is smaller than this one.

Why does a small change in margin need a big change in price?

Because the price is the bottom of the fraction. Raising the margin at a fixed cost always takes a bigger rise in the price than the rise in the margin itself, since the new price is also the new bottom the margin is measured against.

This tool shows math, not advice.

Cite this page

Copy this line into a reference list, a report or a spreadsheet note.

Investment Math Calculator. “Margin Calculator”. Updated 2026-10-31. https://investmentmathcalculator.com/guides/margin-calculator/

Disclaimer: For education only. These calculators show arithmetic and hypothetical scenarios. They are not investment, tax or legal advice and do not recommend any security or product. Consult a licensed adviser in your country before acting.