The formula for calculating retail margin is the sales price of an item minus COGS, divided by the sales price, multiplied by 100. If you sell an item at $20 and paid $10 to acquire it and sell it, your retail margin is $10 divided by $20, or 50 percent.ou subtract your COGS from your desired sales price in the same way, but then divide that amount by your COGS. If your target price is $20 and your COGS are $10, your markup is $10 divided by $10, or 100 percent. Thus, to achieve a 50 percent margin on an item that costs you $10, you need a 100 percent markup.