The Cost Of Ending Inventory FIFO, or the “First In, First Out” method, is a way of valuing inventory depending on the age of the items. Under this system, the cost of inventory is based on the cost of the oldest inventory items first. This means that the cost of goods sold is calculated by subtracting the cost of ending inventory from the cost of beginning inventory. The FIFO method allows companies to more closely align their inventory costs with their sales revenue and better assess profits or losses.