FIFO, LIFO and Weighted Average Inventory Calculator
Value inventory with FIFO, LIFO or weighted average cost: enter beginning stock and up to three purchases, and get cost of goods sold, ending inventory and gross profit for all three methods.
How it works
Goods available = Σ units × unit cost of every layer · FIFO: units sold are costed from the oldest layers first · LIFO: from the newest layers first · Weighted average: average cost = goods available ÷ units available, COGS = average cost × units sold · Ending inventory = goods available − COGS · Gross profit = units sold × price − COGS
When identical items are bought at different prices, an inventory costing method decides which cost goes to the goods sold and which stays in stock. This calculator uses the periodic system (all purchases of the period are known before costing). With rising prices FIFO gives the lowest COGS and highest profit, LIFO the highest COGS and lowest taxable profit, and weighted average sits between. FIFO and weighted average are allowed under IFRS (IAS 2); LIFO is permitted only under US GAAP and, if used for US taxes, must also be used in financial statements (LIFO conformity rule).
Worked example
Beginning stock 100 units at $10, then purchases of 200 at $12 and 150 at $13: 450 units cost $5,350.00. Selling 300 units under FIFO costs 100 × $10 + 200 × $12 = $3,400.00, leaving 150 × $13 = $1,950.00 in ending inventory. LIFO would give COGS of $3,750.00 and weighted average (average $11.89) $3,566.67. At $20 per unit, revenue is $6,000.00 and FIFO gross profit is $2,600.00 (43.33%).
Sources: IFRS — IAS 2 Inventories · IRS Publication 538 — Inventories (FIFO and LIFO)
Frequently asked questions
How do you calculate FIFO?
List your inventory layers from oldest to newest. Take the units sold from the oldest layer first, then the next, multiplying each by its cost. Whatever units remain — the newest purchases — form ending inventory.
How do you calculate LIFO?
Do the same but start from the newest purchase. The most recent costs go to cost of goods sold and the oldest costs stay in ending inventory.
Which method gives higher profit, FIFO or LIFO?
When costs are rising, FIFO matches older, cheaper costs with today's sales, so COGS is lower and profit higher. LIFO does the opposite and lowers taxable income. When costs fall, the effect reverses.
Is LIFO allowed under IFRS?
No. IAS 2 prohibits LIFO, so companies reporting under IFRS use FIFO, weighted average or specific identification. LIFO is still allowed under US GAAP and US tax rules.
What is the weighted average cost method?
Divide the total cost of goods available by the total units available to get one average cost per unit, then multiply by the units sold (COGS) and the units left (ending inventory).
Related calculators
Planning estimate only. Real results depend on your actual costs, prices, taxes and market — check the figures with your accountant or adviser before making business decisions.