Inventory valuation method affects COGS, gross margin, and balance sheet carrying value. This calculator applies FIFO (first-in, first-out) or weighted-average cost flow to beginning inventory and up to three purchase layers — useful for controllers comparing methods and bookkeepers reconciling perpetual records.
How to use this calculator
- Select FIFO or weighted-average valuation.
- Enter beginning inventory units and unit cost.
- Enter purchase layers (units and unit cost for each receipt).
- Enter units sold during the period.
- Review COGS, ending inventory, remaining layers, and margin implications.
Formula
FIFO: COGS uses the oldest layers first; ending inventory reflects most recent costs. Weighted average: average unit cost = total cost ÷ total units; COGS = units sold × average cost; ending inventory = remaining units × average cost.
Example
With 100 units at $10, purchases of 200 at $12 and 150 at $14, and 300 units sold, FIFO COGS consumes beginning and earlier purchase layers first; weighted average smooths all costs into one average.
Frequently asked questions
When is FIFO preferred?
FIFO is common under IFRS and permitted under U.S. GAAP. During inflation it assigns older, lower costs to COGS, which can increase reported gross margin versus LIFO or weighted average.
When is weighted average used?
Weighted average is typical for fungible goods, process costing environments, and ERP systems that update average cost on each receipt.
Can I model LIFO here?
This calculator supports FIFO and weighted average only. LIFO is U.S.-specific and requires layer tracking policies beyond this scope.
What if units sold exceed available inventory?
The calculator validates that units sold do not exceed total units on hand. Negative inventory is not permitted.