FIFO Inventory Calculator
Enter your opening stock and each purchase and sale in date order. The calculator takes every sale from the oldest units still on hand, shows which purchase each sale came from, and compares the result with weighted average and LIFO.
Units on hand at the start. Leave empty for 0.
What each opening unit cost you.
Enter at least one purchase or sale to see the result.
How first-in, first-out costs your sales
FIFO treats stock like a queue at a ticket counter: whoever arrived first leaves first. Each time you sell, the cost comes from the oldest purchase still sitting in the store, and only when that batch runs out does the next one start to be used. Whatever remains at the end of the period therefore carries your most recent purchase prices.
Using the calculator
Start with opening stock, if you had any, and its cost per unit. Then list purchases and sales line by line in the order they happened. A purchase needs a quantity and a cost per unit; a sale needs only a quantity, though adding the selling price lets the tool show gross profit too. Lines you leave blank are ignored.
The stock ledger then shows, for every sale, which batches it was taken from, for example “100 @ 10.00 + 50 @ 11.00”. It also tracks units and value left after each line, so you can tie the closing figure back to your own records.
A small example
You open with 100 units bought at 10. You buy 200 more at 11, sell 150, buy another 100 at 13 and sell 120. The first sale uses all 100 old units plus 50 from the second batch, costing 1,550. The second sale takes 120 units at 11, costing 1,320. Cost of goods sold is 2,870, and the 130 units left are 30 at 11 plus 100 at 13, worth 1,630.
Things worth knowing
When prices rise, FIFO reports a lower cost of sales and a higher closing stock than the other methods. The comparison table under the result shows the same data under weighted average and LIFO so you can see the gap.
Selling more than you hold at a given point raises an error in perpetual mode. That usually means a purchase was entered after the sale it supplied, so check the order of your lines.
IAS 2 and Ind AS 2 both list FIFO as an acceptable cost formula, alongside weighted average.
How to use FIFO Inventory Calculator
- Enter the opening stock quantity and its cost per unit (leave empty if none).
- Add each purchase with its cost per unit and each sale with its quantity, oldest first.
- Read cost of goods sold and closing stock, check the ledger and download it as CSV.
Privacy: how it works
Calculations run in your browser. The amounts you enter are not sent anywhere.
Frequently asked questions
How does FIFO work?
First-in, first-out assumes the units you bought first are sold first. With 100 units at 10 and 100 at 12, selling 150 costs 100 × 10 + 50 × 12 = 1,600, and the 50 left are valued at 12.
Is FIFO allowed under IFRS and Ind AS?
Yes. IAS 2 and Ind AS 2 allow FIFO or weighted average cost for interchangeable items. Use the same formula for all inventories of a similar nature and use.
Does perpetual or periodic change the FIFO answer?
No. FIFO always takes the oldest units, so costing sales as they happen or once at period end gives the same cost of goods sold.