FIFO Calculator for Inventory
Results are estimates based on the values you enter. Recheck your inputs and assumptions before using the output for decisions.
Calculate FIFO cost of goods sold and ending inventory from beginning inventory and purchase layers.
FIFO Calculator for Inventory
Free online FIFO calculator for inventory to estimate cost of goods sold and ending inventory value using the first-in, first-out inventory method. This calculator is useful for accountants, store owners, ecommerce businesses, wholesalers, students, finance teams, and operations managers who want a practical way to see how FIFO assigns older inventory costs to sold units before newer inventory costs. FIFO is one of the most widely used inventory costing methods because it often matches the natural physical flow of goods and is common in accounting and financial reporting.
The calculator works with three inventory layers and one sales input. Beginning inventory units and cost per unit represent the oldest inventory on hand. Purchase layer 1 and purchase layer 2 represent later inventory purchases at their own unit costs. Units sold represent the quantity removed from inventory during the period. Under FIFO, the earliest available units are treated as sold first. That means cost of goods sold is built from the oldest inventory layers, while ending inventory is left in the newest remaining layers. From these values, the calculator shows FIFO cost of goods sold, ending inventory units, ending inventory value, and average FIFO cost per unit sold.
The formula of FIFO inventory costing
FIFO cost of goods sold = Cost of the oldest available units sold first
Ending inventory units = Total available units – Units sold
Ending inventory value = Value of the remaining newest inventory layers
Average FIFO cost per unit sold = FIFO cost of goods sold / Units actually sold
Here beginning inventory means the oldest stock carried into the period, purchase layers mean newer stock bought later, and units sold means the quantity issued or sold during the period. FIFO always removes units from the oldest layer first, then moves to the next oldest layer only after the earlier layer is fully used.
Solved Example
Example 1: Find the FIFO result if beginning inventory is 100 units at $10, purchase layer 1 is 80 units at $12, purchase layer 2 is 120 units at $14, and units sold are 210.
Solve: First 100 units sold from beginning inventory = 100 x 10 = $1,000
Next 80 units sold from purchase layer 1 = 80 x 12 = $960
Remaining 30 units sold from purchase layer 2 = 30 x 14 = $420
FIFO cost of goods sold = 1000 + 960 + 420 = $2,380
Ending inventory units = 300 – 210 = 90 units
Ending inventory value = 90 x 14 = $1,260
Average FIFO cost per unit sold = 2380 / 210 = $11.33
Example 2: Find the result if beginning inventory is 50 units at $8, purchase layer 1 is 70 units at $9, purchase layer 2 is 90 units at $11, and units sold are 100.
Solve: First 50 units = 50 x 8 = $400
Next 50 units = 50 x 9 = $450
FIFO cost of goods sold = $850
Ending inventory units = 210 – 100 = 110 units
Ending inventory value = (20 x 9) + (90 x 11) = 180 + 990 = $1,170
Example 3: Find the result if beginning inventory is 120 units at $6, purchase layer 1 is 100 units at $7, purchase layer 2 is 150 units at $8, and units sold are 250.
Solve: First 120 units = 120 x 6 = $720
Next 100 units = 100 x 7 = $700
Next 30 units = 30 x 8 = $240
FIFO cost of goods sold = 720 + 700 + 240 = $1,660
Ending inventory units = 370 – 250 = 120 units
Ending inventory value = 120 x 8 = $960
Table of FIFO calculator for inventory
| Beginning Layer | Purchase Layer 1 | Purchase Layer 2 | Units Sold | FIFO COGS | Ending Inventory Value |
|---|---|---|---|---|---|
| 50 @ $8 | 70 @ $9 | 90 @ $11 | 100 | $850 | $1,170 |
| 100 @ $10 | 80 @ $12 | 120 @ $14 | 210 | $2,380 | $1,260 |
| 120 @ $6 | 100 @ $7 | 150 @ $8 | 250 | $1,660 | $960 |
| 200 @ $5 | 150 @ $6 | 100 @ $7 | 300 | $1,600 | $1,000 |
How to use this FIFO calculator for inventory
Enter the units and cost per unit for beginning inventory in the proper input fields. After that, enter the units and unit cost for purchase layer 1 and purchase layer 2. Then enter the number of units sold during the same period and click the calculate button. The calculator will show FIFO cost of goods sold, ending inventory units, ending inventory value, and average FIFO cost per unit sold in the result box. Make sure all units refer to the same product and all costs use the same currency so the output stays meaningful.
This calculator is useful when reviewing inventory flow, preparing accounting workpapers, checking gross margin, and comparing the effect of different inventory costing assumptions. Under FIFO, older cheaper inventory is often recognized in cost of goods sold first when prices are rising, which can leave newer higher-cost inventory in ending stock. That can affect reported profit, taxes, and balance sheet values. Looking at both FIFO cost of goods sold and ending inventory value helps show how the method affects both the income statement and the inventory asset at the same time.
When using the result, remember that this page uses three layers for practical quick analysis. Real inventory systems may contain many more purchase layers, returns, adjustments, and product variations. Even so, the FIFO method shown here captures the core logic clearly: oldest units are treated as sold first, and newest units remain in inventory. This calculator gives a fast numerical view that supports inventory analysis, accounting review, cost planning, and decision-making for product businesses.