Works on this device
Fifo Calculator
FIFO (first in, first out) takes the units sold from the oldest stock first, so the stock left is valued at the latest costs. Enter your opening stock and purchases with the units sold, or a stock card of purchases and sales, and the calculator shows each layer it uses.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose Calculate.
Your result
How it was worked out
How to use this calculator
- Choose FIFO for a period if you know the purchases of the period and the units sold, or the units you counted at the end.
- Add one row for the opening stock and one for each purchase, oldest first: the units and the cost of one unit.
- Choose what you know: the units sold, or the units on hand at the end from a count. Add the sales for the period if you want the gross profit.
- Choose Calculate. The tables show the layers used for the cost of goods sold and the layers left on hand.
- Choose FIFO at each sale to enter purchases and sales by date. You then see the layers on hand after every row, step by step.
How FIFO works
- Each purchase is a layer: a number of units at one unit cost. The opening stock is the first layer.
- Cost of goods available = opening inventory + purchases.
- Cost of goods sold: the units sold are taken from the oldest layer first, then from the next one, until all units sold are costed.
- Ending inventory = cost of goods available − cost of goods sold. It is the cost of the newest units, which are the ones left.
- Periodic FIFO works this out once, at the end of the period. Perpetual FIFO works it out at each sale, from the layers on hand at that moment. FIFO takes the same units both ways, so the result is the same, apart from a cent of rounding at most when unit costs have more than 2 decimal places.
Worked example
Opening stock: 100 units at 10. Purchases: 200 units at 11, then 150 units at 12. The cost of goods available is 1,000 + 2,200 + 1,800 = 5,000 for 450 units.
330 units were sold (or 120 units were counted at the end, which gives the same 330). FIFO takes 100 at 10 (1,000), 200 at 11 (2,200) and 30 at 12 (360), so the cost of goods sold is 3,560. The 120 units left are from the last purchase: 120 at 12 = 1,440. With sales of 5,980, the gross profit is 2,420, a gross margin of 40.47%.
At each sale: a sale of 250 units on 15 January takes 100 at 10 and 150 at 11, a cost of 2,650, and leaves 50 at 11. After the purchase of 150 at 12, a sale of 80 units on 28 January takes 50 at 11 and 30 at 12, a cost of 910. The cost of goods sold is again 3,560, and 120 at 12 are left.
How amounts are rounded
Every amount is worked in whole cents, rounded half away from zero. A purchase costs units × unit cost. Units taken from a layer cost units × the unit cost of that layer, and the last units of a layer take all the cents that are left in it. So the cost of goods sold and the ending inventory always add up to the cost of goods available, to the cent. FIFO here gives the same figures as FIFO in the Inventory Valuation Calculator.
Limits you should know
- To compare FIFO with LIFO and the average cost methods on the same rows, use the Inventory Valuation Calculator. For the weighted average and the moving average step by step, use the Weighted Average Inventory Calculator.
- Purchase returns, sales returns, freight costs, discounts and write-downs to a lower value are not part of the calculation. Adjust the units or the unit cost yourself.
- Units and unit costs may have up to 4 decimal places. Sales for the period may have 2. All amounts are taken as one currency.
- The result is arithmetic on the rows you type. It is not accounting, tax or legal advice.