A target margin reserves a share of the final selling price for gross profit. Because the price is the unknown denominator, the calculation must work backwards from the remaining cost share instead of adding the percentage to cost.
Divide cost by the remaining revenue share
For target margin m, cost occupies 1 − m of selling price. Therefore price = cost/(1 − m). With cost 48 and target margin 20%, cost occupies 80% of price: 48/0.80 = 60. Profit is 12 and 12/60 confirms the 20% margin.
Adding 20% to cost calculates markup, not margin
Multiplying 48 by 1.20 gives 57.60 and profit 9.60. That profit is 20% of cost, so it is a 20% markup. Relative to the 57.60 selling price, the margin is only 16.666667%. Both results are valid, but they answer different pricing questions.
A 100% margin has no finite positive price
As target margin approaches 100%, the remaining cost share approaches zero and the required price grows without bound. For any positive cost, exactly 100% margin would require dividing by zero. MarginCalc therefore accepts target margin from 0% inclusive to 100% exclusive.