Margin vs Markup in Excel: Convert Between Them and Price to a Target Margin

The pricing guideline says products must earn a 40% margin. The sales team’s quote tool multiplies cost by 1.4. A product costing 60 is quoted at 84. Its margin is 28.6%. Every quote out of the tool for the past year has been priced below guideline, and the gross margin shortfall in the BvA has been blamed on product mix.

Margin and markup measure the same profit against different bases. Confusing them is one of the most expensive small mistakes in finance, because it sits inside every price. This post covers the two formulas in Excel 2021 or 365, how to convert between them, how to set a price from a target margin, and how to make a pricing sheet that cannot mix them up.

Two formulas, one profit

For a product that costs 60 and sells for 100, the profit is 40 either way. The difference is what you divide by.

Margin = (Price - Cost) / Price
Markup = (Price - Cost) / Cost

Margin is 40 / 100 = 40%. Markup is 40 / 60 = 66.7%. Margin is a share of the selling price, which is how the P&L reports gross margin. Markup is a share of cost, which is how many buyers and salespeople think when they set prices.

Neither is wrong. The mistake is applying one where the other was meant.

Convert between them

Markup = Margin / (1 - Margin)
Margin = Markup / (1 + Markup)

A 40% margin is a 66.7% markup. A 40% markup is a 28.6% margin. The gap widens fast as the numbers get bigger:

MarginEquivalent markup
20%25.0%
30%42.9%
40%66.7%
50%100.0%
60%150.0%

Margin can never reach 100%, because that would mean zero cost. Markup has no upper limit. A team that talks about a “100% markup” means a 50% margin; a team that talks about a “100% margin” means something has gone wrong.

Price to a target margin

To earn a target margin, divide cost by one minus the margin:

=Cost / (1 - TargetMargin)

For a cost of 60 and a 40% target: 60 / 0.6 = 100. The common mistake is =Cost*(1+TargetMargin), which gives 84 and treats the margin as a markup.

To price to a target markup, multiply:

=Cost * (1 + TargetMarkup)

Both formulas are right for their own input. The pricing sheet has to make clear which input it takes.

Build the pricing sheet so it cannot mix them

Store one, calculate the other. Pick margin as the policy input, because it matches the P&L and the gross margin target in the budget. Calculate markup from it if the sales team wants to see it. Never let users type both.

Label the input with its base. “Target gross margin (% of price)” cannot be misread. “Target %” will be.

Show the resulting margin next to every price. Whatever the formula, recalculate the margin from the final price and cost:

=(Price - Cost) / Price

and conditionally format any line below the policy. Discounts are where this matters most: a 10% discount on a 40% margin product does not leave a 30% margin. It leaves 33.3%, because the discount comes off price and the cost does not move. Check: price 100 discounted to 90, cost 60, margin 30/90.

Watch the cost basis. Margin on landed cost (including freight and duty) and margin on purchase price are different numbers. Define cost once, on the inputs tab.

Blended margin is not the average

When several products sell together, the blended margin is total profit over total revenue, not the average of the product margins:

=SUM(Profit) / SUM(Revenue)

A 60% margin accessory that sells 1,000 and a 20% margin system that sells 50,000 blend to about 20.8%, not 40%. Mix drives margin, which is why gross margin variance analysis splits price, cost and mix separately. The same sum-first rule applies to any ratio, as the rolling 12-month totals post shows for margins over time.

Where it breaks

Quote tools with a “margin” field that multiplies. Test any pricing tool with cost 60 and a 40% input. If the price is 84, it is applying markup.

Discounts applied to markup. Discounting a price built from markup by the same percentage as the markup does not get back to cost. Price 84 (60 plus 40%) discounted 40% is 50.40, below the 60 cost.

Gross margin targets set on revenue including pass-through. Freight recharged at cost adds revenue with zero margin and drags the percentage down. Report margin on product revenue, with pass-through shown separately.

Different definitions across teams. Sales talks markup, finance talks margin, procurement talks savings on cost. A one-line definition on the pricing sheet and in the budget pack ends the confusion. Every input carries its unit is the same principle.

Similar Posts