Last in, first out (LIFO): Definition, formulas, and examples

- What is LIFO?
- LIFO vs. FIFO: How each method changes profit and taxes
- How the LIFO method works
- How to calculate last in, first out (LIFO)
- LIFO reserve and LIFO liquidation
- LIFO rules: GAAP, IFRS, and IRS requirements
- Advantages and disadvantages of LIFO
- Track inventory costs accurately with Ramp's automated coding and real-time reporting

Last in, first out (LIFO) is an inventory costing method that assumes the items you bought or made most recently are the first ones you sell. During inflation, LIFO moves your newest, highest costs into cost of goods sold (COGS), which lowers reported profit and taxable income.
US generally accepted accounting principles (GAAP) allows it, but International Financial Reporting Standards (IFRS) doesn't, so LIFO is mostly a tool for US companies.
What is LIFO?
LIFO is a cost flow assumption that expenses your newest inventory costs first and leaves your oldest costs on the balance sheet. It applies to your books only, so your warehouse can keep shipping the oldest stock first.
US companies with large, non-perishable inventories and rising costs use LIFO most. That includes manufacturers, distributors, retailers, and auto dealers whose goods don't spoil while they wait to sell.
Warehousing uses the term differently. There, LIFO means physically pulling the last item you stored, which is how drive-in and push-back racking work for goods like bricks or cement. When your finance team says LIFO, they mean the accounting method, and that's the version that changes your tax bill.
LIFO vs. FIFO: How each method changes profit and taxes
FIFO (first in, first out) assumes your oldest costs go to COGS first, the reverse of LIFO. Say you buy 100 units at $10 on January 10 and 100 more at $14 on August 20, then sell 100 units at $20 each. Weighted average cost, the third common method, blends both purchases at $12 per unit.
| Factor | LIFO | FIFO | Weighted average cost |
|---|---|---|---|
| Cost flow assumption | Newest costs go to COGS first | Oldest costs go to COGS first | Every unit carries the average cost of all units available |
| COGS during inflation | Highest ($1,400) | Lowest ($1,000) | In between ($1,200) |
| Reported profit during inflation | Lowest ($600 gross profit) | Highest ($1,000 gross profit) | In between ($800 gross profit) |
| Taxable income during inflation | Lowest ($600, or $126 of federal tax at 21%) | Highest ($1,000, or $210 of federal tax at 21%) | In between ($800, or $168 of federal tax at 21%) |
| Ending inventory on the balance sheet | Lowest ($1,000), valued at the oldest costs | Highest ($1,400), valued close to replacement cost | In between ($1,200), valued at a blended cost |
| Permitted under US GAAP | Yes | Yes | Yes |
| Permitted under IFRS | No | Yes | Yes |
| Best fit | US companies with rising costs and non-perishable inventory | Perishable goods and companies reporting under IFRS | Interchangeable goods like fuel or grain |
When prices fall, every effect reverses, and LIFO produces the lowest COGS and the highest taxable income. Pick your method based on which way your costs usually move and whether lower taxes or a stronger balance sheet matters more to you.
How the LIFO method works
LIFO accounting groups your costs and pulls them out in reverse order of purchase. Three mechanics shape how that plays out in your books:
- Inventory layers: Each purchase at a new unit cost creates a layer. Sales draw from the newest layer first, so older layers can stay on your books for years.
- Periodic vs. perpetual LIFO: Periodic LIFO assigns costs once at period-end, while perpetual LIFO assigns them at each sale. The two can produce different COGS when purchases and sales overlap.
- Dollar-value LIFO: Many LIFO users group items into pools and measure inflation with price indexes instead of tracking units. Treasury Regulation §1.472-8 lets you elect the Inventory Price Index Computation (IPIC) method, which uses Bureau of Labor Statistics price indexes.
If you carry thousands of stock-keeping units (SKUs), dollar-value pools save you from costing each item separately. Settle these choices before your first LIFO year, because they change the COGS you report.
How to calculate last in, first out (LIFO)
You calculate LIFO by expensing the newest layers first and leaving the oldest layers in ending inventory. Two formulas do the work:
LIFO COGS = Sum of (Units sold from each layer * That layer's unit cost), starting with the newest layer
Ending inventory = Cost of goods available for sale − LIFO COGS
Say you distribute floor tile and sell 1,800 cases this year at $25 each. You made three purchases at rising costs and use periodic LIFO, so you assign costs once at year-end.
1. List your inventory layers from oldest to newest
Record the date and unit cost of each purchase. Then multiply units by unit cost to get each layer's total.
| Purchase date | Units | Unit cost | Layer total |
|---|---|---|---|
| January 10 | 1,000 | $10 | $10,000 |
| April 15 | 1,000 | $12 | $12,000 |
| August 20 | 1,000 | $14 | $14,000 |
| Total available for sale | 3,000 | $36,000 |
Your cost of goods available for sale is $36,000 across 3,000 cases. Both formulas start from that figure.
2. Assign units sold to the newest layers first
Start with the August 20 layer and work backward until you've covered all 1,800 cases sold. The August layer covers 1,000 cases, and the April 15 layer covers the remaining 800.
3. Calculate COGS
Multiply units by unit cost for each layer you used, then add the results. Only the August and April layers come into play.
LIFO COGS = (1,000 * $14) + (800 * $12) = $14,000 + $9,600 = $23,600
Your LIFO COGS for the year is $23,600. That works out to about $13.11 per case, close to your latest $14 cost.
4. Calculate ending inventory
Subtract cost of goods sold from your cost of goods available for sale. Whatever remains sits on your balance sheet.
Ending inventory = $36,000 − $23,600 = $12,400
That $12,400 is the 1,000 January cases at $10 plus 200 April cases at $12. Your balance sheet carries your oldest costs, even though replacing those 1,200 cases today would cost $16,800 at $14 each.
5. Compare the result with FIFO
Under FIFO, the January and April layers go to COGS first:
(1,000 * $10) + (800 * $12) = $19,600
That leaves $16,400 in ending inventory, and the tax line assumes gross profit equals taxable income at the 21% federal corporate rate.
| Metric | LIFO | FIFO | Difference |
|---|---|---|---|
| Revenue (1,800 × $25) | $45,000 | $45,000 | $0 |
| COGS | $23,600 | $19,600 | $4,000 |
| Gross profit | $21,400 | $25,400 | ($4,000) |
| Estimated federal tax at 21% | $4,494 | $5,334 | ($840) |
| Ending inventory | $12,400 | $16,400 | ($4,000) |
The $4,000 gap in ending inventory is your LIFO reserve. You'll owe the $840 if those old layers ever flow into COGS, so track the reserve every year.
LIFO reserve and LIFO liquidation
The LIFO reserve and LIFO liquidation both come from the old, low-cost layers sitting in your inventory. One tells outsiders what those layers are worth today, and the other is what happens when you sell through them.
What the LIFO reserve tells lenders and analysts
The LIFO reserve is the cumulative difference between your inventory valued at FIFO and at LIFO. LIFO companies disclose it in their financial statement notes so analysts and lenders can compare them with FIFO reporters.
Adding the reserve to LIFO inventory gives FIFO inventory, and the year's change in the reserve converts LIFO COGS to a FIFO basis. Treasury Regulation §1.472-2(e) permits supplemental non-LIFO disclosures, so reporting the reserve doesn't violate the conformity rule.
How a LIFO liquidation can raise your tax bill
When your year-end inventory drops below the prior year's level, LIFO starts expensing old layers. Suppose the floor tile business sells through its 1,000-case January layer next year while current costs sit at $16. COGS picks up $10,000 instead of $16,000, adding $6,000 to profit and about $1,260 to federal tax at 21%.
If you're an SEC registrant, Staff Accounting Bulletin Topic 11.F from the SEC says you must disclose material income from LIFO liquidations. Seasonal businesses face the most risk because inventory often bottoms out near year-end. Time your purchases so year-end quantities stay at or above last year's level.
LIFO rules: GAAP, IFRS, and IRS requirements
US GAAP permits LIFO, but IFRS doesn't. The IFRS Foundation's IAS 2 basis for conclusions says the International Accounting Standards Board (IASB) eliminated LIFO in its 2003 revision because it didn't faithfully represent inventory flows. That matters if you have foreign subsidiaries or plan to report under IFRS someday.
For US tax purposes, the IRS adds its own requirements:
- Election (Form 970): IRS Form 970 instructions tell you to file Form 970 or a similar statement with your return for the first tax year you use LIFO.
- Consistency: Once you adopt LIFO, you keep using it for the same goods each year. Those same instructions say the election stays in place unless the IRS allows a change.
- Conformity: Section 472 of the Internal Revenue Code requires LIFO for income you report to shareholders, partners, other owners, or for credit purposes. Your tax method and your reported income have to match.
- Detailed records: Keep each layer's quantity and unit cost by year, or your pool and index calculations under dollar-value LIFO. You'll need them to support every year's COGS in an audit.
- Changing methods (Form 3115): IRS's Form 3115 instructions cover requests to change an accounting method, including automatic changes from LIFO. Non-automatic changes need IRS consent and a user fee.
The election follows your books for years, so the tax deferral has to justify the recordkeeping. Model LIFO against FIFO on your own purchase history before you file your first-year return.
Advantages and disadvantages of LIFO
LIFO's advantages show up in your tax bill and cash position during inflation:
- Lower taxable income: Higher COGS cuts taxable income when costs rise. Every $4,000 of extra COGS defers $840 of federal tax at 21%.
- Better cash flow: Tax you defer stays in the business to fund inventory or pay down debt.
- Current-cost matching: COGS reflects your recent purchase costs, so gross margin tracks what it costs to replace what you sold.
The disadvantages land on your balance sheet and your team's workload:
- Understated inventory: Your balance sheet can carry costs that are years or decades old.
- Weaker ratios for lenders: Lower inventory values reduce working capital and the current ratio, which can pressure loan covenants.
- No IFRS option: You'll need FIFO or weighted average cost for any IFRS reporting.
- Heavier recordkeeping: You have to maintain layers or pools and index computations every year.
- Liquidation risk: Selling into old layers can create taxable profit in a year you didn't plan for it.
LIFO suits you best when your costs keep rising and you hold large, non-perishable inventory. It also fits companies that report only under US GAAP and value tax deferral over balance sheet optics. If your costs are flat or you report under IFRS, stick with FIFO or weighted average cost.
Track inventory costs accurately with Ramp's automated coding and real-time reporting
Choosing between LIFO and FIFO isn't just an accounting decision; it's a strategic choice that affects your tax liability, financial reporting, and inventory valuation. You need accurate, real-time data to evaluate which method works best for your business, but manual tracking makes it nearly impossible to model different scenarios or maintain consistency across periods.
Ramp's accounting automation software gives you the visibility and control you need to manage inventory costs under either method. Here's how Ramp supports accurate inventory accounting:
- AI-powered transaction coding: Ramp automatically codes inventory purchases to the correct GL accounts and cost centers as transactions post, so you maintain accurate records without manual data entry.
- Real-time expense tracking: Monitor inventory costs as they happen with live dashboards that show spending patterns, vendor trends, and cost fluctuations across all locations.
- Custom reporting and analytics: Build reports that track inventory purchases by period, vendor, or category so you can model LIFO vs. FIFO scenarios and understand the tax implications of each method.
- Automated receipt matching: Ramp captures and matches receipts to every inventory purchase automatically, creating an audit trail that supports your cost flow assumptions and simplifies year-end reporting.
- ERP integration: Sync inventory transactions directly to your accounting system so cost data flows seamlessly between platforms and your books stay current.
Whether you're using LIFO to reduce taxable income during inflation or FIFO for cleaner financial statements, Ramp ensures your inventory data is accurate, accessible, and audit-ready.
Try an interactive demo to see how Ramp streamlines inventory tracking and financial reporting.

FAQs
Multiply units sold by the unit cost of your newest layers first, working backward until you've covered every unit sold. Then subtract that COGS from your cost of goods available for sale to get ending inventory.
LIFO expenses your newest costs first, while FIFO expenses your oldest costs first. When prices rise, LIFO produces higher COGS and lower taxable income, and FIFO shows higher inventory on your balance sheet.
No. IFRS prohibits LIFO, so IFRS reporters use FIFO or weighted average cost. US companies reporting under GAAP can still use it.
Yes. LIFO is available to businesses of any size. Whether it's worth the recordkeeping depends on how much inventory you hold and how fast your costs rise.
“I assumed I would have to choose between speed and control. What I found is that you can have both. A well-designed system takes friction out, for the finance function and for everyone else.”
Justin Webster
CFO, Denver Broncos

“A well-run district should not have to choose between getting work done at the school site and keeping control of the dollars behind it. We're not hiring more people to do more jobs, so we have to be smarter about the process. With Ramp, the purchase, the receipt, and the record stay together from the start. ”
Nick Brizeno
Director of Purchasing, San Marcos Unified School District

“In senior living, scale only works if the communities still feel personal. We needed the back office to carry more of the complexity, not the people serving residents. Ramp helped us build that infrastructure, so the experience in the community could stay human.”
Ryan Cole
CFO, Agemark Senior Living

“AI is moving faster than the finance context around it. Prices change, models change, and the value is not always obvious from an invoice. We needed enough detail to know which bets deserved more investment — and which ones did not.”
Greg Cooley
Controller, AngelList

“Invoices, cards, tokens. The categories change but the principle doesn't: know where the money is going, remove the work around it, and make sure the spend is worth it.”
Maciej Mylik. Finance
ElevenLabs

“We weren’t trying to retrofit an old finance system. We had a blank canvas, and Ramp gave us the foundation to build a global finance function of the future.”
Justin Dourado
Director of Finance, Othership

“There's just no surprises anymore. No more waiting two months to find out how a job did. We know how it's doing as it's happening.”
Erich Kuss
Financial Systems Manager, Infinity Home Services

“More token spend isn’t proof that AI is working. Less isn’t proof that it isn’t. What matters is whether we’re buying the right level of intelligence for the work. Ramp lets us make that judgment in the same place we manage every other type of spend.”
Cody Nutt
Senior Director of Business Systems, Daxko



