FIFO & Moving Average Valuation Methods
ERPNext values inventory using a perpetual inventory system, where every stock transaction updates both the quantity and value of inventory in real time. The Valuation Method determines how the cost of inventory issued from stock is calculated and directly affects inventory valuation and the Cost of Goods Sold (COGS).
ERPNext supports three valuation methods:
- FIFO (First In, First Out)
- Moving Average
- Standard Cost (covered separately)
This guide focuses on FIFO and Moving Average, explaining how each method works, how inventory value is calculated, and when each method is most suitable.
The Valuation Method can be configured for an individual Item, inherited from the Company, or set globally in Stock Settings. Item-level settings take the highest priority.
1. FIFO (First In, First Out)
FIFO assumes that the oldest inventory is consumed first. Every stock receipt creates a separate inventory layer with its own quantity and valuation rate. Whenever stock is issued, ERPNext consumes inventory beginning with the oldest available layer.
1.1 Example
| Transaction | Inventory Layers | Inventory Value |
|---|---|---|
| Receive 10 units @ 100 | 10 @ 100 | 1,000 |
| Receive 10 units @ 120 | 10 @ 100, 10 @ 120 | 2,200 |
| Issue 15 units | 5 @ 120 | 600 |
When 15 units are issued, ERPNext consumes the oldest inventory first: 10 units @ 100 and 5 units @ 120. The total inventory cost becomes 1,600, while the remaining inventory consists of 5 units valued at 120 each.
1.2 Advantages
- Reflects the actual purchase cost of inventory consumed.
- Provides accurate inventory valuation for remaining stock.
- Well suited for products with expiry dates or batch rotation.
- Widely accepted for accounting and statutory reporting.
1.3 Limitations
- Historical changes require inventory reposting.
- Can increase processing time for items with large transaction histories.
- COGS can fluctuate significantly when purchase prices change.
2. Moving Average
Moving Average maintains a single average valuation rate for each item. Every new stock receipt recalculates the average cost, while stock issues always use the current average valuation rate.
2.1 Average Cost Formula
(Existing Quantity × Existing Average Rate + Incoming Quantity × Incoming Rate)
÷
(Total Quantity After Receipt)
2.2 Example
| Transaction | Quantity | Average Rate | Inventory Value |
|---|---|---|---|
| Receive 10 units @ 100 | 10 | 100 | 1,000 |
| Receive 10 units @ 120 | 20 | 110 | 2,200 |
| Issue 15 units | 5 | 110 | 550 |
After receiving inventory at two different prices, ERPNext calculates an average valuation rate of 110. Every unit issued afterward uses this average cost until another receipt changes the average.
2.3 Advantages
- Smooths fluctuations in purchase prices.
- Simple inventory valuation with one average cost.
- Well suited for high-volume and homogeneous inventory.
- Produces more stable profit margins.
2.4 Limitations
- Does not preserve the original purchase cost of individual inventory lots.
- Historical corrections require inventory reposting.
- The average valuation rate may lag behind current market prices.
3. FIFO vs Moving Average
| Feature | FIFO | Moving Average |
|---|---|---|
| Inventory Cost | Oldest inventory layers | Current average cost |
| Tracks actual purchase cost | Yes | No |
| Ending Inventory | Recent purchase prices | Average valuation rate |
| Inventory Records | Multiple inventory layers | Single average rate |
| Best For | Perishable and high-value inventory | Fast-moving and homogeneous inventory |
4. Backdated Transactions and Reposting
Both FIFO and Moving Average depend on historical inventory transactions. If a backdated stock transaction is created, cancelled, amended, or updated through a Landed Cost Voucher, ERPNext recalculates all subsequent stock ledger entries for the affected item.
Backdated inventory changes trigger a Repost Item Valuation process that recalculates inventory quantities, valuation rates, stock values, and General Ledger entries for all future transactions of the affected item.
5. Choosing the Right Valuation Method
| Business Scenario | Recommended Method |
|---|---|
| Perishable or expiry-controlled inventory | FIFO |
| High-value or lot-traceable items | FIFO |
| Bulk commodities or raw materials | Moving Average |
| Fast-moving inventory | Moving Average |
| Stable and predictable costing | Moving Average |
6. Best Practices
- Select the valuation method before inventory transactions begin.
- Use consistent valuation methods for similar categories of items.
- Process historical corrections during low-activity periods since they trigger reposting.
- Create Landed Cost Vouchers promptly to avoid large historical recalculations.
- Regularly reconcile inventory reports with General Ledger balances.
Summary
FIFO values inventory by consuming the oldest available stock first, making it ideal for perishable, regulated, and high-value inventory. Moving Average uses a continuously updated average cost, providing smoother inventory valuation and simpler cost management for high-volume items. Both methods support perpetual inventory accounting and automatically update inventory valuation and accounting records, but historical changes require ERPNext to recalculate subsequent stock transactions through inventory reposting.