Business

LIFO Calculator

Last-in first-out COGS and ending inventory.

Enter your values

comma separated

Results update instantly as you type — no submit needed.

Results
Cost of goods sold
$4,200.00
Ending inventory
$1,600.00
Units remaining
150
Gross profit
$3,300.00
Gross margin
44%

Working

  1. 1200 units @ $15.00 = $3,000.00
  2. 2100 units @ $12.00 = $1,200.00

Quick answer

LIFO assumes the newest inventory sells first, so COGS uses the most recent purchase costs and ending inventory holds the oldest layers.

COGS = newest layers consumed first

At a glance

What it doesLast-in first-out COGS and ending inventory.
CategoryBusiness
Inputs neededUnits in each purchase (oldest first), Unit cost of each purchase, Units sold, Selling price per unit
Main outputCost of goods sold
FormulaCOGS = newest layers consumed first
CostFree — no sign-up, no download

How to use the LIFO Calculator

  1. 1List each purchase quantity oldest to newest.
  2. 2List the matching unit costs.
  3. 3Enter units sold and your selling price.

Inputs explained

Units in each purchase (oldest first)
comma separated
Unit cost of each purchase($)
Enter the unit cost of each purchase you are working with.
Units sold
Enter the units sold you are working with.
Selling price per unit($)
Enter the selling price per unit you are working with.

Worked example

Using the values the calculator loads with:

Inputs

  • Units in each purchase (oldest first)100, 150, 200
  • Unit cost of each purchase10, 12, 15 $
  • Units sold300
  • Selling price per unit25 $

Results

  • Cost of goods sold$4,200.00
  • Ending inventory$1,600.00
  • Units remaining150
  • Gross profit$3,300.00
  • Gross margin44%
  1. 200 units @ $15.00 = $3,000.00
  2. 100 units @ $12.00 = $1,200.00

Frequently asked questions

When does LIFO lower taxes?

In periods of rising costs — newer, higher costs go to COGS, cutting reported profit and tax.

Is LIFO allowed under IFRS?

No. LIFO is permitted under US GAAP but banned under IFRS, so international filers use FIFO or weighted average.

Results are estimates for general information. For medical, legal, structural or financial decisions, confirm with a qualified professional.