Divide the markup by one plus the markup. A 30% markup becomes 0.30 divided by 1.30, which is a 23.1% margin. A 50% markup becomes a 33.3% margin.