LIFO Inventory Calculator — Last In First Out COGS
Under LIFO (Last-In, First-Out) the most recently purchased inventory is assumed to be sold first. Enter up to three purchase lots — quantity and unit cost, oldest to newest — and the units sold, and get the COGS, ending inventory value, average COGS per unit, and a side-by-side FIFO comparison.
units
units
units
Cost of goods sold — newest (most expensive) units consumed first
LIFO rule
From Lot 3 (newest) (@ $15.00/unit)
From Lot 2 (@ $12.00/unit)
Total COGS (LIFO)
- 1
From Lot 3 (newest)
80 × 15 = 1,200 - 2
From Lot 2
100 × 12 = 1,200 - 3
COGS under LIFO
2,400Newest-purchased units charged to cost of goods sold first.
How does this calculator work?
LIFO sells the newest inventory first. With three lots (100 @ $10, 150 @ $12, 80 @ $15) and 180 units sold, LIFO takes 80 from Lot 3 and 100 from Lot 2 → COGS = $2,400. Remaining inventory: 50 units of Lot 2 and 100 units of Lot 1, valued at the older, lower costs.
Formula
How this is calculated
LIFO is an inventory costing method that assumes the last items purchased are the first ones sold. When prices are rising, LIFO assigns higher costs to COGS (because recent purchases are more expensive) and leaves older, cheaper stock in the ending inventory. This tends to reduce taxable income during inflationary periods, which is why LIFO is permitted under US GAAP (though banned under IFRS).
The calculator processes your lots in reverse order — Lot 3 (newest) is depleted first, then Lot 2, then Lot 1 — until all units sold are accounted for. COGS is the sum of units taken from each lot multiplied by that lot's cost. The ending inventory is valued at the cost of whatever units remain, which will be from the oldest lots.
The LIFO reserve is the difference between FIFO COGS and LIFO COGS. In a rising-price environment the LIFO reserve is positive (LIFO COGS > FIFO COGS), meaning LIFO reports lower profit. Analysts add the LIFO reserve back to inventory to convert LIFO-basis balance sheets to FIFO-equivalent figures for cross-company comparisons.
Frequently asked questions
When prices are rising, LIFO charges the newest (more expensive) units to COGS first, producing higher COGS and lower gross profit — reducing taxable income compared to FIFO. In a falling-price environment the effect reverses.
No. LIFO is permitted only under US GAAP. International Financial Reporting Standards (IFRS) prohibit it because it can result in outdated, misleading balance sheet inventory values. Companies reporting under IFRS must use FIFO or weighted-average cost.
The LIFO reserve is the cumulative difference between the inventory value reported under LIFO and what it would be under FIFO. It appears as a disclosure note. Analysts add it back to convert LIFO inventory to FIFO-equivalent values when comparing companies.
Also known as
TG we-Calculate Editorial Team. (2026). LIFO Inventory Calculator — Last In First Out COGS [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/lifo-for-inventories-calculator
TG we-Calculate Editorial Team. "LIFO Inventory Calculator — Last In First Out COGS." TG we-Calculate. 2026. https://we-calculate.com/calculator/lifo-for-inventories-calculator.
TG we-Calculate Editorial Team, "LIFO Inventory Calculator — Last In First Out COGS," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/lifo-for-inventories-calculator
@misc{wecalculate_lifo_for_inventories_calculator, title = {LIFO Inventory Calculator — Last In First Out COGS}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/lifo-for-inventories-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
