FIFO inventory calculator: cost of goods by batch.
Enter up to three purchase batches, oldest first, say where each one sits, and enter the units you sold. The calculator draws each sale from the oldest batch that could have shipped it and shows the cost of goods sold, the stock left and its value, and what weighted average would have said instead. The starting figures are an example: replace them with yours.
Oldest batch first, one batch at a time
First in, first out: the units you sold are taken from your oldest batch until it runs out, then from the next. With all the stock in one place, the example's 420 units sold would use up all 200 units of batch 1 at $4.10 and 220 of the 300 in batch 2 at $4.85, which is $1,887.00.
Where a batch sits changes that. In the example, batches 1 and 3 are in TikTok's warehouse and batch 2 is at a 3PL. The 300 units TikTok shipped use up batch 1, skip batch 2, which TikTok does not hold, and take 100 from batch 3 at $5.30. The 120 units the 3PL shipped come from batch 2 at $4.85. Cost of goods is $1,350.00 for the FBT orders plus $582.00 for the 3PL orders: $1,932.00, which is $45.00 more than one pool would say.
What is left is the ending inventory, still at the cost of the batches it belongs to: 180 units of batch 2 and 150 of batch 3, worth $1,668.00. Add the two together and you get back to the $3,600.00 you paid for all three batches. If that check does not balance, a figure is wrong somewhere.
FIFO is a costing rule, not a record of which box left the shelf. TikTok does not tell you which batch an order shipped from, so the cost is assigned from your purchase-order batches, oldest first, the way most accountants expect.
Why the two give different profit
Weighted average blends every batch into one cost: $3,600.00 for 750 units is $4.80 a unit, so 420 units sold cost $2,016.00. FIFO says $1,932.00, because most of what sold came from the earlier, lower-cost batches.
- When costs are rising, FIFO shows lower cost of goods and higher profit now, and keeps the dearer stock on the shelf for later. Weighted average spreads the rise across every sale.
- When a sale straddles two batches, FIFO costs it as a blend of the two, weighted by how many units came from each.
- When a supplier price jumps, FIFO shows the jump the day the new batch starts selling, which is when you need to know whether the price still works.
What CogsIQ does with the same rule
CogsIQ keeps every received purchase-order line as its own batch at its own landed cost, and draws every TikTok Shop sale from the oldest batch first, SKU by SKU.
- Each batch's cost includes its share of freight, duty and prep. Landed cost calculator
- Each batch is marked FBT or 3PL when it is received, and stock moved from one to the other takes its cost with it.
- A late invoice or a backdated purchase order costs the affected sales again, so the figures never go stale.
- Each batch shows the units sold and left, its cost of goods, revenue and profit. FIFO batch costing
- Weighted average stays alongside as the inventory value, so you can see both.
Keep reading
Questions
How do you calculate cost of goods sold with FIFO?
Take the units sold from the oldest batch first, then the next batch, and so on. Multiply the units taken from each batch by that batch's cost per unit and add them up. That total is the cost of goods sold.
Does FIFO mean the oldest units physically shipped first?
No. FIFO is a costing rule, not a record of which box left the shelf. TikTok does not say which batch an order shipped from, so the cost is assigned from your purchase-order batches, oldest first.
Why does it matter where a batch sits?
Stock in TikTok's warehouse cannot ship an order your 3PL packs, and the other way round. So an FBT order is costed from FBT batches and a 3PL order from 3PL batches, each oldest first. Ignore the split and a sale can be costed from stock that never shipped it.
Is FIFO or weighted average better?
FIFO keeps each batch at its own cost, so a price rise shows up when the new stock starts selling. Weighted average blends every batch into one cost, which is simpler but smooths the change away. Use the one your accountant files with, and use it consistently.
What happens if I sell more than I bought?
Those units have no batch to come from. The calculator, like CogsIQ, costs them at the newest batch that could have shipped them and says how many there are, which usually means a purchase order has not been recorded yet.
Every batch, every sale, costed oldest first.
Free for 30 days with one shop and 5 purchase orders, no card needed. Record your purchase orders and import your orders, and every sale is costed from the right batch.