The cost of goods sold pertains to the direct costs involved in the production of a product. It is calculated as -
COGS = Starting Inventory + Purchases - Ending Inventory