Inventory costing allocates the cost of goods available between ending inventory and cost of goods sold. FIFO assigns the oldest costs to sales first. Periodic LIFO assigns the latest period costs to sales first. Periodic weighted average divides total available cost by total available units. A sale can span several layers; do not multiply every sold unit by just the oldest price.
Perpetual moving average recomputes average unit cost after each purchase, so purchase timing matters. Under rising costs, FIFO generally leaves newer, higher costs in inventory. US GAAP permits LIFO, while IFRS does not. These exercises compare accounting cost assumptions rather than selecting a tax method. Use full precision for an average calculation, then round the final amounts to cents.