Calculate the cost of goods sold (COGS) to understand direct costs involved in the production of goods sold by a company, essential for profit margin analysis.