FIFO COGS Calculator: Calculate Cost of Goods Sold
A simple and powerful tool to determine the Cost of Goods Sold (COGS) and ending inventory value using the First-In, First-Out (FIFO) method.
Inventory & Sales Data
Beginning Inventory
Inventory Purchases
What is the FIFO Method for Cost of Goods Sold?
The **First-In, First-Out (FIFO)** method is an inventory valuation technique that operates on the assumption that the first items added to inventory are the first items to be sold. In other words, your oldest stock is expensed first. This method is widely used by businesses to calculate their Cost of Goods Sold (COGS) and is compliant with both Generally Accepted Accounting Principles (GAAP) and International Financial Reporting Standards (IFRS).
Imagine a grocery store stocking milk. The cartons with the earliest expiration dates are placed at the front of the shelf so customers buy them first. This physical flow matches the FIFO accounting principle perfectly. For accounting purposes, FIFO is a cost flow assumption; it doesn’t necessarily mean the actual, physical oldest unit was sold. The primary goal is to assign a cost to the units that have been sold and the units that remain in inventory.
This calculator helps you apply the **calculate cost of goods sold using fifo method** logic without manual tracking, providing clear insights into your profitability and inventory value.
FIFO Formula and Explanation
There isn’t a single, simple formula for FIFO like there is for other metrics. Instead, it’s a step-by-step process of assigning costs. The core principle is to exhaust the oldest inventory layers before moving to newer ones.
The calculation process is as follows:
- List Inventory Layers: Itemize all inventory purchases chronologically, starting with the beginning inventory, noting the number of units and the cost per unit for each batch.
- Determine Units Sold: Identify the total number of units sold during the accounting period.
- Assign Costs to COGS: Starting with the oldest inventory layer (Beginning Inventory), assign its cost to the units sold. Continue this process, moving to the next oldest layer, until the total number of units sold has been accounted for.
- Calculate Total COGS: Sum the costs assigned in the previous step. This total is your Cost of Goods Sold.
- Calculate Ending Inventory: The remaining units that were not sold constitute your ending inventory. Their value is the sum of the costs of the newest, untouched or partially used inventory layers.
Variables Table
| Variable | Meaning | Unit | Typical Range |
|---|---|---|---|
| Beginning Inventory | The stock you have at the start of the period. | Units & Currency | 0+ |
| Inventory Purchases | Additional stock acquired during the period, in distinct batches. | Units & Currency | 0+ |
| Units Sold | The total quantity of items sold during the period. | Units | 0 to Total Available Units |
| Cost of Goods Sold (COGS) | The direct cost attributed to the production of the goods sold. | Currency | Calculated Value |
| Ending Inventory | The value of stock remaining at the end of the period. | Currency | Calculated Value |
Practical Examples
Example 1: Selling Through the First Batch
Let’s say a business has the following inventory and sales:
- Beginning Inventory: 100 units at $10/unit
- Purchase 1: 150 units at $12/unit
- Units Sold: 80 units
To calculate COGS, we take all 80 units from the oldest layer (Beginning Inventory):
COGS = 80 units * $10/unit = $800
Ending Inventory consists of:
- Remaining Beginning Inventory: 20 units * $10/unit = $200
- Purchase 1: 150 units * $12/unit = $1,800
- Total Ending Inventory Value: $200 + $1,800 = $2,000
Example 2: Selling Into a Second Batch
Using the same inventory but with higher sales:
- Beginning Inventory: 100 units at $10/unit
- Purchase 1: 150 units at $12/unit
- Units Sold: 130 units
The COGS calculation draws from both layers:
- First 100 units come from Beginning Inventory: 100 units * $10/unit = $1,000
- Remaining 30 units come from Purchase 1: 30 units * $12/unit = $360
Total COGS = $1,000 + $360 = $1,360
Ending Inventory consists of:
- Remaining Purchase 1: (150 – 30) units * $12/unit = 120 units * $12/unit = $1,440
How to Use This FIFO COGS Calculator
Our calculator simplifies the process to **calculate cost of goods sold using fifo method**. Follow these steps for an accurate result:
- Set Currency: Enter your preferred currency symbol in the first field.
- Enter Beginning Inventory: Input the number of units and the cost per unit for the inventory you had at the start of the period.
- Add Purchases: For each batch of inventory you purchased, click “Add Purchase Layer” and fill in the units and cost per unit. Add as many layers as you need.
- Input Units Sold: Enter the total quantity of items sold during the period.
- Calculate: Click the “Calculate COGS” button. The calculator will instantly display the Total COGS, the value and units of your ending inventory, and a visual breakdown in the chart.
- Interpret Results: The primary result is your COGS. The intermediate values show the financial worth of your remaining stock. The chart helps visualize which cost layers were expensed (sold) and which remain.
Key Factors That Affect FIFO Calculations
Several business and economic factors can influence the outcome and relevance of FIFO calculations.
- Inflation: During periods of rising prices, FIFO results in a lower COGS and higher net income. This is because cheaper, older costs are matched against current revenues. This can lead to a higher tax liability.
- Deflation: In a deflationary environment, the opposite occurs. FIFO produces a higher COGS and lower net income.
- Product Perishability: FIFO is the natural choice for businesses dealing with perishable goods, like food or pharmaceuticals. It aligns the accounting flow with the necessary physical flow of inventory to reduce spoilage.
- Inventory Holding Costs: The costs to store, insure, and manage inventory can be significant. By promoting the sale of older stock, FIFO helps reduce the time items spend in the warehouse, potentially lowering these costs.
- Supplier Price Volatility: If the cost of acquiring goods fluctuates significantly, the FIFO method will smooth out the COGS over time compared to LIFO, which would reflect the most recent, potentially volatile, prices immediately.
- Demand Forecasting: Accurate demand forecasting is crucial. Misjudging sales can lead to holding old inventory for too long, incurring costs even if the FIFO accounting method assumes it’s been sold. Check out a guide on inventory management techniques to learn more.
Frequently Asked Questions (FAQ)
FIFO is popular because it’s logical, aligning with the natural physical flow of goods for most businesses. It’s also accepted by both IFRS and US GAAP, making it suitable for international companies. It is generally seen as providing a more accurate valuation of ending inventory on the balance sheet.
LIFO is the opposite of FIFO; it assumes the newest inventory is sold first. In times of rising prices, LIFO results in a higher COGS and lower net income (and thus lower taxes), whereas FIFO results in a lower COGS and higher net income. LIFO is not permitted under IFRS. For more details see our FIFO vs LIFO comparison.
It depends. In an inflationary period, FIFO leads to higher reported profits, which in turn leads to a higher income tax liability compared to LIFO. However, it presents a stronger financial picture to investors and lenders. Consult with an accountant to choose the best method for your specific situation.
Businesses selling perishable goods (e.g., food, cosmetics, pharmaceuticals) benefit most, as it helps prevent spoilage and obsolescence. However, its simplicity and widespread acceptance make it a solid choice for many industries, including retail and electronics.
When a customer returns an item, the cost of that item is typically returned to the inventory. For accounting simplicity, many businesses will add it back to inventory at the cost it was sold at (the oldest cost layer). Consistent policy is key.
Yes, by asking for the *total* units sold during the period. The FIFO calculation is typically performed at the end of an accounting period (e.g., a month or quarter) and aggregates all sales within that timeframe.
Yes. FIFO is a *cost flow assumption* for accounting, not a mandate for physical inventory management. You can physically sell your newest item but account for it using the cost of your oldest item. However, aligning physical and accounting methods is often more efficient. Explore some warehouse efficiency tips to help.
The general formula for COGS is: Beginning Inventory + Purchases – Ending Inventory = COGS. The FIFO method is one of the ways to determine the value of the ‘Ending Inventory’ component of that formula.