FIFO / LIFO Calculator
Compare inventory cost under the FIFO and LIFO methods. Enter your purchase batches (cost layers) and units sold to instantly see Cost of Goods Sold (COGS), ending inventory value, and gross profit for FIFO, LIFO, and weighted-average costing side by side. Includes a visual cost-layer stack showing exactly which batches flow into COGS versus inventory, the LIFO reserve, and a rising/falling price verdict โ with a full step-by-step breakdown.
Your ad blocker is preventing us from showing ads
MiniWebtool is free because of ads. If this tool helped you, please support us by upgrading for ad-free browsing and more daily uses, or allowlist MiniWebtool.com and reload.
- Allow ads for MiniWebtool.com, then reload
- Or upgrade for ad-free browsing and higher daily limits
About FIFO / LIFO Calculator
The FIFO / LIFO Calculator compares how much your inventory costs under the two most common cost-flow assumptions โ FIFO (First In, First Out) and LIFO (Last In, First Out) โ plus the weighted-average method. Enter your purchase batches and the units you sold, and the tool instantly works out the Cost of Goods Sold (COGS), ending inventory value, and gross profit for each method, shows you exactly which batches flow into COGS on a visual cost-layer stack, and reveals the LIFO reserve created by changing prices.
What Are FIFO and LIFO?
FIFO and LIFO are cost-flow assumptions: rules for deciding which unit costs to charge to expense when you sell inventory. They do not have to match the physical movement of goods โ they are accounting conventions for valuing what you sold and what you still hold.
- FIFO (First In, First Out): the oldest costs are charged to COGS first. The units left in ending inventory are valued at the most recent purchase prices.
- LIFO (Last In, First Out): the newest costs are charged to COGS first. The units left in ending inventory are valued at the oldest purchase prices.
- Weighted Average: every unit is assigned the same average cost, so COGS and ending inventory both sit between the FIFO and LIFO results.
FIFO and LIFO Formulas
For each method, COGS is the cost of the units sold and ending inventory is the cost of the units left over. Total cost available is always split between the two:
Worked Example
Suppose you buy three batches as prices rise, then sell 200 units:
| Batch | Quantity | Unit Cost | Batch Cost |
|---|---|---|---|
| Beginning / Batch 1 | 100 | $10.00 | $1,000 |
| Batch 2 | 150 | $12.00 | $1,800 |
| Batch 3 | 100 | $15.00 | $1,500 |
| Total | 350 | โ | $4,300 |
Selling 200 of the 350 units leaves 150 in ending inventory:
- FIFO COGS = 100ร$10 + 100ร$12 = $2,200; ending inventory = 50ร$12 + 100ร$15 = $2,100.
- LIFO COGS = 100ร$15 + 100ร$12 = $2,700; ending inventory = 100ร$10 + 50ร$12 = $1,600.
- Weighted average = $4,300 รท 350 = $12.286/unit โ COGS = $2,457; ending inventory = $1,843.
- LIFO reserve = $2,100 โ $1,600 = $500.
Because prices were rising, FIFO produced the lower COGS (and higher profit), while LIFO produced the higher COGS (and lower taxable income).
FIFO vs LIFO: How Prices Change the Result
| Price Trend | Lower COGS | Higher Reported Profit | Higher Ending Inventory | Lower Taxes |
|---|---|---|---|---|
| Rising prices (inflation) | FIFO | FIFO | FIFO | LIFO |
| Falling prices (deflation) | LIFO | LIFO | LIFO | FIFO |
| Stable prices | No difference โ every method gives the same result | |||
Which Method Should You Use?
- FIFO usually mirrors the real physical flow of goods, values ending inventory at current prices, and is accepted under both US GAAP and IFRS. During inflation it reports higher profit โ which can mean higher taxes.
- LIFO matches recent costs against current revenue and, during inflation, lowers taxable income. It is permitted under US GAAP but banned under IFRS, and it can leave ending inventory carried at very old, unrealistic costs.
- Weighted average is simple, smooths out price swings, and is accepted under both frameworks โ a good middle ground.
Periodic vs Perpetual
This calculator uses the periodic approach: it pools all purchase batches for the period, then applies a single total quantity sold against them. Under a perpetual system, costs are assigned at the moment of each individual sale, which can change LIFO results when purchases and sales are interleaved. For most planning, comparison, and study purposes, the periodic method shown here is the standard textbook treatment.
How to Use This Calculator
- Enter your purchase batches: add each purchase as a cost layer with its quantity and unit cost, entering the oldest batch first. Use ๏ผ Add batch for more layers.
- Enter units sold: type the total number of units sold during the period, and optionally a selling price per unit to see gross profit.
- Pick a currency and click Calculate FIFO vs LIFO.
- Review the comparison: see COGS, ending inventory, and gross profit for FIFO, LIFO, and weighted average, the LIFO reserve, and the visual cost-layer stack showing which batches became COGS.
Frequently Asked Questions
What is the difference between FIFO and LIFO?
FIFO assumes the oldest inventory is sold first, so the earliest costs flow into COGS and the newest batches stay in ending inventory. LIFO assumes the newest inventory is sold first, so recent costs flow into COGS and the oldest batches stay in inventory. When prices change over time, the two methods produce different COGS, ending inventory, and profit figures.
Which method gives a higher profit when prices are rising?
When prices are rising, FIFO charges older, cheaper costs to COGS, producing a lower COGS and a higher gross profit. LIFO charges newer, more expensive costs to COGS, producing a higher COGS and a lower gross profit, which also lowers taxable income. The pattern reverses when prices are falling.
What is the LIFO reserve?
The LIFO reserve is the difference between ending inventory under FIFO and under LIFO (FIFO ending inventory minus LIFO ending inventory). It measures how much a company's reported inventory is understated by using LIFO. In a period of rising prices the LIFO reserve is positive and tends to grow over time.
Is LIFO allowed under IFRS?
No. LIFO is prohibited under International Financial Reporting Standards (IFRS). It is permitted under US GAAP, where many companies use it to reduce taxable income during inflation. FIFO and weighted-average costing are accepted under both IFRS and US GAAP.
How is ending inventory calculated under FIFO and LIFO?
Ending inventory is the cost of the units left unsold. Under FIFO the remaining units are valued at the cost of the most recent batches; under LIFO they are valued at the cost of the oldest batches. The calculator subtracts the units sold from the total units available and values whatever remains according to each method's layer order.
What is weighted-average costing?
Weighted-average costing assigns the same average unit cost to every unit. The average cost equals total cost of goods available divided by total units available. COGS and ending inventory are then both valued at this single average rate, so the result falls between the FIFO and LIFO figures.
Additional Resources
Reference this content, page, or tool as:
"FIFO / LIFO Calculator" at https://MiniWebtool.com/fifo-lifo-calculator/ from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: June 29, 2026
Efficiency Calculators:
- Average Collection Period Calculator
- Debtor Days Calculator
- Fixed Asset Turnover Calculator
- Inventory Period Calculator
- Inventory Turnover Calculator
- Receivables Turnover Ratio Calculator
- Revenue Per Employee Calculator
- Total Asset Turnover Calculator
- EOQ Calculator New
- Reorder Point Calculator New
- Safety Stock Calculator New
- FIFO / LIFO Calculator New
- FTE Calculator
- Employee Turnover Rate Calculator
- Absenteeism Rate Calculator
- Billable Utilization Calculator
- Bradford Factor Calculator
- Takt Time Calculator