If you run an operating store — say 340 orders a month at a $31 average order value — you already know COGS is the number that decides whether a sale actually made money. FIFO (first-in, first-out) is one of the ways to decide which cost gets attached to each unit you sold. Get it wrong and your gross margin is fiction.
Most of the ranking guides on this keyword stop at a textbook retailer example and never touch what FIFO does to your per-order profit or your tax bill. This one walks the real calculation for a store that buys blanks in batches, then shows where the money moves.
The FIFO COGS formula
There are two formulas working together, and conflating them is the mistake most sellers make.
The period-level formula is the same regardless of method: Beginning Inventory + Purchases − Ending Inventory = COGS. FIFO does not change this equation — it changes how you value the "Ending Inventory" term.
Under FIFO, the first units you bought are assumed to be the first units sold. That means COGS is built from your oldest costs, and whatever is left in ending inventory is valued at your newest purchase prices. FIFO is accepted under both US GAAP and IFRS, according to Sage's FIFO guide, so it is a safe default for a US store that may later raise outside money.
How to find COGS using FIFO, step by step
Step 1: List every inventory layer in purchase order
A "layer" is one batch you bought at one price. Write them oldest to newest with quantity and unit cost. This is the backbone of the whole calculation.
Step 2: Count the units you actually sold
Pull the unit count sold for the period from your store data, not your gut. For an operating store this comes straight off your order records.
Step 3: Drain the oldest layers first
Starting from the oldest layer, assign its unit cost to the units sold until that layer is exhausted, then move to the next layer. Keep going until you have accounted for every unit sold.
Step 4: Sum the assigned costs — that is your FIFO COGS
Add up what you assigned. Whatever units remain unsold, valued at the newest prices, are your ending inventory.
Worked example: a POD store buying blanks in bulk
Pure dropship POD sellers often skip this because the supplier charges per order (more on that below). But plenty of operators hold stock — they buy blank tees in batches and decorate in-house or pre-order inventory for a drop. That is exactly where FIFO earns its keep.
Say you bought blank shirts in three batches as supplier prices crept up:
| Layer | Units | Unit cost | Layer cost |
|---|---|---|---|
| Batch 1 (oldest) | 300 | $4.10 | $1,230 |
| Batch 2 | 300 | $4.75 | $1,425 |
| Batch 3 (newest) | 300 | $5.30 | $1,590 |
You started the period with zero stock and sold 700 units. Draining oldest-first: all 300 from Batch 1, all 300 from Batch 2, then 100 from Batch 3.
FIFO COGS of blanks = (300 × $4.10) + (300 × $4.75) + (100 × $5.30) = $1,230 + $1,425 + $530 = $3,185.
Ending inventory = the 200 unsold units left in Batch 3 = 200 × $5.30 = $1,060.
Sanity-check against the period formula: Beginning Inventory ($0) + Purchases ($4,245) − Ending Inventory ($1,060) = $3,185. The two methods agree, which is how you know the layer math is right.
Now layer in decoration. If each shirt costs you $2.90 in ink, labor, and transfer to finish, your full FIFO COGS per sold unit averages about $4.55 (blank) + $2.90 = $7.45. On a $31 selling price that is a $23.55 gross margin per unit before fees and ad spend — and the blank cost alone swung $1.20 a unit between your oldest and newest batch.
For a fuller treatment of how COGS feeds the rest of your P&L, see our finance and operations guide for ecommerce, and if you are closing the books, how to record cost of goods sold picks up where this leaves off.
FIFO and the "there is no inventory" trap for pure POD
Here is the nuance the generic guides miss. If you dropship every order through Printify, Printful, or Gelato and hold nothing, you have no inventory layers to drain — the supplier bills you a known cost the moment the order is placed, so COGS equals that per-order supplier charge plus shipping. FIFO is irrelevant for those units because nothing sits on a shelf.
FIFO re-enters the moment you do hold stock: pre-bought blanks, a batch of pre-printed bestsellers, packaging and inserts, or merchandise you stocked for a pop-up. Most operators run a hybrid, so your books end up part per-order COGS and part FIFO-valued inventory.
Keep the two buckets separate. Mixing a flat per-order supplier cost into a FIFO layer schedule is how your ending inventory number drifts from reality and your margin reporting quietly breaks.
Why FIFO moves your per-order profit and your tax bill
FIFO is not a neutral bookkeeping choice when supplier prices are rising. Because the cheapest, oldest costs flow into COGS first, FIFO reports a lower COGS and a higher gross profit than LIFO or weighted-average in an inflationary period, as Sage and DCL Logistics both note.
Read the upside and the downside together. Higher reported profit looks great on a pitch deck and a loan application — and it is also higher taxable income, so FIFO can mean a bigger tax bill in a year when your blank and supplier costs climbed.
The per-order effect is just as real. In the example above, a unit costed at the $4.10 old layer books $1.20 more profit than the same unit costed at $5.30 — on 700 units that is $840 of gross profit that exists only because of which layer you drained. Your true per-order margin depends on getting that attribution right, which is the whole point of inventory turnover being cost of goods sold divided by average inventory rather than a guess.
Where Victor fits
PodVector AI is built for exactly this kind of operator — the one who already runs the numbers and just wants them to be right every day. Victor is an AI employee that connects to your Shopify store, Meta Ads, Google Ads, Printify, Printful, Gelato, and Klaviyo, computes true per-order profit from your live data, and delivers reports straight to your Google Drive.
Victor is not a dashboard you have to log into and interpret. Every write action is approval-gated, so you stay in control while the costing and profit math runs in the background.
If reconciling COGS against ad spend and fees every month is eating your time, see what Victor can do with your live store data.
For the bigger picture on how these numbers connect, start with our ecommerce ops economics hub.
FAQs
Does FIFO give a higher or lower COGS than LIFO?
When your supplier costs are rising, FIFO produces a lower COGS and higher gross profit than LIFO, because FIFO pushes your oldest, cheaper costs into COGS first. Sage notes this is the defining effect of FIFO in an inflationary period. When costs are falling the relationship flips.
Do I need FIFO if I dropship every order through a POD supplier?
No. If you hold no inventory and the supplier bills you per order, your COGS is simply that per-order supplier charge plus shipping — there are no layers to drain. FIFO only matters for stock you actually hold, like pre-bought blanks or pre-printed inventory.
What is a FIFO "layer"?
A layer is a single batch of inventory bought at one unit cost. You track each layer with its quantity and price, then drain the oldest layer first when assigning costs to units sold. Ending inventory is whatever remains in the newest layers.
Can I switch between FIFO and another method whenever I want?
Not casually. Your cost-flow method should stay consistent period to period so your financials compare cleanly, and in the US a formal change in inventory accounting method has tax-filing implications. Pick one, document it, and talk to an accountant before switching.
How does FIFO affect the profit on a single order?
The unit cost FIFO assigns comes from a specific layer, so the same product can carry a different COGS depending on which batch it drew from. In the worked example above, the same shirt books more gross profit when it draws from the older, cheaper layer than from the newest one — a per-order gap that adds up across hundreds of orders.
Is FIFO allowed under GAAP?
Yes. FIFO is accepted under both US GAAP and IFRS, according to Sage's FIFO guide, which makes it a common default for stores that may later raise outside capital or take on a lender who expects standard reporting.