The formula to calculate the margin (M) is:
\[ M = \frac{SP - CP}{SP} \cdot 100 \]
Where:
Let's say the selling price (SP) is $100 and the cost price (CP) is $60. Using the formula:
\[ M = \frac{100 - 60}{100} \cdot 100 \]
We get:
\[ M = 40 \% \]
So, the margin is 40%.