To compute the selling price, let's assume that a product has a cost of $100 and the seller wants to have a 30% gross margin on its selling price, or 30% of SP. The relationship between a selling price, cost, and gross margin or gross profit is: SP - cost = gross profit or gross margin. If the gross margin is 30% of SP, the cost of $100 will be 70% of SP.

Algebra allows us to compute the selling price as follows:

SP - cost = gross margin

SP - $100 = 30% of SP

1SP - $100 = 0.3SP

1SP - 0.3SP = $100

0.7 SP = $100

0.7SP/0.7 = $100/0.7

SP = $142.85.

To verify that a selling price of $142.85 will give us the correct gross margin, we subtract the cost of $100 from the $142.85 selling price. The result is a gross profit of $42.85 which when divided by the selling price gives us the required gross margin of 30% ($42.85/$142.85 ).