Work out selling price from cost and markup percent, or work out markup and margin percent from cost and selling price — useful for material markup, contractor pricing, or resale.
Markup is profit as a % of cost; margin is profit as a % of selling price.
Markup is profit divided by cost — a $100 item marked up 40% sells for $140. Margin is profit divided by selling price — that same $40 profit on a $140 sale is a 28.6% margin. They describe the same sale from two different denominators, which is why margin is always a smaller percentage than markup at the same profit.
Markup divides profit by cost; margin divides profit by selling price. A 50% markup is only a 33.3% margin — they're never the same number except at 0%.
Selling price = cost × (1 + markup % ÷ 100). A $100 cost with a 40% markup sells for $140.