Guide

How Do I Track FIFO COGS for Shopify?

L

Landara Team

FIFO Cost of Goods Sold for Shopify

||9 min read
FIRST IN, FIRST OUTYOUR COST LAYERSOne layer per stock receipt, at the cost you actually paidMAR receipt · oldest120 units left @ $11.40selling nowMAY receipt500 units @ $12.10waitingJUL receipt · newest500 units @ $13.05waitingSame SKU, three different real costsOrder #10423 units shipCOGS, TO THE CENTOrder #1042 · 3 unitsCosted from MAR layer3 × $11.40COGS for this order$34.20Not the July price. The cost of the units that shipped.MONTH-END JOURNALDr Cost of Goods Sold$8,412.60Cr Inventory$8,412.60Ready to post to Xero or QuickBooksShopify keeps the quantity. The ledger keeps the cost.Shopify has one cost field per product. FIFO needs a dated layer per receipt.That is why the cost ledger has to live somewhere else

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:

  1. 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.
  2. 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.
  3. 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:

MethodCOGS for a March-stock saleProblem
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:

OptionReal FIFO?Ongoing effortBest when
SpreadsheetYes, until it driftsHours weekly, foreverUnder ~20 orders/month
Full IMSYesHigh: it becomes your stock systemYou need warehousing/B2B anyway
Accounting-side inventorySometimes (QBO Advanced)High: per-order sync + SKU matchingTiny catalogs, low volume
Cost ledger beside ShopifyYes (or moving average)Low: costing is automatic once connectedYou 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):

  1. Connect Shopify once. Landara reads orders, fulfilments and stock movements (never customer data). Shopify keeps owning quantity.
  2. 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.
  3. 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.
  4. 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
L

Written by Landara Team

FIFO Cost of Goods Sold for Shopify

The Landara team is dedicated to helping Shopify merchants and importers get finance-grade cost of goods sold without running an inventory system.

Related Articles

THE FORMULA DOES NOT COMPUTE COGS. IT BACK-SOLVES IT.TWO VERY DIFFERENT QUARTERSQuarter A750 units sold to customersnothing lostQuarter B700 units sold to customers50 units gone, nobody knows howTHE SAME THREE INPUTSBeginning inventory$4,800+ Purchases$9,600- Ending inventory$4,000COUNTED, NOT CALCULATED250 units on the shelf, either waybecause the 50 are not there to countONE ANSWERCost of goods sold$10,400Quarter A revenue $24,000Quarter B revenue $22,400$800 of loss, filed as cost of salesWhatever is missing from the count becomes cost of goods sold, by definition.And every receipt of stock arrives at a different price, so all three inputs are valuations.
Guide

COGS Formula: What It Calculates, and What It Hides

11 min read

THE ENTRY TAKES TEN SECONDS. THE AMOUNT TAKES A LEDGER.RECEIPTS OF STOCK12 March600 units, goods $6,000freight, duty, clearance $1,200$12.0028 April400 units, goods $4,800freight, duty, clearance $1,400$15.50MAY SALES, OLDEST LAYER FIRST450 units shipped150 x $12.00 = $1,800300 x $15.50 = $4,650$6,450the cost of the units that leftTHE JOURNALDr Cost of Goods Sold$6,450Cr Inventory$6,450A COST PER SKU WOULD HAVE SAID450 x $10.00 = $4,500$1,950 of margin you never hadEvery receipt of stock arrives at a different price, and your store keeps one.Cost of sales plus closing stock has to add back to what came in. A report never has to.
Guide

COGS Journal Entry: How to Prepare One You Can Defend

8 min read