AwardXero App of the Year Awards 2026 Finalist
qoblex_logo_main

LIFO Inventory Cost Calculator

LIFO (last-in, first-out) assumes the most recent inventory you bought is the first you sell, so cost of goods sold is drawn from your newest lots and ending inventory is left valued at your oldest costs.

LIFO (last-in, first-out) assumes the most recent inventory you bought is the first you sell, so cost of goods sold is drawn from your newest lots and ending inventory is left valued at your oldest costs. In a period of rising prices that gives you higher COGS, lower reported profit, and a lower tax bill. Enter your purchase lots and sales in the calculator below to see the COGS and ending inventory LIFO produces. For the concept in full, see the LIFO concept guide.

A free tool to see the cost of goods sold and ending inventory that last-in, first-out produces from your purchase lots and sales.

If you buy the same item at different prices over time, the cost you record when you sell one depends entirely on which cost you decide to expense. LIFO makes one specific choice: it expenses your most recent costs first. When prices are climbing, that means the higher, newer costs flow into cost of goods sold, and the older, cheaper costs stay sitting in the inventory you still hold. It is a legitimate accounting method in the United States, and for some businesses it is the right one, but it comes with rules and trade-offs worth understanding before you commit to it.

Most people who reach for a calculator want to check their own numbers, so the tool comes first and the explanation second. There is also an honest section below on when LIFO is the wrong fit and a simpler or different method serves you better.

LIFO calculator

What is LIFO and how is it calculated?

LIFO stands for last-in, first-out. It is a cost-flow assumption, which means it is a rule for deciding which cost to attach to the goods you sell, not a claim about which physical units leave the shelf. Under LIFO you assume the last units you bought are the first ones sold, so the cost you record for a sale comes off your most recent purchase lot first, then the next most recent, working backward. The LIFO concept guide walks through the idea and how it compares with FIFO.

The two numbers LIFO produces are:

  • Cost of goods sold (COGS): the total cost of the units you sold, taken from your newest lots first.
  • Ending inventory: the value of the units you still hold, which under LIFO is made up of your oldest costs, because the newest ones have already been expensed.

That is the whole mechanism. The reason it matters is what it does to your reported numbers when prices move, which is the next section.

The worked example

Say you buy the same item in two lots as prices rise, then make one sale:

  • Buy lot 1: 100 units at $10.00 = $1,000
  • Buy lot 2: 100 units at $15.00 = $1,500

You now hold 200 units. Then you sell 100 units.

Under LIFO you expense the newest costs first, so the sale draws entirely from lot 2, the most recent:

  • COGS = 100 x $15.00 = $1,500
  • Ending inventory = the 100 units left in lot 1, the oldest cost: 100 x $10.00 = $1,000

Compare that with first-in, first-out on the same numbers. FIFO would expense the oldest lot first, giving COGS of 100 x $10.00 = $1,000 and leaving ending inventory at $1,500. Same purchases, same sale, but LIFO reports $500 more cost of goods sold and $500 less ending inventory. The calculator above is preloaded with these figures, so you can watch LIFO produce COGS of $1,500 and ending inventory of $1,000, then change them to your own.

Why LIFO lowers profit and tax when prices rise

The point of the example is the pattern, not the single result. When your purchase prices are trending up, LIFO always pushes the higher recent costs into COGS. Higher COGS means lower gross profit, and lower profit means a lower income tax bill. That is the main reason US businesses elect LIFO: in an inflationary period it defers tax by keeping reported profit lower. The trade-off is that your balance-sheet inventory value drifts below what it would actually cost to replace the goods, because it is carried at old, cheaper costs.

When prices fall, the effect reverses: LIFO would report lower COGS and higher profit than FIFO. LIFO is not a one-way win. It tracks whichever direction your costs are moving.

Is LIFO allowed under GAAP and IFRS?

This is the single most important thing to know before you choose LIFO, because it is not allowed everywhere.

  • United States (US GAAP and IRS): LIFO is permitted. The IRS lists it as an accepted inventory valuation method in Publication 538 (checked 2026-07-23). There is one important string attached, the LIFO conformity rule: if you use LIFO for your US tax return, you generally have to use it in your financial statements too. You cannot show investors the higher FIFO profit and the tax authority the lower LIFO profit.
  • Everywhere on IFRS: LIFO is prohibited. The international standard for inventories, IAS 2 (checked 2026-07-23), permits only specific identification, first-in-first-out, and weighted average cost. LIFO is not on the list.

