Why margin is on price
Margin answers "of every dollar the customer pays, how much do I keep?", so it divides the profit by the selling price. Markup answers "how much did I add to what it cost me?", so it divides the same profit by the cost. Whenever you make a profit the price is the bigger number, which is why the margin is always the smaller percentage of the two.