π¦ LIFO Inventory Calculator
Cost of goods sold and ending inventory under last-in, first-out.
LIFO cost of goods sold
Estimates for planning only, not financial advice.
LIFO assumes the last units bought are the first ones sold. That single assumption decides which costs hit the income statement and which stay on the balance sheet. Sell 150 units from layers of 100 at $10, 100 at $12, and 100 at $15, and LIFO takes all 100 of the newest $15 units plus 50 at $12: cost of goods sold is $2,100 and ending inventory is $1,600. This calculator applies that layer-by-layer logic to your purchases and adds revenue and gross profit.
The stakes are taxes. In rising-cost environments LIFO puts the highest costs into COGS, shrinking taxable profit. Companies do not choose LIFO because it describes their warehouse; they choose it because it defers real tax dollars. Understanding the mechanics is understanding the motive.
How to Use This Calculator
List each purchase as quantity @ unit cost, oldest first, one per line. Enter units sold and the selling price per unit. The calculator walks the layers newest-first and reports COGS, ending inventory, and gross profit.
Enter purchase layers oldest to newest, like 100 @ 10 on each line. These are your cost layers.
Enter units sold and the selling price per unit for the gross profit math.
Read COGS, ending inventory, and margin. For the pricing side of the same business, our margin calculator converts cost and price into margin and markup.
LIFO Versus FIFO
With the default layers and 150 units sold, FIFO would take 100 at $10 plus 50 at $12 for COGS of $1,600, leaving $2,100 in ending inventory. LIFO reports $2,100 of COGS and $1,600 of inventory: $500 more expense and $500 less asset. In a 21 percent tax bracket that $500 of extra COGS defers $105 of tax. Multiply by real inventory scale and the choice is worth millions.
Reading the Output
| Figure | Default example | What it tells you |
|---|---|---|
| LIFO COGS | $2,100 | Newest costs matched to sales |
| Ending inventory | $1,600 | Oldest costs remain on the books |
| Gross profit at $25 | $1,650 | Revenue $3,750 minus COGS |
| LIFO reserve | $500 | Gap to FIFO inventory value |
Watch the ending inventory over time under LIFO in inflation: it fossilizes at ancient costs and stops resembling what the stock is worth. Analysts add the disclosed LIFO reserve back to compare with FIFO reporters. For inventory-heavy businesses tracking purchase costs, our unit price calculator keeps per-unit buying honest.
Worked Example
With the defaults: layers of 100 @ $10, 100 @ $12, 100 @ $15, and 150 units sold at $25 each. LIFO consumes the newest layer first: 100 units at $15 = $1,500, then 50 units at $12 = $600, for COGS of $2,100. Total purchased cost was $1,000 + $1,200 + $1,500 = $3,700, so ending inventory is $3,700 - $2,100 = $1,600. Revenue is 150 x $25 = $3,750, gross profit is $1,650, and the gross margin is 44.0 percent.
Common Pitfalls
The biggest is forgetting the conformity rule: LIFO for tax means LIFO for the books in the US, so the earnings hit is real on reported statements. Another is LIFO liquidation: sell from old layers in a year you under-purchase and ancient low costs create phantom profit that gets taxed. And remember the IFRS ban: if the company might ever report internationally, LIFO builds a conversion project.
My rule: LIFO is a tax decision wearing an accounting costume. If input costs are flat, it adds complexity for nothing. If they rise steadily and inventory is large, the deferral is genuine money, and the calculator above shows exactly where it comes from.
LIFO in Practice: The Dollar-Value Method
Real companies rarely track individual cans of soup. Most LIFO users apply the dollar-value method, grouping inventory into pools and measuring changes in total dollars adjusted for inflation. New layers form when pool value rises; old layers liquidate when it falls. This keeps the bookkeeping manageable while preserving the tax benefit.
Watch for LIFO liquidation, the trap hidden in the method. If a company draws down old, cheap layers during a shortage, it reports artificially high profits and pays tax on phantom gains, the opposite of the usual benefit. Footnotes disclose the LIFO reserve, the gap between LIFO and FIFO inventory values, so analysts can compare companies across methods. When evaluating a LIFO company, always add the reserve back before computing inventory ratios. For the tax timing angle, our income tax calculator estimates what those deferred dollars are worth.
IFRS and LIFO
International Financial Reporting Standards ban LIFO entirely, which complicates life for multinationals. A US company using LIFO domestically must maintain FIFO records for its IFRS-reporting foreign subsidiaries, running two inventory systems. Analysts comparing US and European peers routinely adjust LIFO users to FIFO for apples-to-apples ratios.
Estimates for planning only, not financial advice.Frequently Asked Questions
What is LIFO in inventory accounting?
LIFO, last-in first-out, assumes the most recently purchased inventory is sold first. Cost of goods sold therefore reflects the newest costs, while ending inventory carries the oldest costs. It is one of three main cost-flow assumptions alongside FIFO and weighted average, and it is permitted under US GAAP but banned under IFRS.
How do you calculate LIFO cost of goods sold?
Work backward through purchase layers from newest to oldest, taking units sold from each layer at its unit cost until the sold quantity is covered. Selling 150 units from layers of 100 at $10, 100 at $12, and 100 at $15 takes all 100 of the $15 layer plus 50 of the $12 layer: COGS = $1,500 + $600 = $2,100. Ending inventory is the remaining $1,600.
When does LIFO give higher COGS than FIFO?
When purchase costs are rising, which is the normal inflationary case. LIFO assigns the newest, highest costs to goods sold, raising COGS and lowering reported profit and taxes. In falling-cost environments the effect reverses. The difference between LIFO and FIFO inventory values is called the LIFO reserve.
What is the LIFO reserve?
The difference between inventory valued under FIFO and under LIFO. Companies using LIFO must disclose it so analysts can compare them with FIFO reporters. A growing LIFO reserve signals rising input costs being held off the balance sheet, and liquidating old LIFO layers can create a one-time profit spike called LIFO liquidation.
Why would a company choose LIFO?
For the tax benefit in inflationary times. Higher COGS means lower taxable income, so LIFO defers taxes versus FIFO. The IRS requires conformity: if you use LIFO for taxes you must use it for financial reporting too. In persistent inflation the tax savings are real cash.
Is LIFO allowed under IFRS?
No. IFRS bans LIFO, which is one of the major GAAP versus IFRS differences. Multinationals reporting under IFRS must use FIFO or weighted average. US companies using LIFO that list abroad or get acquired by IFRS reporters face a conversion that can restate years of inventory and tax figures.
What is LIFO liquidation?
When a company sells more units than it purchases, it dips into old, low-cost LIFO layers, matching ancient costs against current revenues. That produces an artificial profit boost and a tax bill on it. Analysts strip out LIFO liquidation gains because they do not reflect operating performance.
Does LIFO match the physical flow of goods?
Not necessarily, and it does not have to. LIFO is a cost-flow assumption, not a tracking of which box left the warehouse. A grocer physically selling the oldest milk first can still use LIFO for accounting. The physical flow and the cost flow are independent choices.
How does LIFO affect financial ratios?
In rising costs, LIFO lowers reported profit, lowering return on assets and net margin versus FIFO, while the understated inventory lowers the current ratio. Analysts often add back the LIFO reserve to compare LIFO and FIFO companies on equal footing.
Which industries use LIFO most?
Industries with large, rising-cost commodity inventories: oil and gas, chemicals, metals, and auto dealers. Any business holding big inventories through inflation benefits from the tax deferral. Retailers with stable costs gain little and often stay with FIFO or weighted average.