FIFO Calculator for Inventory
Use our free FIFO Calculator for Inventory to instantly compute your Cost of Goods Sold (COGS) and ending inventory value using the First-In, First-Out method. Simply enter your purchases (inventory layers) and the units sold, and the calculator handles the rest.
FIFO Inventory Calculator
What Is FIFO Inventory Costing?
FIFO stands for First-In, First-Out. It is an inventory valuation method that assumes the oldest units purchased are the first ones sold. This is one of the most widely accepted accounting methods under both GAAP (Generally Accepted Accounting Principles) and IFRS (International Financial Reporting Standards).
Under FIFO, when you sell goods, the cost assigned to those goods comes from the earliest (oldest) inventory purchases first. The remaining unsold inventory is valued at the most recent purchase prices.
How to Calculate FIFO Cost of Goods Sold
Calculating the FIFO Cost of Goods Sold requires you to match units sold against your oldest inventory layers first. Here is the step-by-step process:
- List all inventory purchases in chronological order — oldest batch first, with the number of units and cost per unit for each.
- Determine the total number of units sold during the period.
- Deplete the oldest layer first. If you sell more units than exist in the oldest layer, move to the next oldest layer and continue until all sold units are accounted for.
- Multiply units taken from each layer by that layer’s unit cost.
- Sum the costs from all layers used — this is your FIFO COGS.
FIFO COGS Formula:
COGS = Σ (Units taken from each layer × Cost per unit of that layer)
How to Calculate FIFO Ending Inventory
Once you have calculated COGS, finding the ending inventory value is straightforward. The units not sold retain their original purchase cost from the most recent layers:
- After applying FIFO to sold units, identify which inventory layers (and how many units from each) remain.
- Multiply the remaining units in each layer by that layer’s unit cost.
- Add up the values across all remaining layers.
FIFO Ending Inventory Formula:
Ending Inventory = Σ (Remaining units in each layer × Cost per unit of that layer)
Alternatively: Ending Inventory = Beginning Inventory + Purchases − COGS
FIFO Calculation Example
Let’s walk through a complete FIFO calculation example so you can see exactly how this works.
Inventory Purchases
| Purchase Date | Units Purchased | Unit Cost | Total Cost |
|---|---|---|---|
| January 1 | 100 | $10.00 | $1,000 |
| February 5 | 150 | $12.00 | $1,800 |
| March 20 | 200 | $15.00 | $3,000 |
Units Sold: 220
Using FIFO, we sell from the oldest layer first:
| Layer | Units Used | Unit Cost | COGS Portion |
|---|---|---|---|
| January batch | 100 | $10.00 | $1,000 |
| February batch | 120 | $12.00 | $1,440 |
| Total COGS | $2,440 | ||
Ending Inventory
| Layer | Units Remaining | Unit Cost | Value |
|---|---|---|---|
| February batch (remainder) | 30 | $12.00 | $360 |
| March batch | 200 | $15.00 | $3,000 |
| Ending Inventory | $3,360 | ||
You can verify: Total inventory purchased = $5,800. COGS ($2,440) + Ending Inventory ($3,360) = $5,800. ✓
FIFO vs. LIFO vs. Weighted Average
There are three common inventory costing methods, and each produces different results:
- FIFO (First-In, First-Out): Oldest costs go to COGS; newest costs remain in inventory. Preferred under IFRS; widely used under GAAP.
- LIFO (Last-In, First-Out): Newest costs go to COGS; oldest costs remain in inventory. Allowed under GAAP but prohibited under IFRS.
- Weighted Average Cost: An average cost per unit is calculated and applied to all units sold and remaining. Simple but less reflective of actual cost flow.
When Should You Use the FIFO Method?
FIFO is a natural fit in several situations:
- You sell perishable goods (food, pharmaceuticals, cosmetics) where actual physical flow is also FIFO.
- Your business operates internationally and must comply with IFRS standards, which ban LIFO.
- You want your balance sheet to reflect a more current, accurate inventory value.
- Prices are generally rising and you want to show higher profit (though this increases tax liability).
Frequently Asked Questions
What does FIFO mean in inventory?
FIFO stands for First-In, First-Out. It is an inventory valuation assumption that the first units of inventory purchased are the first units sold. It does not necessarily reflect the physical movement of goods but is used to assign costs for accounting purposes.
Is FIFO better than LIFO?
Neither method is universally “better” — it depends on your business goals and jurisdiction. FIFO is required under IFRS and generally results in a balance sheet that better reflects current inventory values. LIFO can reduce taxable income in inflationary environments but is not permitted under IFRS.
How does FIFO affect taxes?
In a rising-price environment, FIFO produces a lower COGS (because old, cheaper costs are used first) and therefore a higher gross profit — which means a higher tax bill compared to LIFO. In a deflationary environment, the opposite applies.
Can I switch from LIFO to FIFO?
Yes, but switching inventory methods is a significant accounting change that must be disclosed in your financial statements and may require retrospective adjustment of prior periods. Consult a certified accountant or CPA before making the switch.