Calcipedia

FIFO Calculator for Inventory

Calculate FIFO cost of goods sold from multiple purchase lots, then inspect the exact sold layers, ending inventory layers, and the remaining inventory value after units sold are allocated.

Last updated

Also in Operations

← All Operations calculators

Inventory Costing

FIFO calculator for inventory guide: cost flow, sold layers, ending inventory, and first-in first-out accounting

A FIFO calculator for inventory applies the first-in first-out cost-flow assumption, which means the earliest purchase costs are assigned to the units sold first. The result is not just one total. It also shows which lots were consumed, what remains in ending inventory, and how much value is still sitting in stock after the sale allocation.

What FIFO is measuring

FIFO does not attempt to trace physical stock movement. It is a cost-flow assumption used to assign inventory costs to cost of goods sold and ending inventory. Under FIFO, the oldest recorded lot costs are released first when units are sold.

That means the sold-layer table is often as important as the headline COGS figure. It shows exactly which cost layers were consumed and which purchase lots remain in ending inventory after the period's sales are assigned.

The lot-by-lot logic

The calculator sorts through the purchase lots in the order you enter them, treating the first row as the oldest lot. Units sold are applied to the earliest lot until it is exhausted, then to the next lot, and so on until all units sold have been assigned.

The cost assigned to sold units becomes FIFO cost of goods sold. Any units left in later rows remain in ending inventory at their own lot cost. This is why FIFO can produce very different COGS and ending inventory values from weighted-average or LIFO methods when purchase costs have changed materially over time.

FIFO COGS = Sum of the earliest lot costs assigned to units sold

The cost of goods sold is built by consuming the oldest purchase layers first.

Ending inventory value = Sum of the remaining lot costs after FIFO allocation

Any unconsumed units stay in ending inventory at their recorded purchase-layer cost.

Worked example: early low-cost lots sold first

Suppose the first lot contains 80 units at 16, the second contains 90 units at 18, and the third contains 70 units at 20. If 145 units are sold, FIFO consumes the full first lot and then 65 units from the second lot.

In that example, FIFO COGS comes from the lower-cost early layers first, while the remaining 25 units in the second lot and all 70 units in the third lot stay in ending inventory. When purchase costs are rising, FIFO often leaves newer, higher-cost layers in ending inventory and produces a lower COGS than a later-cost method would.

Why FIFO should be read with accounting policy context

FIFO is only one inventory-costing method. The most informative comparison is often between FIFO and the company's broader accounting policy, margin trends, and inventory age. If purchase costs are volatile, the choice of cost-flow method can materially change reported gross margin and ending inventory values.

Use the calculator as a lot-allocation and planning aid. For reporting and tax decisions, confirm the permitted inventory method and disclosure requirements in your jurisdiction and accounting framework.

Further reading

Frequently asked questions

Does FIFO mean the oldest physical units always leave the warehouse first?

Not necessarily. FIFO is a cost-flow assumption for accounting. Physical stock rotation may or may not match the accounting layer sequence exactly.

Why does FIFO often leave a higher ending inventory value when costs are rising?

Because the earlier, cheaper layers are released to cost of goods sold first, leaving the newer, higher-cost layers in ending inventory.

Can I use this calculator if I have many purchase lots?

Yes. Add each purchase lot in chronological order. The sold-layer and ending-layer tables expand so you can see the exact FIFO allocation across all recorded lots.

Is FIFO always the right method for reporting?

No. The right method depends on the accounting framework, tax rules, and the policy adopted by the business. This calculator shows FIFO mechanics, not reporting advice.

Related

More from nearby categories

These related calculators come from the same leaf category, nearby sibling categories, or the same top-level topic.