In general, Gross profit = Sales - Cost of Goods sold
Cost of goods sold = purchase cost of the goods ( Opening stock + Purchases - Closing stock + Carriage inward ) + Selling costs ( Carriage outward, insurance and other direct selling expenses )
This gross profit of the company will be used to set off the costs of operating and general and administrative expenses to come to a net profit.