Calculate margin as profit divided by selling price (cost A2, price B2).
Copy this formula
=(B2-A2)/B2Subtract cost from price to get profit, then divide by the price for the margin. Format as a percentage. Dividing by cost instead gives markup, which is a different (usually larger) number.
=(100-60)/100→40%A $60 cost sold at $100 = 40% margin.
Markup on cost
=(B2-A2)/A2Divides profit by cost instead of price.
Margin divides profit by the selling price; markup divides it by the cost, so markup is the larger figure.
Need a formula for your own data?
Describe what you want in plain language and let ExcelGPT write, explain, and verify the formula — free to start, no plugin.