Technical definition
First-in, first-out: a cost-flow assumption that assigns the oldest inventory costs to units sold first.
How it works
FIFO determines which historical costs move to cost of goods sold and which remain in ending inventory. It is an accounting cost-flow assumption and does not require the physical items to leave in exactly that order.
Everyday example
Ten units at $5 followed by ten at $7; selling twelve assigns $64 to cost of goods sold and leaves eight units at $7.
Common pitfall
FIFO describes cost assignment, not necessarily warehouse movement; rising prices can also make profit higher than under methods using newer costs first.