FIFO vs Weighted Average Cost for Ecommerce Inventory

FIFO assumes you sold your oldest units first and leaves your most recent, usually most expensive, purchase costs sitting in ending inventory. Weighted average cost blends every purchase into one number and applies it to everything. In a period of rising supplier prices FIFO reports lower cost of goods sold and higher profit, while weighted average smooths the swings and reports something in between. For most ecommerce sellers the practical difference is one to two points of gross margin, which sounds small until you are pricing against it.

The choice is also not purely a preference. It is a method of accounting, and switching is a formal process rather than a setting you toggle.

What the IRS actually permits

A lot of published advice goes wrong here, so read the next two paragraphs closely.

IRS Publication 538 lists three methods of identifying inventory cost: specific identification, FIFO, and LIFO. Weighted average cost does not appear there as a standalone identification method. Anyone who tells you the IRS lists FIFO, LIFO, and weighted average in Publication 538 is misreading it.

The authority for average costing is separate. Revenue Procedure 2008-43 established that the IRS will generally treat a rolling average method used for financial accounting as clearly reflecting income for federal tax purposes, subject to safe harbors. One of those safe harbors requires that the average be recomputed at each acquisition or at least monthly, and that the entire inventory turn at least four times per year. Most ecommerce sellers clear that turn requirement comfortably, which is why rolling average is common in this category and generally accepted.

Publication 538 also requires that the method you use conform to generally accepted accounting principles for similar businesses, clearly reflect income, and stay consistent from year to year.

A worked example

One SKU. Three purchase batches during the year, with supplier prices rising.

Batch Units Unit cost Total
January 500 $11.00 $5,500.00
April 800 $12.50 $10,000.00
July 700 $14.25 $9,975.00
Total 2,000   $25,475.00

You sell 1,500 units at $34.99, for revenue of $52,485.

Under FIFO, the 1,500 units sold come from the oldest layers first: all 500 January units at $11.00, all 800 April units at $12.50, and 200 July units at $14.25. Cost of goods sold is $18,350. Ending inventory is the remaining 500 July units at $14.25, or $7,125.

Under weighted average, total cost of $25,475 divided by 2,000 units gives $12.7375 per unit. Cost of goods sold is 1,500 times $12.7375, or $19,106.25. Ending inventory is 500 times $12.7375, or $6,368.75.

  FIFO Weighted average
Revenue $52,485.00 $52,485.00
Cost of goods sold $18,350.00 $19,106.25
Gross profit $34,135.00 $33,378.75
Gross margin 65.0% 63.6%
Ending inventory $7,125.00 $6,368.75

FIFO reports $756.25 more gross profit and carries $756.25 more inventory on the balance sheet. Same units, same cash, different reported profit and different taxable income.

Reverse the price direction and the result reverses with it. In a year when your supplier costs fall, FIFO produces the higher cost of goods sold and the lower profit. Publication 538 says exactly this about the FIFO and LIFO relationship, and the logic is the same here.

Which to choose

Choose FIFO when

You sell perishable, dated, or fashion sensitive goods and physically rotate oldest stock first, so the assumption matches reality. You want ending inventory on the balance sheet to approximate current replacement cost, which matters for lenders and buyers. Or you are dealing with anyone reporting under international standards, since IAS 2 permits only FIFO and weighted average cost.

FIFO also produces cleaner recall and warranty tracking, because cost layers line up with identifiable batches.

Choose weighted average when

You buy a commodity item in frequent, similar sized lots where batch identity is meaningless. You hold identical units from multiple suppliers in the same bin. Or you want month to month margin reporting that is not whipsawed by which container happened to clear customs first.

Weighted average is also easier to maintain, and a method applied with discipline beats a better method applied without it.

A note on LIFO

LIFO is permitted for US tax purposes under Internal Revenue Code section 472, with adoption requiring Form 970, and it is permitted under US GAAP. It is prohibited under IFRS. It also carries a conformity requirement in section 472(c): use LIFO on the tax return and you cannot hand shareholders or creditors financial statements for that year built on a different method. For a seller who may want to raise money or borrow, that is a real constraint.

Switching methods is a filing, not a setting

Publication 538 is direct about this. If you want to change your method of accounting for inventory, you must file Form 3115, Application for Change in Accounting Method. A change in the method or basis used to value inventory is explicitly listed as a change requiring IRS approval, and it triggers a section 481(a) adjustment for the cumulative catch up difference.

The practical warning: a software migration can silently change your costing basis. If your old system ran weighted average and the new one defaults to FIFO, you have made a method change without filing for one. Ask the vendor which method it applies before you turn it on, and tell your accountant.

The exemption a lot of sellers qualify for

Smaller sellers get relief. Under section 471(c), a taxpayer meeting the gross receipts test of section 448(c) may treat inventory as non incidental materials and supplies, or conform to the treatment in its own books and records. Revenue Procedure 2025-32 sets that gross receipts threshold at $32,000,000 for tax years beginning in 2026. IRS Publication 334 gives $31 million for tax year 2025.

The same threshold also exempts a seller from the uniform capitalization rules of section 263A, which otherwise require capitalizing direct and part of indirect costs for property acquired for resale. One test, several exemptions.

What the exemption does not do is abolish inventory tracking. Publication 538 still requires a method that clearly reflects income. And it does nothing for your management reporting, because a business that does not know its unit cost cannot price.

Where this touches operations

Costing method and replenishment decisions are connected in a way that gets missed. The unit cost you carry is the number that converts a reorder quantity into a cash commitment, so a seller running weighted average and a seller running FIFO will value the same proposed purchase order differently. If you are setting stock thresholds, it is worth reading ConnectBooks on how safety stock and reorder points are calculated, because those formulas assume a cost basis you have already decided on.

Software handles this unevenly. Entriwise pulls actual FIFO cost layers directly out of the accounting system rather than computing its own basis, which is a more defensible approach than a cost file upload. A2X splits a cost of goods sold entry that straddles a month boundary so each period closes correctly. Neither of those is a small detail, and both are worth asking any vendor about directly.

This article describes how the methods work in general terms. Which one is appropriate for your business, and whether you qualify for any exemption, is a question for a CPA or enrolled agent working from your actual figures.

Leave a Reply