Business

LIFO Calculator

Last-in first-out COGS and ending inventory.

Enter your values

comma separated

Enter the unit cost of each purchase in $.

Enter the units sold you are working with.

Enter the selling price per unit in $.

Results update instantly as you type — no submit needed. Your values are remembered on this device, and the shareable link reopens the calculator with exactly these numbers.

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 in $.
Units sold
Enter the units sold you are working with.
Selling price per unit($)
Enter the selling price per unit in $.

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.

What do I need to enter into the LIFO Calculator?

Just 4 values: units in each purchase (oldest first), unit cost of each purchase, units sold, selling price per unit. Every field starts with a realistic example, so you can change one number at a time and watch the result update instantly.

How does the LIFO Calculator work out the answer?

LIFO assumes the newest inventory sells first, so COGS uses the most recent purchase costs and ending inventory holds the oldest layers. It applies the formula COGS = newest layers consumed first and shows the working so you can check each step by hand.

Is the LIFO Calculator free, and do I need an account?

It is completely free with no sign-up, no download and no usage limit. Everything is calculated in your browser, so the numbers you type never leave your device.

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