The practical consequence is simple. If your business reports under IFRS, which is most of the world outside the United States, LIFO is off the table and your realistic choices are FIFO or weighted average. If you are a US business reporting under GAAP, LIFO is available, subject to the conformity rule. For the alternative most businesses land on, see the FIFO concept guide.

When LIFO fits, and when a simpler approach is enough

LIFO is not the default method for most small businesses, and it should not be. Here is an honest read on where it earns its place and where it does not.

When LIFO makes sense

LIFO tends to fit a specific profile: a US-based business, reporting under US GAAP, holding non-perishable goods whose purchase costs are rising steadily, that wants to defer income tax by keeping reported profit lower. Classic examples are businesses dealing in commodities, fuel, metals, or durable goods with long, stable shelf lives. If that describes you and you have an accountant who has confirmed LIFO is worth the paperwork, it can be a sound choice.

When LIFO is the wrong fit

For a lot of businesses it simply is not an option or is not worth it:

  • You report under IFRS. Then LIFO is prohibited and the decision is already made for you.
  • You sell perishable or dated stock. LIFO leaves your oldest costs, and by implication your oldest goods, sitting in inventory, which is the opposite of how you actually rotate perishable stock. Physical rotation of dated stock is a separate concern from cost flow, and it usually points you toward first-expired-first-out picking, not LIFO accounting.
  • You want your balance sheet to reflect current value. LIFO carries inventory at old costs, which can understate what your stock is really worth.

When a spreadsheet is genuinely enough

If you have a small number of SKUs, low volume, and you have decided LIFO is right for your situation, a spreadsheet updated after each purchase and sale can handle the layering. Spreadsheets are how most businesses start costing their stock, and there is no shame in one for a stable, low-volume catalogue. The point where a spreadsheet stops keeping up is worth naming plainly: when purchases get frequent, when you carry many SKUs, or when you need current COGS on demand rather than at period end, maintaining LIFO layers by hand turns into its own job. That is usually where inventory software earns its place.

How Qoblex handles inventory costing

The calculator above is a simulator you drive by hand. Inside Qoblex, cost of goods sold is tracked automatically as stock moves, so the cost per unit you see reflects what you actually have on hand rather than a figure someone has to maintain in a sheet. Qoblex uses a moving average cost approach to inventory valuation, which suits most SMB operators reporting under IFRS or GAAP and avoids the layer-tracking overhead LIFO carries. If your accountant has specifically advised LIFO for US tax reasons, that is a conversation to have with them about how it maps to your books.

Whichever method you land on, your accounting platform stays your book of record: Qoblex handles the operational inventory costing while QuickBooks Online or Xero keeps the ledger. For current plans, see qoblex.com/pricing.

FAQ

What is the LIFO method in simple terms? LIFO, last-in first-out, is an inventory costing rule that assumes the most recent goods you bought are the first ones you sell. Cost of goods sold is calculated from your newest purchase costs, and the inventory you still hold is valued at your oldest costs. It is a cost-flow assumption, not a rule about which physical units leave the shelf.

How do you calculate COGS using LIFO? Take the units you sold and cost them against your most recent purchase lot first, then work backward into older lots until the quantity is covered. Add up those costs and that is your LIFO COGS. Whatever units remain are your ending inventory, valued at the oldest remaining costs.

Is LIFO allowed under IFRS? No. LIFO is prohibited under IFRS. IAS 2 permits only specific identification, first-in-first-out, and weighted average cost. Businesses reporting under IFRS use FIFO or weighted average instead.

Is LIFO allowed under US GAAP? Yes. LIFO is permitted in the United States under US GAAP and by the IRS. If you use LIFO for tax, the LIFO conformity rule generally requires you to use it in your financial statements as well.

Why do businesses use LIFO? Mainly to defer income tax when prices are rising. Expensing the newest, higher costs first raises cost of goods sold, which lowers reported profit and therefore lowers the tax bill in an inflationary period. The trade-off is a lower inventory value on the balance sheet.

What is the difference between LIFO and FIFO? They are opposite cost-flow assumptions. LIFO expenses your newest costs first; FIFO expenses your oldest costs first. When prices rise, LIFO produces higher COGS and lower profit while FIFO produces lower COGS and higher profit. The FIFO concept guide covers FIFO in full.

Can I use a spreadsheet for LIFO instead of software? For a small SKU count, low volume, and stable operations, yes: a spreadsheet that tracks purchase layers and expenses the newest first can work. It gets harder as purchase frequency rises, as SKU counts grow, or when you need current COGS on demand, which is usually the point where inventory software pays for itself.


Share

Your next stage of growth is just a click away