The gross margin is the profit calculated on the selling prince of an article

For example, for a shop 
  • with 1 million in sales,
  • with a $100 000 in profit,

We would all say that he as a 10% gross margin

 

Margin Formula : (Selling-Cost)/ Selling

So to calculate the selling price based on the cost with a margin in % ;

 
Selling price = Cost / (1-Margin) 

Ex:

If an item as a cost of $100 with a margin of 40%, we should sell it for $166.67
 
Selling = 100/(1-0.4) = $166.67
 
Margin = (166.67-100)/166.67 = 40%