The short version
Margin measures profit as a percentage of the selling price. Markup measures profit as a percentage of cost. Because the denominator is different, the same profit dollars produce different percentages.
A simple example
If a product costs $60 and sells for $100, gross profit is $40. The gross margin is 40% because $40 is 40% of the $100 selling price. The markup is 66.67% because $40 is 66.67% of the $60 cost.
Which one should you use?
Use margin when you want to understand how much of sales remains as gross profit. Use markup when you are building a selling price from a known cost. Many businesses use both, but they should be labeled clearly.
Common mistake
Applying a 40% markup does not create a 40% margin. If you need a target margin, calculate the required selling price from that margin rather than substituting the same percentage as markup.