FIFO vs LIFO vs Weighted Average: Which Cost Method Fits Your Shopify Store?

FIFO, LIFO and weighted average cost the same stock three ways. See one worked example, where each method is allowed and what Shopify and Channel Bay record.

An example card comparing three ways to cost 200 mugs sold: FIFO $738.00, LIFO $765.00 and weighted average $756.00
On this page
  1. What are FIFO, LIFO and weighted average cost?
  2. How do the three methods cost the same sales?
  3. Where can you use each method?
  4. Which method should you choose?
  5. What does Shopify do about the method?
  6. Setting FIFO, LIFO or weighted average in Channel Bay
  7. Where to start

Key Takeaways

  • When you buy the same item at different prices, the costing method decides which cost leaves your books when you sell one. FIFO uses the oldest cost, LIFO the newest and weighted average a blend of everything in stock.
  • In our invented example, 200 mugs sold from two deliveries cost $738.00 under FIFO, $765.00 under LIFO and $756.00 under weighted average. The same $2,268.00 of stock is split differently between cost of goods sold and what is left.
  • Where you file limits the choice. IRS Publication 538 lists FIFO and LIFO for US tax, IAS 2 eliminated LIFO under IFRS, and HMRC says LIFO is not allowable for UK tax. Ask your accountant, and keep the method consistent.
  • Shopify holds one cost per item for each variant that you type in, and its help names no costing method. You apply FIFO, LIFO or an average yourself, or use an app.
  • Channel Bay has two separate settings: Cost Tracking for FIFO or LIFO layers by location, and Rolling Average cost for one weighted average cost per variant. Both use the unit cost entered at receiving for new receipts.

When you buy the same item at different prices, a costing method decides which cost leaves your books when you sell one. FIFO takes the oldest cost first, LIFO the newest and weighted average a blend of everything in stock. The three give different costs for the same sales, and in the example below the gap is $27.00 on 200 mugs. Which one you can use depends on where you file: IRS Publication 538 lists LIFO, but IFRS and UK tax don't allow it.

This guide runs the same stock through all three methods, shows where each is allowed, helps you choose and says what Shopify and Channel Bay do about it. It is one part of our inventory valuation guide. We read the IRS, IFRS and HMRC pages on 13 November 2026, and none of this is tax advice.

What Are FIFO, LIFO and Weighted Average Cost?

All three answer one question: when you sell a unit that came from a delivery at a different price from the others, which cost do you record?

  • FIFO (first in, first out) assumes the items you bought first are the first you sold. The stock left at the end is costed at your most recent purchases (IRS Publication 538, FIFO method).
  • LIFO (last in, first out) assumes the items you bought last are the first you sold, so the stock left is costed from your oldest purchases (same publication, LIFO method).
  • Weighted average cost divides the total cost of the stock you have by the number of units, and every unit carries that blended cost. IAS 2, the international inventory standard, allows it alongside FIFO for items that are ordinarily interchangeable (IFRS Foundation, IAS 2 Inventories).

A fourth method, specific identification, matches the actual cost to the actual unit. IRS Publication 538 says to use it when you can match costs to items, and to use FIFO or LIFO when you can't, for example when identical goods are mixed together.

These are assumptions about cost, not instructions for your warehouse. FIFO doesn't make anyone pick the oldest box, and LIFO doesn't change the quantity in your store.

How Do the Three Methods Cost the Same Sales?

Here is one set of purchases and one set of sales, run through all three methods. Example, invented figures.

A store held 120 mugs from an earlier delivery at $3.60 each. A second delivery then brought 480 more at $3.825 each, so the store has 600 mugs that cost $2,268.00 in all. It then sells 200 mugs at $16.00 each, so $3,200.00 of sales. These are plain costs per mug. Our Shopify cost per item and landed cost guide covers adding freight and duty to them.

Method Cost of goods sold, 200 mugs Stock left, 400 mugs Gross profit Margin
FIFO $738.00 (120 x $3.60 + 80 x $3.825) $1,530.00 (400 x $3.825) $2,462.00 76.9%
LIFO $765.00 (200 x $3.825) $1,503.00 (120 x $3.60 + 280 x $3.825) $2,435.00 76.1%
Weighted average, $3.78 $756.00 (200 x $3.78) $1,512.00 (400 x $3.78) $2,444.00 76.4%

Check the arithmetic any way you like: cost of goods sold plus stock left is $2,268.00 in every row, because each method splits the same purchases. The weighted average is ($432.00 + $1,836.00) / 600 = $3.78.

The costs rose from $3.60 to $3.825, so FIFO shows the lowest cost of goods sold and the highest profit, and LIFO the reverse. IRS Publication 538 describes the same pattern: when prices rise, LIFO produces a larger cost of goods sold and a lower closing inventory, and when prices fall, the opposite holds. The FIFO to LIFO gap here is $27.00, which is 120 mugs times the $0.225 difference between the two deliveries. If the new delivery had been cheaper, the order would flip, and other quantities would give a different gap.

