Built and fact-checked by the DocNectar team — see our editorial standards
Key Features
Instant Calculation
Get accurate results in real time with our optimized algorithm.
Mobile Friendly
Fully responsive design. Works on all devices & screen sizes.
Privacy Focused
Your data stays on your device. We don't store any inputs.
100% Free
No hidden costs. This tool is completely free forever.
When inventory is purchased at different costs over time, FIFO and LIFO are the two most common conventions for deciding which units' cost counts as "sold" versus what's left in ending inventory — and each gives a genuinely different Cost of Goods Sold when unit costs change over time.
How it works
Enter up to 3 purchase layers (quantity and unit cost each, oldest to newest) and how many units were sold. Choose FIFO (consumes the oldest layer first) or LIFO (consumes the newest layer first), and the calculator works through each layer in the appropriate order to find Cost of Goods Sold and the value of what's left in ending inventory.
- Enter costing method.
- Enter purchase layer 1 — quantity (oldest).
- Enter purchase layer 1 — unit cost ($).
- Enter purchase layer 2 — quantity (optional).
- Enter purchase layer 2 — unit cost ($, optional).
- Enter purchase layer 3 — quantity (optional, newest).
- Enter purchase layer 3 — unit cost ($, optional).
- Enter units sold.
- Click Calculate to see your results.
Examples
Rising unit costs
With 100 units bought at $10 and then 50 more at $12, selling 120 units gives a FIFO cost of goods sold of $1,240 (the cheaper units are "sold" first) versus a LIFO cost of goods sold of $1,300 (the pricier units are "sold" first) — the same sale, two different reported costs.
Who should use it
- Accounting and bookkeeping coursework on inventory costing methods.
- Comparing the cost impact of FIFO vs. LIFO for a small business's inventory.
Industry applications
- Retail and manufacturing inventory accounting
- Small business bookkeeping
Advantages
- Shows both the total cost of goods sold and the resulting ending inventory value together.
- Makes the real dollar difference between FIFO and LIFO concrete with your own numbers.
Limitations
- Capped at 3 purchase layers for simplicity — a real inventory ledger with many purchases would need a full accounting system.
Common mistakes to avoid
- Assuming FIFO and LIFO always give similar results — the gap can be substantial when unit costs have changed significantly between purchases.
- Entering purchase layers out of chronological order — layer 1 should always be your oldest purchase, layer 3 your newest.
Best practices
- Keep purchase layers in true chronological order (oldest as layer 1) since both FIFO and LIFO logic depend on that ordering.
- Confirm which costing method your business is actually required or permitted to use before relying on either result for real accounting.
Tips
- If unit costs have been rising over time, LIFO typically reports higher Cost of Goods Sold (and lower taxable profit) than FIFO — worth understanding when comparing the two for tax-planning discussions with an accountant.