Since 2010 · Powering 2M+ tool runs every month
Since 2010
Add to Chrome

My Toolbox

Automatic Mode

No saved tools yet.

Go Premium
Related tools
Inventory Period CalculatorBreak-Even CalculatorStorage Unit Size CalculatorRandom Decimal Number Generator
Home Page > Financial Calculators > Efficiency Calculators

FIFO / LIFO Calculator

Enter purchase batches and units sold to compare cost of goods sold, ending inventory, and gross profit, and see the LIFO reserve.

Free to useNo sign-up requiredInstant Results
FIFO / LIFO CalculatorTry it now — free ▼
Quick examples — click to fill the form, then press Calculate:
📦 Purchase Batches (Cost Layers)
Batch (oldest first) Quantity Unit Cost
Total units sold this period.
Adds gross profit per method.

Embed FIFO / LIFO Calculator Widget

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:

Cost of Goods Available for Sale
$$\text{Goods Available} = \text{Beginning Inventory} + \text{Purchases}$$
The COGS / Ending Inventory Split
$$\text{Goods Available} = \text{COGS} + \text{Ending Inventory}$$
Weighted-Average Unit Cost
$$\text{Average Cost} = \frac{\text{Total Cost of Goods Available}}{\text{Total Units Available}}$$
LIFO Reserve
$$\text{LIFO Reserve} = \text{FIFO Ending Inventory} - \text{LIFO Ending Inventory}$$

Worked Example

Suppose you buy three batches as prices rise, then sell 200 units:

BatchQuantityUnit CostBatch Cost
Beginning / Batch 1100$10.00$1,000
Batch 2150$12.00$1,800
Batch 3100$15.00$1,500
Total350$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 TrendLower COGSHigher Reported ProfitHigher Ending InventoryLower Taxes
Rising prices (inflation)FIFOFIFOFIFOLIFO
Falling prices (deflation)LIFOLIFOLIFOFIFO
Stable pricesNo 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

  1. 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.
  2. Enter units sold: type the total number of units sold during the period, and optionally a selling price per unit to see gross profit.
  3. Pick a currency and click Calculate FIFO vs LIFO.
  4. 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:

Top & Updated:

EOQ CalculatorInventory Turnover CalculatorAverage Collection Period CalculatorView all →
Home Page > Financial Calculators > Efficiency Calculators > FIFO / LIFO Calculator