Over the life of the stock, every method expenses the same total cost. They differ in when the cost reaches your profit figures.

Where Can You Use Each Method?

The rules depend on where you file, and they are not the same everywhere. This is what the primary sources say, read on 13 November 2026.

Where What the source says Source
US tax Publication 538 lists specific identification, FIFO and LIFO as ways to identify the cost of inventory. It calls the LIFO rules "very complex". LIFO needs Form 970, or an equivalent statement, filed with the return for the first year you use it. Changing your method of accounting for inventory means filing Form 3115 IRS Publication 538 (01/2022)
IFRS IAS 2 allows FIFO or weighted average cost for interchangeable items. In its Basis for Conclusions, the Board decided to eliminate the LIFO method that earlier versions allowed IAS 2 Basis for Conclusions (BC9, BC21) as published by the AASB, January 2022 text
UK tax HMRC's manual says LIFO is not an allowable method for valuing stock for tax purposes HMRC Business Income Manual, BIM33100
Elsewhere Rules in Australia, Canada, New Zealand and other countries differ. Ask your accountant, or read your tax authority's guidance on trading stock Not covered here

Publication 538's list of ways to identify cost names specific identification, FIFO and LIFO, and the sections we read don't name an average cost method. If you use weighted average for US tax, ask your accountant how it is treated. The same publication says the method you use must conform to generally accepted accounting principles for similar businesses and must clearly reflect income.

Which Method Should You Choose?

Start from where you file, then from how your costs behave. The table shows how the choice usually falls.

Your situation What tends to fit Why
Costs barely change between deliveries Whichever your accountant files and your tools support The three methods give nearly the same figures, so the simplest wins
Costs keep rising or falling Whichever your accountant files FIFO and LIFO move your margin in opposite directions as costs change, and an average carries one blended cost on every sale. LIFO is the one that isn't available everywhere
Dated or perishable stock FIFO It matches the way you rotate stock, though it is still only an assumption about cost
Unique or serialized items Specific identification You can match each unit to its own invoice, which Publication 538 says to do when you can
You file under IFRS or in the UK FIFO or weighted average LIFO isn't available in either
A US business weighing LIFO Ask your accountant first Form 970, the "very complex" rules and the effect on your profit figures need professional advice

Whatever you pick, stay with it. Publication 538 says your inventory practices must be consistent from year to year, and changing the method means filing Form 3115. A method you switch back and forth makes last year's margin impossible to compare with this year's. Our stocktake guide covers valuing the closing stock once you have counted it, and the inventory write-off guide covers stock worth less than it cost.

What Does Shopify Do About the Method?

Shopify's help page on cost per item names no costing method. It says to add a cost per item to each variant, and that the cost is recorded on an order when the order is created. Profit reports for past orders still use the earlier cost if you change it later (Shopify Help Center, adding cost per item to products, read 13 November 2026).

So the cost on each order is whatever the field held when the order was created, not the cost of the delivery the unit came from. Our Shopify cost of goods sold guide shows what that does to the figure Shopify reports. You apply the method yourself:

  • Typing the cost of your latest delivery is a latest-cost approach. It isn't FIFO or LIFO.
  • Typing a blended figure by hand is a weighted average. In our mug example it is $3.78.

Our Shopify cost per item and landed cost guide walks through both options and what each does to your margin, and our guide to Shopify purchase orders and Stocky covers why receiving stock doesn't update the field. If you want a view of what the stock is worth, see the Shopify inventory value report guide.

Setting FIFO, LIFO or Weighted Average in Channel Bay

Channel Bay is our app, so we're not neutral here. What follows is how it works as of November 2026. It has two separate settings, and it helps to keep them apart.

The Sync settings panel for a Shopify store in Channel Bay, with Cost price sync switched on and its Last received cost and Rolling Average cost options, and the Cost Tracking switch below, described as tracking FIFO or LIFO cost layers by location

Both live in the store's Sync settings: (1) Cost price sync, which Cost Tracking needs, (2) the choice between Last received cost and Rolling Average cost, and (3) the Cost Tracking switch.

Cost Tracking: FIFO or LIFO by Location

Cost Tracking keeps cost layers for each location and uses FIFO or LIFO to decide which layer a sale uses.

  1. Open Integrations, then View Linked Stores, and click your Shopify store.
  2. Under Sync settings, check that Cost price sync is on. Cost Tracking needs it, and it needs a plan with cost and retail price sync.
  3. In the Cost Tracking card, turn on Toggle Cost Tracking.
  4. Choose FIFO, oldest received cost first or LIFO, newest received cost first, and click Save.

