To track FIFO COGS for Shopify, you need a cost ledger that records each stock receipt as a dated cost layer and depletes the oldest layer as orders ship. Shopify tracks quantity, not cost, so that ledger has to live somewhere else: a spreadsheet, an inventory system, or a dedicated COGS app.
If you have ever asked your accountant why your gross margin looks different every time you check it, or spent a weekend reverse-engineering which purchase order the units in an order came from, this is the guide for that problem.
It explains why Shopify cannot give you FIFO on its own, what FIFO actually looks like in practice for a store, and the four realistic ways to get it, with the honest trade-offs of each.
Why Shopify Can't Do This On Its Own
Shopify has exactly one cost field per variant: Cost per item. It is a single, current number. When your supplier raises prices and you update it, the old cost is gone. Every report built on it, including Shopify's own profit reports, prices every historical sale at whatever the field says today.
That single field cannot answer the questions that matter:
- What did the units I sold in March actually cost, given they were bought in January at the old price?
- What is my stock on hand worth right now, when half of it arrived at $11.40 and half at $13.05?
- What number should the accountant post to Cost of Goods Sold this month?
FIFO needs history: one cost record per receipt, kept even after prices change. Shopify does not store that history, and its built-in options have shrunk rather than grown. Stocky, the inventory app Shopify bundled with POS Pro, has been retired, and took its purchase orders and stocktakes with it.
The One-Field Problem
Shopify's Cost per item is a snapshot. FIFO is a history. You cannot compute a history from a snapshot, which is why every serious answer to Shopify COGS involves a second system holding the cost records.
What FIFO Actually Means for Your Store
FIFO (first-in, first-out) assumes the oldest stock sells first, which for most physical products is also what physically happens. In practice it works like this:
- Every receipt becomes a cost layer. 500 units received in March at $11.40 is one layer. 500 more in May at $12.10 is another.
- Every sale depletes the oldest layer first. An order for 3 units ships from the March layer at $11.40 each, until that layer runs out.
- COGS is the sum of what was depleted. Not an average, not the current price. The actual cost of the actual units that shipped.
Here is what one SKU looks like across a price rise, and why the method matters:
| Method | COGS for a March-stock sale | Problem |
|---|---|---|
| Shopify's cost field | $13.05 (today's price) | Overstates COGS by 14%, rewrites history on every edit |
| Rough average | $12.18 (blend of all buys) | Smooths out real cost changes; margins drift from reality |
| FIFO | $11.40 (the March layer) | None: matches physical flow, accepted under IFRS and US GAAP |
A moving average, done properly with a recalculation on every receipt, is also a legitimate method, and some stores prefer it. What is not legitimate is a single static cost field pretending to be either.
The 4 Ways to Track FIFO COGS
1. The Spreadsheet
Most stores start here: a tab per SKU, a row per purchase, and a formula that walks down the rows as units sell. It works at small scale, and it teaches you the mechanics.
It breaks in predictable ways. Every order has to be entered or imported by hand. Returns, exchanges and partial fulfilments need manual adjustments. A price rise mid-layer means restructuring rows. And the sheet silently drifts from Shopify the moment anyone forgets a week. Merchants describe spending hours every week just keeping the spreadsheet and the store in agreement, before any actual analysis happens.
2. A Full Inventory Management System
Systems like Cin7, Finale or Unleashed do real FIFO costing, and much more: warehousing, B2B, manufacturing, multi-channel sync. If you need all of that, they are the right call.
The trade-off is that they take over inventory. Shopify stops being the source of truth for stock; the IMS is. That means migration projects, retraining, monthly costs that often start around several hundred dollars, and a system your team must keep feeding. Buying one just to get a COGS number is like buying a truck to get cup holders.
3. Inventory in Your Accounting File
Xero's tracked inventory and QuickBooks Online's inventory features can hold quantities and costs (QBO uses FIFO on its Advanced tier, Xero uses average cost). But now every Shopify order has to reach the accounting file as an itemised transaction, every SKU must exist in both systems with matching codes, and your accountant inherits a second full-time reconciliation job. Most bookkeepers actively steer ecommerce clients away from this setup because untangling it at year end costs more than it saves.
4. A Cost Ledger Beside Shopify
The fourth option keeps each system doing what it is good at. Shopify keeps owning quantity: stock counts, availability, fulfilment. A cost ledger connects to the store, watches orders and stock movements, and maintains the FIFO layers against them. At period end it produces the COGS figure and the journal, and your books get one clean entry instead of thousands of synced transactions.
This is the approach Landara takes, and the comparison table is honest about when each option wins:
| Option | Real FIFO? | Ongoing effort | Best when |
|---|---|---|---|
| Spreadsheet | Yes, until it drifts | Hours weekly, forever | Under ~20 orders/month |
| Full IMS | Yes | High: it becomes your stock system | You need warehousing/B2B anyway |
| Accounting-side inventory | Sometimes (QBO Advanced) | High: per-order sync + SKU matching | Tiny catalogs, low volume |
| Cost ledger beside Shopify | Yes (or moving average) | Low: costing is automatic once connected | You want accurate COGS without a new stock system |
If You Import, FIFO Alone Is Not Enough
FIFO answers which units you sold. It says nothing about what those units cost, and for imported stock the supplier invoice is only part of the answer. Freight, duty, brokerage and port charges typically add 20-40% to the invoice price, and they arrive on separate bills from separate companies, weeks apart.
If those costs sit in a Freight expense account instead of in the cost layers, your FIFO ledger is precisely tracking the wrong number. The fix is landed cost: allocate the import costs across the SKUs in the shipment, then build each cost layer from the landed unit cost, not the invoice price. Every margin figure downstream inherits the accuracy.
How Landara Tracks FIFO COGS
The Real Goal: Finance-Grade Inventory Truth
What a growing store actually needs is not more inventory tracking. It is finance-grade inventory truth: landed cost allocated into every unit, FIFO cost layers behind every sale, a ready-to-post COGS journal each month, and books that match the warehouse. That is the standard the rest of this section is built around.
Landara is the cost ledger from option 4, built specifically for this job (FIFO cost of goods sold for Shopify):
- Connect Shopify once. Landara reads orders, fulfilments and stock movements (never customer data). Shopify keeps owning quantity.
- Every receipt becomes a dated cost layer at the cost you actually paid. Importers can fold freight and duty into each layer so it is landed-accurate.
- Every order is costed as it ships, oldest layer first (or by moving average if you prefer), with a full audit trail from each sale back to its source documents.
- Period end produces the journal: one ready-to-post Dr COGS / Cr Inventory entry for Xero or QuickBooks. You review it and post it; Landara never writes to your ledger unasked.
The full FIFO ledger, COGS report and inventory valuation are on the free plan for stores up to 250 orders a month, so you can see your real numbers before paying anything.
The point of FIFO is not accounting elegance. It is that your gross margin becomes a number you can act on, instead of a guess that moves every time a supplier reprices.
See Your Real COGS This Month
Connect your Shopify store and Landara starts building your FIFO cost ledger from the first order. Free up to 250 orders a month.
Try Landara Free