Ecommerce Inventory Costing Methods: FIFO, LIFO and Average Cost

Illustration of warehouse shelves, boxes and a forklift representing inventory flow

Ecommerce inventory costing methods decide which purchase price is matched to each unit you sell. When supplier prices change, FIFO, LIFO, average cost and specific identification produce different cost of goods sold, different profit and a different tax bill from exactly the same purchases. This guide compares the methods with a worked example, explains what the tax rules allow, and helps online sellers choose a method they can live with.

Why the costing method matters

Most online stores buy the same SKU many times at different prices. When a unit sells, your books need a cost for it, but identical units on a shelf or at a 3PL can’t be traced to a specific invoice. A costing method is the rule for assigning that cost.

The choice affects three things:

  • Cost of goods sold and gross margin in each period.
  • Ending inventory on your balance sheet.
  • Taxable income, because cost of goods sold is deducted on the return. When prices are rising, the method that assigns the newest (higher) costs to sales produces lower taxable income now.

Over the life of the business total costs are the same; the method shifts when they’re deducted. For a growing seller with rising costs, that timing can be worth real cash.

The four inventory costing methods

Method How it assigns cost Fits best when
Specific identification Each unit carries its actual cost Unique or high-value items with serial numbers: vintage goods, jewelry, electronics
FIFO (first-in, first-out) Oldest costs go to sales first; ending inventory carries the newest costs Most ecommerce brands, especially perishable or dated products
LIFO (last-in, first-out) Newest costs go to sales first; ending inventory carries the oldest costs Sellers with steadily rising costs who accept the extra rules
Weighted average cost Each sale takes the average cost of units on hand High-volume commodity SKUs; common in inventory software

IRS Publication 538 describes specific identification, FIFO and LIFO as the methods for identifying the cost of items in inventory, and says FIFO or LIFO is used when items are intermingled and can’t be matched to specific invoices. It also notes that in times of inflation LIFO produces a larger cost of goods sold and a lower closing inventory than FIFO, and that the opposite holds when prices are falling.

A worked example: FIFO vs LIFO vs average cost

Illustrative numbers. A store sells a phone case. During the year it buys:

  • January: 1,000 units at $4.00 = $4,000
  • May: 1,000 units at $5.00 = $5,000
  • September: 1,000 units at $6.00 = $6,000

It sells 2,000 units at $15.00 each ($30,000 revenue), leaving 1,000 units at year-end. Total cost of goods available is $15,000.

Method Cost of goods sold Gross profit
FIFO $9,000 $21,000
LIFO $11,000 $19,000
Average ($5 a unit) $10,000 $20,000

FIFO expenses the January and May units and leaves $6,000 of ending inventory; LIFO expenses the September and May units and leaves $4,000; average cost leaves $5,000. With rising costs, LIFO reports $2,000 less profit than FIFO this year. At a combined 30% tax rate (an assumption for the illustration), that’s $600 of tax deferred, not eliminated: the lower-cost January units are still sitting in LIFO inventory and will be expensed when inventory is eventually drawn down. If prices fall, the effect reverses.

What the tax rules require

FIFO

FIFO is the default most sellers use. It needs no special election and its inventory values stay close to current replacement cost. You can value FIFO inventory at cost or, as Publication 538 describes, at the lower of cost or market.

LIFO

LIFO has more conditions:

  • You must elect it. File Form 970 (or a statement with the same information) with a timely filed return for the first year you use LIFO.
  • Inventory at cost. Under 26 U.S.C. § 472, LIFO inventory is valued at cost, so you can’t also write it down to market.
  • Conformity. Section 472(c) bars using a different method to report income for the first LIFO year to owners, partners or for credit purposes. If your lender wants FIFO statements, LIFO for tax creates a problem.
  • Simplified option. An eligible small business with average annual gross receipts of $5 million or less for the three preceding tax years can elect the simplified dollar-value LIFO method, which uses government price indexes (Publication 538).

Publication 538 itself calls the LIFO rules “very complex”. For most small online sellers the deferral is modest and the record-keeping is not.

Average cost

Many inventory platforms and marketplace integrations calculate a moving average cost automatically, and it is a common method for management reporting. Whether a given average method is acceptable on your tax return depends on how it is applied, so confirm with your tax advisor before relying on it for the return.

Valuing inventory: cost or lower of cost or market

Separate from the costing method is how you value what’s left at year-end. Publication 538 describes three generally available approaches: cost, lower of cost or market, and the retail method. Under lower of cost or market you compare each item’s market value on the inventory date with its cost and use the lower figure, which lets you recognize price drops before the goods sell. It isn’t available for LIFO inventory, which must be carried at cost.

Whatever method you use, goods that can’t be sold at normal prices because of damage, imperfections, style changes or odd lots are valued at their bona fide selling price minus the direct cost of disposing of them, but not below scrap value. For ecommerce brands with seasonal or trend-driven products, that rule is often worth more than the choice between FIFO and LIFO.

Changing methods

Once you’ve adopted a method, switching is a change in accounting method that generally requires IRS consent on Form 3115. Pick deliberately the first time.

How to choose a costing method for your online store

  1. Look at your products. Unique items point to specific identification. Interchangeable SKUs point to FIFO or average cost.
  2. Check your systems. Find out which method your inventory tool, 3PL integration or accounting connector actually uses. Your books and your inventory app should agree.
  3. Consider who reads your financials. Lenders, investors and buyers generally expect FIFO-based statements; LIFO’s conformity rule limits that.
  4. Estimate the tax effect. Model one year of purchases under FIFO and LIFO. If the difference is small, FIFO’s simplicity usually wins.
  5. Document and stay consistent. Publication 538 requires inventory practices to be consistent from year to year.

Common mistakes

  • Using one method in the inventory app and another in the books.
  • Ignoring freight-in and duties, so every method understates unit cost; see our guide to the ecommerce cost of goods sold deduction.
  • Switching methods year to year to manage profit, without filing for a method change.
  • Forgetting stock held at Amazon or a 3PL when counting ending inventory.
  • Reading margin trends without knowing how the method affects them; ecommerce gross margin explains what to track.

Costing only works if quantities are right; our ecommerce inventory management tips cover counts and reconciliations.

For help choosing and setting up a method, see our ecommerce accounting services.

Frequently asked questions

What are the main ecommerce inventory costing methods?

Specific identification, FIFO (first-in, first-out), LIFO (last-in, first-out) and weighted average cost. They differ in which purchase prices are assigned to units sold, so they produce different cost of goods sold, ending inventory and profit when supplier prices change.

Is FIFO or LIFO better for an online store?

With rising costs, LIFO puts the newest, higher costs into cost of goods sold, which lowers taxable income now. FIFO is simpler, needs no election and keeps inventory near current cost. For most small sellers FIFO’s simplicity outweighs LIFO’s tax deferral.

How do I elect LIFO for my ecommerce business?

File Form 970, or a statement with the same information, with your timely filed return for the first year you use LIFO. LIFO inventory must be valued at cost, and the conformity rule limits using another method in reports to owners or lenders for that year.

Can I switch inventory costing methods?

Yes, but a switch is a change in accounting method that generally requires IRS consent on Form 3115. Publication 538 also requires inventory practices to be consistent from year to year, so choose a method deliberately and document it.

Can I use weighted average cost on my tax return?

Many inventory tools calculate a moving average cost, and it is common for management reporting. Whether a particular average method is acceptable for the tax return depends on how it is applied, so confirm with a tax advisor before using it on the return.