The Margin Formula

Test any rearrangement

Fill any two boxes. The working underneath shows which route the calculator took.

Fill in the fields above and the answer appears here.

Profit
Margin
Markup
Cost
Revenue

CostProfit

The working out is shown here once the calculator has enough information.

What are the core equations?

Five quantities, three of them independent. Fix any two and the rest are determined, which is the property every calculator on Margin Calculator UK relies on.

Profit = Revenue − Cost Margin = ProfitRevenue × 100 Markup = ProfitCost × 100 Revenue = Cost + Profit

Every example below uses the same sale: a cost of £42, a price of £70, a profit of £28, a margin of 40% and a markup of 66.67%. Keeping one set of numbers throughout makes the rearrangements easier to follow than switching examples each time.

How do you rearrange it for each unknown?

Finding revenue

From cost and margin: Revenue = Cost ÷ (1 − margin). £42 ÷ 0.6 = £70.
From cost and markup: Revenue = Cost × (1 + markup). £42 × 1.6667 = £70.
From profit and margin: Revenue = Profit ÷ margin. £28 ÷ 0.4 = £70.

Finding cost

From revenue and margin: Cost = Revenue × (1 − margin). £70 × 0.6 = £42.
From revenue and markup: Cost = Revenue ÷ (1 + markup). £70 ÷ 1.6667 = £42.
From profit and markup: Cost = Profit ÷ markup. £28 ÷ 0.6667 = £42.

Finding profit

From revenue and margin: Profit = Revenue × margin. £70 × 0.4 = £28.
From cost and markup: Profit = Cost × markup. £42 × 0.6667 = £28.

Converting between the percentages

Markup = margin ÷ (1 − margin). 0.4 ÷ 0.6 = 0.6667.
Margin = markup ÷ (1 + markup). 0.6667 ÷ 1.6667 = 0.4.

Notice the pattern. Whenever you move from a margin to an amount you divide by one minus the margin; whenever you move from a markup you multiply by one plus the markup. Getting those two the wrong way round is the single most common pricing error, and margin vs markup shows what it costs.

Which pairs cause trouble?

Margin and markup together convert to each other perfectly and produce no amounts at all. Both are ratios of the same two quantities, so they fix the shape of the sale without saying anything about its size. A £42 cost and a £4,200 cost satisfy the identical pair. Ask for pounds from that combination and no honest calculator can answer you.

Profit and markup can be solved, but only by going through cost first: Cost = Profit ÷ markup, then Revenue = Cost + Profit. Plenty of online tools leave this pairing out. Ours handles it because the solver works on the whole system rather than a fixed input order, and you can test that on the homepage calculator.

Revenue and profit where the profit exceeds the revenue is arithmetically fine and produces a negative cost, which means nothing in trading terms. Treat a negative cost as a sign that one of your inputs is the wrong quantity rather than as a result.

Where does the formula run out?

Margin cannot reach 100%, since that would mean the goods cost you nothing. Anything at or above it gets rejected rather than approximated. Markup has no such ceiling: a 58p coffee at £3.40 is a 486% markup and a perfectly ordinary 82.94% margin.

Zero revenue breaks margin, because revenue is the denominator. Zero cost breaks markup for the same reason, and the calculators return a dash rather than an infinity.

Negative margins are legitimate. Loss leaders and clearance stock do sell below cost, and the arithmetic copes. What it cannot tell you is whether the loss was on purpose.

If you would rather see the method applied to a real pricing job than watch the algebra, how to calculate profit margin walks it through step by step.

Formula questions

What is the margin formula?
Margin % = ((Revenue − Cost) ÷ Revenue) × 100. Everything else on this page is that equation rearranged.
How do you find revenue from cost and margin?
Revenue = Cost ÷ (1 − margin as a decimal). A £42 cost at a 40% margin gives £42 ÷ 0.6 = £70.
How do you find cost from revenue and margin?
Cost = Revenue × (1 − margin as a decimal). £70 at a 40% margin gives £70 × 0.6 = £42.
Why can you not get an amount from margin and markup together?
Because both are ratios of the same two quantities. Knowing them fixes the shape of the sale but not its size, so a £42 and a £4,200 cost satisfy the same pair.
What happens to the formula when cost is zero?
Margin is 100% and markup is undefined, because dividing by zero has no answer. The calculators return a dash for markup rather than an infinity.

Keep reading