Markup is profit divided by cost; margin is profit divided by selling price. With a R$ 100 cost and a R$ 125 price, profit is R$ 25: a 25% markup and a 20% margin. The conversion is margin = markup / (1 + markup). A 50% markup is a 33.33% margin, and a 50% margin needs a 100% markup.