Inventory & COGS Calculators
Calculate COGS Using FIFO Calculator
Enter your inventory purchase layers and the number of units sold to calculate the Cost of Goods Sold (COGS) using the First-In, First-Out (FIFO) method.
Inventory Layer 1 (Oldest)
Number of units in this batch.
Cost per unit for this batch.
Inventory Layer 2
Inventory Layer 3
Inventory Layer 4
Leave empty if not used.
Inventory Layer 5 (Newest)
Leave empty if not used.
Total number of units sold during the period.
Inventory Layers & COGS Breakdown
| Layer | Units Purchased | Cost/Unit | Layer Value | Units Sold from Layer | COGS from Layer | Remaining Units | Ending Inventory Value |
|---|---|---|---|---|---|---|---|
| Totals: | |||||||
This table shows how units sold are taken from the oldest layers first under FIFO.
COGS vs. Ending Inventory Value (FIFO)
Chart visualizing the COGS contributions from layers and total ending inventory value.
What is Calculate COGS Using FIFO?
Calculate COGS using FIFO refers to the process of determining the Cost of Goods Sold (COGS) for a period using the First-In, First-Out (FIFO) inventory valuation method. Under FIFO, it is assumed that the oldest inventory items (the first ones purchased or produced) are the first ones sold. This method aligns the flow of costs with the typical physical flow of goods for many businesses, especially those dealing with perishable items or products with a limited shelf life.
When you calculate COGS using FIFO, you match the cost of your oldest inventory against the revenue from the units sold during the period. The remaining inventory, therefore, consists of the most recently purchased items, valued at their more recent costs. This can have a significant impact on both the reported COGS on the income statement and the value of ending inventory on the balance sheet, especially during periods of changing prices.
Businesses that deal with products where the oldest stock needs to be sold first (like food or pharmaceuticals) often use FIFO. However, any business can choose FIFO as their inventory costing method, though it must be applied consistently. Common misconceptions include thinking FIFO always results in lower taxes (it often results in higher taxable income during inflationary periods) or that it’s the only method allowed (LIFO and weighted-average are also common, though LIFO is not permitted under IFRS).
Calculate COGS Using FIFO Formula and Mathematical Explanation
The core principle of FIFO is “First-In, First-Out.” To calculate COGS using FIFO, you look at your inventory layers, starting with the oldest purchase. You assume the units sold are drawn from these oldest layers first, until the total number of units sold is accounted for.
The process is as follows:
- Identify the beginning inventory and all inventory purchases during the period, noting the number of units and the cost per unit for each batch (layer).
- Determine the total number of units sold during the period.
- Starting with the oldest inventory layer (the first “in”), allocate the cost of these units to COGS until either the layer is depleted or the total units sold are accounted for.
- If the oldest layer is depleted and more units were sold, move to the next oldest layer and repeat the process.
- Sum the costs from each layer used to fulfill the sales to get the total COGS.
- The remaining units in the layers that were not fully depleted, plus any untouched newer layers, constitute the ending inventory, valued at their respective costs.
The formula for COGS from a specific layer is: Units Sold from Layer × Cost per Unit of Layer
Total COGS = Sum of (COGS from each layer used)
Ending Inventory Value = Sum of (Remaining Units in each Layer × Cost per Unit of Layer)
Variables Table
| Variable | Meaning | Unit | Typical Range |
|---|---|---|---|
| Beginning Inventory Units | Units on hand at the start | Units | 0+ |
| Beginning Inventory Cost/Unit | Cost per unit of beginning inventory | $ | 0+ |
| Units Purchased (per layer) | Number of units bought in a batch | Units | 1+ |
| Cost per Unit (per layer) | Cost for each unit in a purchase batch | $ | 0.01+ |
| Units Sold | Total units sold in the period | Units | 0+ |
Practical Examples (Real-World Use Cases)
Example 1: Rising Costs
A bookstore has the following inventory of a particular novel:
- Jan 1: Beginning Inventory: 50 units @ $10/unit
- Jan 15: Purchase 1: 100 units @ $12/unit
- Jan 25: Purchase 2: 80 units @ $13/unit
In January, they sold 180 units. Let’s calculate COGS using FIFO:
- Sell 50 units from Beginning Inventory @ $10 = $500
- Need 130 more units (180 – 50). Sell 100 from Purchase 1 @ $12 = $1200
- Need 30 more units (130 – 100). Sell 30 from Purchase 2 @ $13 = $390
Total COGS = $500 + $1200 + $390 = $2090
Ending Inventory: 50 units from Purchase 2 @ $13 = $650.
Example 2: Multiple Sales Periods (Conceptual)
Imagine a grocery store selling milk:
- Day 1: Purchase 100 gallons @ $3.00/gallon
- Day 2: Purchase 150 gallons @ $3.10/gallon
- Day 3: Sell 120 gallons
To calculate COGS using FIFO for Day 3 sales:
- Sell 100 gallons from Day 1 @ $3.00 = $300
- Need 20 more gallons. Sell 20 from Day 2 @ $3.10 = $62
Total COGS = $300 + $62 = $362
Ending Inventory: 130 gallons from Day 2 @ $3.10 = $403.
How to Use This Calculate COGS Using FIFO Calculator
- Enter Inventory Layers: For each batch of inventory you purchased, starting with the oldest, enter the “Units Purchased” and “Cost per Unit” into the corresponding “Inventory Layer” fields. Use as many layers as you have purchases, up to 5 with this calculator. Leave fields empty for unused layers.
- Enter Units Sold: Input the total number of units sold during the period for which you want to calculate COGS in the “Units Sold” field.
- Calculate: Click the “Calculate COGS” button.
- Review Results:
- The “Primary Result” shows your total Cost of Goods Sold (COGS) using FIFO.
- “Intermediate Results” display the calculated Ending Inventory Value and total units sold.
- The “Inventory Layers & COGS Breakdown” table details how many units were sold from each layer and their contribution to COGS, along with remaining inventory.
- The chart visually represents the COGS and ending inventory values.
- Reset: Click “Reset” to clear inputs or go back to default values.
- Copy: Click “Copy Results” to copy the main results and assumptions to your clipboard.
This calculator helps you understand how the FIFO method allocates costs and values your remaining stock. If your costs are rising, FIFO will generally result in a lower COGS and higher net income compared to LIFO.
Key Factors That Affect Calculate COGS Using FIFO Results
- Inflation/Deflation: During inflationary periods (rising costs), FIFO results in a lower COGS and higher ending inventory value because older, cheaper costs are matched with revenues first. In deflationary periods, the opposite occurs.
- Purchase Timing and Costs: The cost and timing of inventory purchases directly impact which costs are assigned to COGS. Large purchases at significantly different prices will have a more pronounced effect.
- Inventory Levels: The amount of inventory on hand relative to sales volume determines how many layers are used to calculate COGS. Higher sales volume might deplete more layers.
- Type of Goods: Businesses with perishable goods or items with expiration dates often physically rotate stock in a FIFO manner, making the FIFO cost flow assumption align with reality.
- Accounting Period Length: The period over which COGS is calculated (e.g., monthly, quarterly, annually) can influence the layers included and thus the COGS figure.
- Consistency of Method: Once chosen, the inventory costing method (FIFO, LIFO, weighted-average) should be applied consistently for comparability over time, although changes are allowed if justified and disclosed. A switch between methods can significantly alter reported COGS and net income. See our LIFO vs FIFO comparison.
- Inventory Damage or Obsolescence: Write-downs of inventory value due to damage or obsolescence can affect the value of ending inventory, although they are typically recorded separately from COGS calculated via FIFO. Check our guide on inventory valuation methods.
Frequently Asked Questions (FAQ)
Q1: What is FIFO?
A1: FIFO stands for First-In, First-Out. It’s an inventory costing method that assumes the first units of inventory purchased (or produced) are the first ones sold. Costs are matched accordingly.
Q2: Why use the FIFO method to calculate COGS?
A2: FIFO is often used because it mirrors the actual physical flow of goods for many businesses, especially those with perishable or date-sensitive products. It also tends to report a higher net income during periods of rising costs, which can be viewed favorably by investors. Learn more about inventory accounting.
Q3: How does FIFO affect net income during inflation?
A3: During inflation (rising costs), FIFO matches older, lower costs with current revenues, resulting in a lower COGS and thus a higher gross profit and net income compared to methods like LIFO.
Q4: Is FIFO allowed under both GAAP and IFRS?
A4: Yes, FIFO is permitted under both U.S. Generally Accepted Accounting Principles (GAAP) and International Financial Reporting Standards (IFRS).
Q5: What is the difference between FIFO and LIFO?
A5: FIFO assumes the first items purchased are sold first, while LIFO (Last-In, First-Out) assumes the last items purchased are sold first. This leads to different COGS and ending inventory values, especially when costs are changing. LIFO is not allowed under IFRS.
Q6: Does FIFO give a more accurate picture of ending inventory value?
A6: In periods of rising costs, FIFO generally results in an ending inventory value on the balance sheet that is closer to the current market value or replacement cost of the inventory, as it consists of the most recently purchased items.
Q7: Can I switch from FIFO to another method?
A7: Yes, but accounting standards require that the change is justified as being preferable and that its effects are disclosed. You can’t switch back and forth frequently just to manipulate income.
Q8: What if I have more than 5 inventory layers?
A8: This calculator handles up to 5 layers for simplicity. For more layers, you would extend the same logic: continue taking from the next oldest layer until all units sold are accounted for. You might need a spreadsheet or more advanced software for many layers.
Related Tools and Internal Resources
- LIFO Calculator: Calculate COGS using the Last-In, First-Out method.
- Weighted-Average Cost Calculator: Determine COGS using the weighted-average cost method.
- Inventory Turnover Ratio Calculator: Measure how quickly inventory is sold.
- Gross Profit Calculator: Calculate gross profit based on revenue and COGS.
- Understanding Inventory Accounting: A guide to inventory valuation methods.
- Inventory Management Strategies: Tips for effective inventory control.