Cost of Goods Sold is calculated by adding the cost of beginning inventory to the cost of purchases during a specific period and subtracting the cost of ending inventory from the total. The formula is: COGS = Beginning Inventory + Purchases - Ending Inventory.