Only the account owner can change it, it works on Shopify stores only and the choice applies to all your stores. Here is what it does:

  • It opens with a balance for each variant at the cost price you hold today.
  • Each purchase order receipt adds a layer at the unit cost entered when you receive the stock.
  • Shipped orders, stock sent back to a supplier and transfers out use up layers in the order you chose.
  • Customer returns and transfer arrivals come back at their original cost.
  • Manual adjustments are held for your review, so you confirm the cost.
  • Changing the method applies from then on. Existing layers stay as they are.
  • It doesn't change the cost price in Shopify.

Open a variant's Cost Tracking tab to see the layers, which one is next to be used and what recent sales consumed.

Rolling Average Cost: One Weighted Average per Variant

Weighted average is not part of Cost Tracking. It is a choice under Cost price sync, where you select which cost to hold: Last received cost or Rolling Average cost. With the second, each purchase order receipt updates the cost like this:

New average cost = ((current average cost x current stock) + (unit cost x received quantity)) / (current stock + received quantity)

In the mug example, receiving the 480 mugs at $3.825 with 120 mugs in stock gives ($432.00 + $1,836.00) / 600 = $3.78. Four details matter:

  • The current stock in the formula is the available stock across all locations before the receipt, so it is one cost per variant, not one per location.
  • The result is rounded to the cent, so figures can differ by a few cents from a spreadsheet that keeps more decimals.
  • It updates at each receipt, so it matches the single average in the table above only when sales follow the last receipt, as in the example. Our weighted average cost formula guide shows the two versions side by side.
  • With cost sync on, the averaged cost is what Shopify shows. Switching asks you to type enable. Only receipts from then on are averaged, and switching back leaves the averaged costs already written.

How the Two Settings Work Together

You can use both. The layers tell you which cost each sale used and what each location's stock is worth. The rolling average gives the single cost per variant that Channel Bay holds and, with cost sync on, shows in Shopify. When Cost Tracking opens, it starts each variant at its current cost price, which is the average if you already use Rolling Average cost.

Both use the unit cost entered on the receiving screen for each new receipt, so receiving the 480 mugs at $3.825 gives a $3.825 layer. Landed cost is worked out separately on the purchase order and isn't what these methods use.

Cost Tracking and Rolling Average cost don't post journal entries or export to accounting software, and neither makes a method acceptable to a tax authority. Use the method your accountant files. The Inventory on Hand report's cost value columns need Cost Tracking, which the inventory value guide above covers.

Where to Start

Ask your accountant which method you file under, and write it down. Then check that your cost per item is right for each delivery, because every method is only as good as the cost behind it. If you want FIFO or LIFO layers, turn on Cost Tracking once your product costs and locations are correct. If you want one blended cost per variant, choose Rolling Average cost instead.

For what to enter as a cost in the first place, see our Shopify cost per item and landed cost guide and the general landed cost guide.

Frequently Asked Questions

Which is better, FIFO or LIFO?
Neither is better in general, and the answer depends on where you file and what your accountant files. When costs rise, FIFO shows a lower cost of goods sold and a higher closing inventory, and LIFO the reverse, which IRS Publication 538 describes. When costs fall, the order flips. Under IFRS and for UK tax, LIFO isn't an option, so stores filing under those rules choose between FIFO and weighted average.
Is LIFO allowed outside the US?
Not under IFRS or for UK tax. IAS 2, the IFRS inventory standard, eliminated LIFO, and HMRC's Business Income Manual says LIFO is not an allowable method for valuing stock for UK tax purposes. Other countries have their own rules, so check with your accountant or your tax authority.
Does Shopify use FIFO, LIFO or average cost?
Shopify's help page on cost per item names no costing method. It describes one cost per item for each variant that you enter yourself, recorded on an order when the order is created. If you want FIFO, LIFO or a weighted average, you work it out yourself or use an app.
Can I change my costing method later?
Sometimes, with paperwork. For US tax, IRS Publication 538 says inventory practices must be consistent from year to year and that changing your method of accounting for inventory means filing Form 3115. In Channel Bay, a change of method applies from then on, and existing cost layers stay as they are.
Does the costing method change which unit I pick and ship?
No. FIFO, LIFO and weighted average are assumptions about which cost to record when a unit sells. They don't tell your team which physical unit to pick, and they don't change the quantity in your store.
The Channel Bay teamChannel Bay

Guides from the team that builds and supports Channel Bay, the Shopify inventory app for purchase orders, stocktakes, stock transfers and multichannel stock sync. About Channel Bay

Try Channel Bay for FreeInstall on Shopify

Put These Guides to Work.

Install Channel Bay and run your purchasing, counts and stock across every channel from one place.

Bay

Your Inventory Manager

Hi, I am Bay. Ask me about Channel Bay features, pricing, setup or Shopify inventory. My answers come from our own help content.

500 characters left