To calculate FIFO and LIFO, organize your purchases in date order, add beginning inventory, and assign costs to the units you sold by working through those layers in one of two directions. FIFO (First-In, First-Out) pulls the oldest costs into cost of goods sold first; LIFO (Last-In, First-Out) pulls the newest costs first. Whatever costs are left over sit in ending inventory. The arithmetic is the same either way. What changes is the direction you move through your cost layers, and the tax and reporting rules that follow from the choice.
Data You Need Before You Start
Both calculations draw from the same records, so gather everything once. You need four things:
- Beginning inventory: units on hand at the start of the period and their cost per unit from the prior period.
- A chronological record of every purchase during the period, showing date, quantity, and unit cost for each batch.
- Total units sold during the period.
- Total units still on hand at the end of the period.
Purchase orders, supplier invoices, and receiving reports are the primary documents. Inventory management software usually timestamps each receipt with quantity and price already. What matters is date order, because both methods depend on knowing which costs came in first and which came in last. Out-of-order records will throw off your cost layers and your return.
The IRS generally requires you to keep records supporting any item on your tax return until the statute of limitations expires, which is at least three years from the filing date.1Internal Revenue Service. How Long Should I Keep Records For inventory purchase documentation, keep it until that period runs out for the year you sold or disposed of the goods.
Running the FIFO Calculation
FIFO assumes the earliest units you bought are the first ones sold. Work forward through your cost layers, starting with beginning inventory, until you have accounted for every unit sold. Whatever is left sits in ending inventory at the most recent costs.
A worked example. Suppose your records for the year show:
- Beginning inventory: 200 units at $10 each ($2,000)
- February purchase: 300 units at $12 each ($3,600)
- June purchase: 250 units at $14 each ($3,500)
- October purchase: 150 units at $15 each ($2,250)
Total goods available for sale: 900 units costing $11,350. You sold 600 units during the year.
Under FIFO, pull costs from the oldest layers first:
- First 200 units from beginning inventory at $10 = $2,000
- Next 300 units from the February purchase at $12 = $3,600
- Remaining 100 units from the June purchase at $14 = $1,400
Cost of goods sold is $7,000. The 300 units left in ending inventory are valued at the most recent prices: 150 units at $14 ($2,100) plus 150 units at $15 ($2,250), totaling $4,350. Double-check by confirming COGS plus ending inventory equals total goods available: $7,000 + $4,350 = $11,350.
Because FIFO leaves the newest, most expensive costs in ending inventory, it tends to produce a higher inventory value on the balance sheet and a lower cost of goods sold when prices are rising.
Running the LIFO Calculation
LIFO flips the direction. Start with the most recent purchase and work backward through your cost layers until every sold unit has an assigned cost. The oldest costs stay in ending inventory.
Using the same 900 units available and 600 sold:
- First 150 units from the October purchase at $15 = $2,250
- Next 250 units from the June purchase at $14 = $3,500
- Remaining 200 units from the February purchase at $12 = $2,400
Cost of goods sold is $8,150. Ending inventory holds the oldest layers: 200 units at $10 ($2,000) plus 100 units at $12 ($1,200), totaling $3,200. The check holds: $8,150 + $3,200 = $11,350.
The $1,150 gap in COGS between the two methods comes from identical sales and purchase data. LIFO pushed the more expensive recent costs into COGS and left the cheaper older costs on the balance sheet.
Watch for LIFO Liquidation
A LIFO liquidation happens when you sell more units than you purchased during the period, forcing you to dip into old, low-cost layers. Because those layers carry prices from years ago, COGS drops and taxable income spikes, sometimes dramatically. The IRS provides limited relief under Section 473 if the liquidation was caused by events like a foreign trade disruption or energy supply interruption, but that relief is narrow and requires an irrevocable election.2Office of the Law Revision Counsel. 26 USC 473 – Qualified Liquidations of LIFO Inventories For ordinary business fluctuations, you absorb the full tax hit.
What the Two Results Mean for Your Taxes
The choice controls how much taxable income you report. During periods of rising prices, LIFO produces a higher cost of goods sold and lower pretax income. FIFO does the opposite: older, cheaper costs flow to the income statement, inflating reported profit and the tax bill.
In the example, the $1,150 COGS gap is $1,150 of taxable income a LIFO user avoids recognizing in the current year. At a 21 percent corporate tax rate, that saves roughly $242 on just 600 units. Scale that to thousands or millions of units, and the annual tax deferral becomes substantial. Many U.S. manufacturers, auto dealers, and petroleum companies use LIFO for that reason.
When prices are flat or falling, the advantage reverses. LIFO would assign lower recent costs to COGS, producing higher taxable income than FIFO. In deflationary environments, FIFO often gives the better tax result.
Electing LIFO With Form 970
FIFO is the default. You don’t need IRS permission to use it, and most businesses adopt it simply by applying it consistently.
LIFO is different. To start using it, file IRS Form 970 (Application to Use LIFO Inventory Method) with your federal income tax return for the first year you want the method to apply.3Internal Revenue Service. About Form 970, Application to Use LIFO Inventory Method If you filed your return for that year without making the election, you can still elect by filing an amended return within 12 months of the original filing date and attaching Form 970 with a notation referencing Section 301.9100-2 at the top.4Internal Revenue Service. Form 970 Application to Use LIFO Inventory Method
The LIFO Conformity Rule
Section 472 requires that if you use LIFO on your tax return, you must also use it as your primary inventory method in financial reports to shareholders, partners, creditors, and other outside parties.5Office of the Law Revision Counsel. 26 USC 472 – Last-In, First-Out Inventories You cannot report LIFO to the IRS while showing FIFO-based earnings to your bank or investors.
Treasury regulations do carve out flexibility. You may disclose supplemental information using another method, such as showing what earnings would have been under FIFO, as long as the primary presentation uses LIFO.6eCFR. 26 CFR 1.472-2 – Requirements Incident to Adoption and Use of LIFO Inventory Method You may also use the lower of LIFO cost or market for financial reports. But using a completely different inventory method as your main reporting basis violates the conformity rule and can cause the IRS to revoke your LIFO election.
No Lower of Cost or Market Under LIFO
FIFO users may write inventory down to market value if it drops below cost. LIFO users cannot. Section 472(b)(2) prohibits the lower-of-cost-or-market method for LIFO inventories on the tax return.5Office of the Law Revision Counsel. 26 USC 472 – Last-In, First-Out Inventories If you previously used lower of cost or market and then switch to LIFO, you must restore any prior write-downs into taxable income. Auditors catch this frequently.
Changing Methods Later
Once you have established an inventory method on your tax return, Section 446(e) requires you to get IRS consent before switching to a different one.7Office of the Law Revision Counsel. 26 USC 446 – General Rule for Methods of Accounting The vehicle is Form 3115 (Application for Change in Accounting Method).
Many inventory method changes qualify for the automatic change procedures. File Form 3115 in duplicate: attach the original to your timely filed tax return for the year of the change, and send a signed copy to the IRS National Office no later than the date you file the return. No user fee is required for automatic changes.8Internal Revenue Service. Instructions for Form 3115 Changes that don’t appear on the IRS list of automatic changes require the non-automatic procedures, which involve a user fee and an advance filing during the tax year you want the change to take effect.
Either way, a method change triggers a Section 481(a) adjustment. This captures the cumulative difference between income as reported under the old method and income as it would have been reported under the new method for all prior years. If the adjustment increases your income, you generally spread it over four tax years. If it decreases income, you take it all in the year of change.9Internal Revenue Service. IRM 4.11.6 Changes in Accounting Methods Switching without consent can lead the IRS to impose a less favorable adjustment during an audit, including taking the entire positive adjustment into income in a single year.
Small Business Exemption
Not every business has to run formal cost layers at all. Under Section 448(c), a business whose average annual gross receipts over the prior three tax years do not exceed $32 million (the inflation-adjusted threshold for 2026) may qualify for simplified inventory accounting. Eligible businesses can treat inventory as non-incidental materials and supplies, deducting costs when items are sold or used rather than maintaining formal cost layers.10eCFR. 26 CFR 1.471-1 – Need for Inventories Businesses using this simplified approach can choose FIFO, specific identification, or average cost, but not LIFO. Tax shelters are excluded from the exemption regardless of gross receipts.