A retailer's cost of goods sold is equal to the cost of its beginning inventory plus the cost of its net purchases (the combination of these is the cost of goods available) minus the cost of its ending inventory.
The cost of goods sold is also the cost of the net purchases plus or minus the change in the inventory during the accounting period. For example, if the inventory increased, the cost of goods sold is the cost of the net purchases minus the increase in the inventory. If the inventory decreased, the cost of goods sold is the cost of the net purchases plus the decrease in inventory.
When there is inflation, the retailer must also choose a cost flow assumption, such as FIFO, LIFO, or average. The cost flow assumption will make a difference in the amounts reported as the cost of goods sold and the costs reported as inventory. (The cost flow assumption can be different from the way inventory items are rotated or sold.)