LIFO Calculator for Inventory

Use the last-in, first-out method to estimate COGS, ending inventory, profit, and profit margin. This page also keeps the formula, examples, FAQs, and references close by so you can check the result with confidence.

What This LIFO Calculator for Inventory Helps You Do

LIFO uses the most recently purchased inventory first when computing COGS. Review the formula and examples below if you want to see how the result is derived.

This page is meant to give you a fast answer, but it also helps you double-check the math before you make a decision. Start with the inputs that you already know, run the calculation, and then compare the output with the formula, examples, and FAQs below so you can see whether the answer fits the situation you are modeling.

If the result looks off, the usual causes are a unit mismatch, a missing decimal, the wrong scenario, or a value that needs to be entered as a rate instead of a total. The notes on this page are designed to make those checks easy without forcing you to leave the calculator and search for context elsewhere.

  • Use the calculator first for a quick estimate.
  • Use the formula to understand how the result is built.
  • Use the examples to compare common use cases.
  • Use the references when the answer depends on a standard or assumption.

Common Checks

A quick result is useful, but the best result is one that still makes sense when you look at it a second time. If you are comparing scenarios, try changing one input at a time so you can see which variable has the biggest impact on the final answer. That makes it much easier to spot whether the calculation matches your expectations.

It also helps to keep the context of the problem in mind. A calculator can tell you the math, but you still need to decide whether the input represents a total, a rate, an average, or a category-specific assumption. When in doubt, start with a simple example from the page and scale up from there.

  • Check that every unit matches the rest of the problem.
  • Keep rates, totals, and averages separate.
  • Adjust one variable at a time when testing scenarios.
  • Use the smallest realistic input first, then scale upward.

Scenario Planning

This calculator is especially useful when you want a quick answer before you commit time, money, or effort. Try one baseline input set, then change a single number and compare the result so you can see how sensitive the answer is to that variable.

That makes the page useful for more than just arithmetic. It becomes a small decision aid that helps you compare options, test assumptions, and explain the final number with confidence when you need to share it with someone else.

units
$
units
$
units
$
units
$

Result

--

Quick Answer: LIFO uses the most recently purchased inventory first when computing COGS. Review the formula and examples below if you want to see how the result is derived.

How to Calculate LIFO Calculator for Inventory

  1. Enter the inventory layers: Add the quantities and unit costs for each purchase layer.
  2. Enter units sold: The calculator removes inventory from the newest layer first.
  3. Review COGS and profit: You can also see ending inventory and profit margin.

LIFO Calculator for Inventory Formula

COGS = last units sold x last unit cost + ...
Variable Meaning Unit
Units sold How many units left inventory units
Unit cost Purchase cost per layer $
Revenue Units sold x selling price $

Worked Examples

USA - Omni-style T-shirt example
  • Layer 1 quantity: 2
  • Layer 1 unit cost: $10
  • Layer 2 quantity: 2
  • Layer 2 unit cost: $13
  • Layer 3 quantity: 15
  • Layer 3 unit cost: $15
  • Units sold: 10
  • Selling price per unit: $16

Result: COGS $144 and profit $16

The newest inventory is sold first, leaving lower-cost stock in ending inventory.

UK - Smaller stockpile
  • Layer 1 quantity: 5
  • Layer 1 unit cost: $8
  • Layer 2 quantity: 8
  • Layer 2 unit cost: $10
  • Layer 3 quantity: 4
  • Layer 3 unit cost: $12
  • Units sold: 6
  • Selling price per unit: $15

Result: Higher COGS from the newest layer

Because the newest layer is sold first, profits reflect the most recent costs.

EU - Inflationary inputs
  • Layer 1 quantity: 10
  • Layer 1 unit cost: $5
  • Layer 2 quantity: 10
  • Layer 2 unit cost: $7
  • Layer 3 quantity: 10
  • Layer 3 unit cost: $9
  • Units sold: 12
  • Selling price per unit: $14

Result: Moderate profit and a smaller ending inventory value

Higher recent costs increase COGS and reduce taxable profit.

How to Interpret Your Results

Range Meaning Action
Lower COGS Inventory cost layers are inexpensive Compare against other inventory methods if needed.
Typical COGS The inventory layers are in a normal range Use the result for gross margin planning.
Higher COGS Recent inventory costs are expensive Review pricing and margin assumptions.

Frequently Asked Questions

It matches the newest, often highest, costs against current revenue first.

The calculator caps inventory depletion at zero, but you should increase the input layers.

Not always, but it can during inflation when recent costs are higher.

This page uses three layers for a practical planning estimate.
Planning note: This calculator uses three inventory layers as a planning model.

References

Last reviewed: March 2026