How is Gross Margin Calculated?

Gross margin is the difference between the amount in sales and whatever the production costs were. To find the gross margin, simply divide the gross profit by the total revenue.