How the calculation works
Selling price = cost × (1 + markup ÷ 100). Margin = profit ÷ selling price.
A worked example
A cost of 80 with 25% markup gives a selling price of 100, profit of 20 and margin of 20%.
Use the result carefully
Markup uses cost as its denominator. Margin uses selling price. Neither includes overhead or taxes unless you include those costs in the starting figure.