LIFO Calculator for Inventory

Quick answer

The LIFO calculator values inventory with the last-in, first-out method: the cost of the newest purchases is matched to sales first, giving cost of goods sold, ending inventory and gross profit – and you can switch to FIFO to compare.

$
Units available
—
Total cost of goods available
$ —
Cost of goods sold
$ —
Ending inventory value
$ —
Units left
—
Revenue
$ —
Gross profit
$ —
Weighted average cost per unit
$ —

When prices rise, LIFO gives a higher cost of goods sold and lower taxable profit than FIFO. LIFO is allowed under U.S. GAAP (with the LIFO conformity rule for taxes) but not under IFRS. Everything is calculated in your browser, so nothing you type is sent to our server.

How to use the LIFO Calculator for Inventory

  1. Method
  2. Units in each purchase (oldest first)
  3. Cost per unit of each purchase
  4. Units sold
  5. Selling price per unit

Everything runs in your browser, so results appear instantly and nothing you type is sent to a server.

How it works

Enter the units and unit cost of each purchase in date order (separated by commas), the units sold and the selling price.

Tips

  • Use consistent periods (a year or a quarter) for flow figures and period-end values for balances.
  • Average opening and closing balances when a ratio mixes a flow with a stock.
  • Benchmark against competitors in the same industry.
  • Read the ratio together with others – profitability, liquidity and efficiency tell different stories.

Common mistakes to avoid

  • Using sales instead of cost of goods sold for inventory ratios.
  • Mixing gross, operating and net profit.
  • Ignoring one-off items that distort a single year.

Formula

LIFO: units sold are costed from the latest purchases firstCOGS = Σ (units taken from each lot × lot cost)Ending inventory = total purchases − COGS

Worked example

Inputs — Method: LIFO – last in, first out; Units in each purchase (oldest first): 100, 150, 120; Cost per unit of each purchase: 10, 12, 13; Units sold: 260; Selling price per unit: $20.
Results — Units available = 370; Total cost of goods available = $4,360; Cost of goods sold = $3,240; Ending inventory value = $1,120; Units left = 110; Revenue = $5,200.

Frequently asked questions

What is LIFO?

Last in, first out – the newest stock is treated as sold first.

Is LIFO allowed under IFRS?

No – only under U.S. GAAP.

Why do companies use LIFO?

In inflation it raises COGS and lowers taxable income.

What formula does the LIFO Calculator for Inventory use?

LIFO: units sold are costed from the latest purchases first.

Sources

  1. IRS – Publication 538, Inventories

Cite this calculator

Speedy Calculator. (2026). LIFO Calculator for Inventory. Speedy Calculator. https://speedycalculator.com/calculators/finance/lifo-inventory/