To calculate gross, subtract the cost of goods sold from the net sales and then divide this figure by net sales to calculate the gross profit margin. Shiprocket’s free profit margin calculator does it for you, but you can also use the formula: Step 1: X (Net sales) - Y (COGS) = Z Step 2: Z / X (Net sales) = % Gross profit margin