The cost of ending inventory in a Process Costing system is equal to the sum of all costs for units transferred out plus labor and factory overhead costs, less any materials that were released but not yet used in production. The cost of goods sold is the sum of all costs for units started and completed during the period.