FIFO Ending Inventory & COGS Calculator
Our FIFO (First-In, First-Out) calculator helps you determine the value of your ending inventory and the cost of goods sold (COGS) based on the principle that the oldest inventory items are sold first. Input your beginning inventory, purchases, and sales to get accurate results.
FIFO Calculator
Number of units at the start.
Cost per unit for beginning inventory.
Total number of units sold during the period.
Results
| Layer | Units | Cost/Unit | Total Cost | Units Sold | Units Remaining | Value Remaining |
|---|---|---|---|---|---|---|
| Enter data and click Calculate. | ||||||
Table showing inventory layers and FIFO flow.
Purchases
COGS
End Inv
Chart comparing inventory values.
What is FIFO for Ending Inventory and COGS?
FIFO, which stands for First-In, First-Out, is an inventory valuation method used by businesses to determine the cost of goods sold (COGS) and the value of ending inventory. The core principle of FIFO is that the first units of inventory purchased or produced are the first ones assumed to be sold, used, or disposed of. This means the costs of the oldest inventory items are charged to COGS, while the costs of the most recently acquired items remain in ending inventory.
To calculate ending inventory and cost of goods sold using FIFO, you track inventory in layers based on purchase date and cost. When items are sold, the cost is matched against the oldest inventory layer until those units are depleted, then moving to the next oldest layer, and so on. The remaining unsold units are valued at the cost of the most recent purchases.
Who Should Use FIFO?
FIFO is particularly suitable for businesses dealing with perishable goods (like food or pharmaceuticals) where selling older stock first is a physical necessity to avoid spoilage. It’s also widely used by many other types of businesses because it’s logical and relatively easy to apply, especially with inventory management systems. During periods of rising costs (inflation), FIFO generally results in a higher net income (because older, lower costs are matched with revenues) and a higher ending inventory value on the balance sheet, which can be seen favorably by investors.
Common Misconceptions
One common misconception is that FIFO requires the physical flow of goods to match the cost flow assumption. While it’s ideal for perishables, businesses can use the FIFO cost flow assumption for accounting purposes even if their physical inventory management doesn’t strictly follow first-in, first-out. Another point is that FIFO might lead to higher income taxes during inflation compared to LIFO (Last-In, First-Out) because it reports higher taxable income.
FIFO Formula and Mathematical Explanation
The process to calculate ending inventory and cost of goods sold using FIFO involves tracking inventory layers:
- Start with Beginning Inventory: Note the number of units and the cost per unit of your starting inventory.
- Record Purchases: For each purchase made during the period, record the number of units and their cost per unit as separate layers.
- Calculate Goods Available for Sale: Sum the units and total cost from beginning inventory and all purchases.
- Calculate COGS: When sales occur, allocate the cost of goods sold by first using up the units from the beginning inventory at their cost, then moving to the first purchase layer at its cost, and so on, until the total number of units sold is accounted for. The sum of these costs is the COGS.
- Calculate Ending Inventory: The units remaining after sales are your ending inventory. These will be the units from the most recent purchases. The value of ending inventory is the sum of these remaining units multiplied by their respective costs per unit.
Ending Inventory Value (FIFO) = (Remaining Units from latest purchase * Cost per unit) + (Remaining Units from second latest purchase * Cost per unit) + …
Cost of Goods Sold (FIFO) = (Units sold from oldest layer * Cost per unit) + (Units sold from next oldest layer * Cost per unit) + …
Variables Table
| Variable | Meaning | Unit | Typical Range |
|---|---|---|---|
| Beginning Inventory Units | Number of units at the start of the period | Units | 0 or more |
| Beginning Inventory Cost/Unit | Cost of each unit in beginning inventory | Currency ($) | 0 or more |
| Purchase Units | Number of units bought in each purchase | Units | 0 or more |
| Purchase Cost/Unit | Cost per unit for each purchase | Currency ($) | 0 or more |
| Units Sold | Total number of units sold during the period | Units | 0 to Total Available Units |
| Ending Inventory Value | Total value of inventory remaining at period end | Currency ($) | Calculated |
| Cost of Goods Sold (COGS) | Total cost assigned to units sold | Currency ($) | Calculated |
Practical Examples (Real-World Use Cases)
Example 1: Rising Costs
A bookstore has the following inventory and sales for a particular novel during January:
- Jan 1: Beginning Inventory: 50 books @ $10 each
- Jan 10: Purchase: 100 books @ $12 each
- Jan 20: Purchase: 70 books @ $13 each
- Jan 1-31: Sales: 160 books sold
To calculate ending inventory and cost of goods sold using FIFO:
- Goods Available: 50 + 100 + 70 = 220 books
- COGS for 160 units sold:
- 50 units from Beg Inv @ $10 = $500
- 100 units from Jan 10 purchase @ $12 = $1200
- 10 units from Jan 20 purchase @ $13 = $130 (160 – 50 – 100 = 10)
- Total COGS = $500 + $1200 + $130 = $1830
- Ending Inventory:
- Remaining from Jan 20 purchase: 70 – 10 = 60 units @ $13 = $780
- Total Ending Inventory Value = $780
- Ending Inventory Units = 60
Example 2: Stable Costs
A hardware store sells widgets:
- Feb 1: Beginning Inventory: 200 widgets @ $5 each
- Feb 15: Purchase: 150 widgets @ $5 each
- Feb 25: Purchase: 100 widgets @ $5.10 each
- Feb 1-28: Sales: 300 widgets sold
Using FIFO:
- Goods Available: 200 + 150 + 100 = 450 widgets
- COGS for 300 units sold:
- 200 units from Beg Inv @ $5 = $1000
- 100 units from Feb 15 purchase @ $5 = $500 (300 – 200 = 100)
- Total COGS = $1000 + $500 = $1500
- Ending Inventory:
- Remaining from Feb 15 purchase: 150 – 100 = 50 units @ $5 = $250
- From Feb 25 purchase: 100 units @ $5.10 = $510
- Total Ending Inventory Value = $250 + $510 = $760
- Ending Inventory Units = 50 + 100 = 150
Our FIFO Calculator can easily perform these calculations for you.
How to Use This FIFO Ending Inventory and COGS Calculator
- Enter Beginning Inventory: Input the number of units and the cost per unit you had at the start of the period.
- Add Purchases: For each purchase made, click “Add Purchase” and enter the units and cost per unit for that batch. Add as many purchase rows as needed.
- Enter Units Sold: Input the total number of units sold during the period.
- Calculate: Click the “Calculate” button.
- View Results: The calculator will display:
- Ending Inventory Value (primary result)
- Cost of Goods Sold
- Ending Inventory Units
- Average Cost of Ending Inventory
- A detailed table showing the FIFO flow across inventory layers.
- A chart visualizing the values.
- Reset or Copy: Use the “Reset” button to clear inputs or “Copy Results” to copy the main outputs.
When you calculate ending inventory and cost of goods sold using FIFO with this tool, it provides a clear breakdown, helping you understand how costs flow through your inventory.
Key Factors That Affect FIFO Results
- Inflation/Deflation: During inflation (rising costs), FIFO results in a lower COGS and higher net income because older, cheaper costs are matched with sales. The opposite occurs during deflation.
- Purchase Timing and Costs: The timing and cost of inventory purchases directly impact which cost layers are used for COGS and which remain in ending inventory. Fluctuating purchase costs will lead to different FIFO results compared to stable costs.
- Inventory Turnover Rate: A high turnover rate means inventory moves quickly, and the cost layers used for COGS will be closer to current costs, even with FIFO. A slow turnover means older costs might be matched with sales for longer.
- Product Mix: If you sell multiple products with different cost structures and turnover rates, the overall FIFO results for the company will be a blend influenced by the mix of products sold.
- Spoilage or Obsolescence: If old inventory becomes unsellable, it might need to be written off, which is a separate expense and doesn’t directly alter the FIFO COGS calculation for sold goods, but reduces the value of goods available.
- Accounting Period Length: The period over which you calculate ending inventory and cost of goods sold using FIFO (e.g., monthly, quarterly, annually) can affect the specific cost layers matched with sales within that period.
Understanding these factors helps in interpreting the financial statements when FIFO is used, especially when comparing with LIFO or Weighted-Average methods.
Frequently Asked Questions (FAQ)
- What does FIFO stand for?
- FIFO stands for First-In, First-Out. It’s an inventory valuation method assuming the oldest inventory items are sold first.
- Is FIFO better than LIFO?
- Neither is universally “better”; it depends on the business and its goals. FIFO often reflects the actual physical flow of goods better, especially for perishables, and tends to show higher profits during inflation. LIFO (Last-In, First-Out) is not permitted under IFRS but is allowed under US GAAP, and it can reduce taxable income during inflation.
- How does inflation affect FIFO?
- During periods of rising costs (inflation), FIFO matches older, lower costs with current revenues, resulting in a higher gross profit and net income compared to LIFO. Ending inventory is also valued at more current, higher costs.
- Can I switch from FIFO to another method?
- Yes, but accounting standards (like US GAAP or IFRS) generally require that a change in inventory valuation method be justified as preferable and its effects disclosed. Consistency is important.
- Does FIFO reflect the actual flow of goods?
- Often, yes, especially for businesses dealing with perishable items or products with expiration dates. However, FIFO is an accounting assumption and doesn’t have to perfectly match the physical movement for all businesses.
- How do I calculate ending inventory and cost of goods sold using FIFO with multiple purchases at different costs?
- You track each purchase as a separate layer with its specific cost. When goods are sold, you deplete the oldest layer first, then the next, until the sold quantity is met. The calculator above handles this automatically.
- What happens if I sell more units than my beginning inventory?
- You start using units from the first purchase layer after the beginning inventory is depleted, then the second purchase layer, and so on, until the total sales quantity is covered.
- Is FIFO hard to implement?
- Manually, it can be tedious with many transactions. However, most inventory management software can easily track and calculate inventory and COGS using FIFO. Our FIFO inventory calculator simplifies the process.
Related Tools and Internal Resources
- LIFO Calculator: Explore the Last-In, First-Out inventory method.
- Weighted-Average Cost Calculator: Calculate inventory and COGS using the weighted-average method.
- Inventory Turnover Ratio Calculator: Measure how quickly your inventory is sold.
- Gross Profit Margin Calculator: Understand your profitability after COGS.
- Economic Order Quantity (EOQ) Calculator: Optimize your inventory purchase quantities.
- Reorder Point Calculator: Determine when to reorder inventory.