Most manufacturers procure the same components repeatedly, at varying quantities and prices, from one or multiple suppliers.
This creates a challenge: when a component is issued against for Production Run, which purchase price should the system use to calculate its material cost? The first purchase? The latest? An average of all purchases?
Apache OFBiz resolves this using the Weighted Average Cost (WAC) method. Rather than tracking each purchase batch separately, the system maintains a running average cost per unit for every item in inventory, recalculating it automatically each time new stock is received. This gives manufacturers a stable, accurate cost base for production costing, pricing decisions, and financial reporting.
What is Weighted Average Cost?
Weighted Average Cost is a method of inventory valuation that calculates the average cost per unit by factoring in both the price and the quantity of each purchase. Purchases with larger quantities carry more weight in the final average, reflecting their proportionally greater impact on the total inventory value.
In simple terms, WAC smooths out price fluctuations across multiple purchases. When prices vary over time, the weighted average provides a more realistic and stable cost than either the earliest or the most recent purchase price alone.
|
The WAC Formula WAC = Σ (Received Quantity × Unit Price) ÷ Σ Received Quantity |
Each time new inventory is received, Apache OFBiz recalculates the WAC using all receipts to date, replacing the previous value automatically.
Weighted Average Cost vs. Simple Average Cost
A common alternative is the Simple Average Cost method, which calculates the average of all unit prices without considering how many units were purchased at each price. The difference matters significantly when purchase volumes vary.
Consider three purchases of the same component:
|
Purchase |
Quantity |
Unit Price |
Total Cost |
|
1 |
10 units |
$5.00 |
$50 |
|
2 |
20 units |
$7.00 |
$140 |
|
3 |
30 units |
$9.00 |
$270 |
|
Total |
60 units |
|
$460 |
- Simple Average Cost: (5 + 7 + 9) ÷ 3 = $7.00 (treats each purchase equally, regardless of quantity)
- Weighted Average Cost: 460 ÷ 60 = $7.67 (reflects the larger volume of higher-priced units)
In this example, 30 units were purchased at $9.00 and only 10 at $5.00. The Simple Average ignores this imbalance and gives equal weight to all three prices. The Weighted Average correctly reflects that the bulk of inventory was acquired at a higher price, producing a more accurate cost per unit.
How WAC Updates with Each Receipt in Apache OFBiz
Apache OFBiz does not store WAC as a fixed value. It recalculates automatically each time inventory is received, using the cumulative total cost and total quantity across all receipts to date.
Using the Sticker (STC1001) from the skateboard manufacturing example, here is how the WAC evolves across three receipts:
|
Receipt |
Qty |
Unit Price |
Total Cost |
Cumulative Qty |
Cumulative Cost |
WAC |
|
R1 |
100 |
$2.00 |
$200 |
100 |
$200 |
$2.00 |
|
R2 |
150 |
$3.00 |
$450 |
250 |
$650 |
$2.60 |
|
R3 |
250 |
$4.00 |
$1,000 |
500 |
$1,650 |
$3.30 |
After each receipt, the WAC shifts to reflect the new cumulative average. By the third receipt, even though the most recent purchase was at $4.00 per unit, the WAC is $3.30 because earlier lower-cost purchases are still part of the total. This is the stabilizing effect WAC provides.
Where WAC Fits in Production Cost Calculation
Material cost is one of the three components that make up the total production cost in Apache OFBiz, alongside routing task costs and product-level overhead. When components are issued against a production run, Apache OFBiz uses the current WAC of each item to determine its material cost contribution.
This means the accuracy of WAC directly affects the accuracy of production cost calculation. If WAC is up to date and correctly reflects the cumulative cost of inventory on hand, the material cost allocated to each production run will be reliable. If inventory is received at inconsistent prices without proper tracking, the WAC will drift and production cost figures will become misleading.
Keeping inventory receipts accurate and timely is therefore not just a warehouse concern. It has a direct impact on the cost data that feeds into pricing, margin analysis, and financial reporting.
Viewing Weighted Average Cost in Apache OFBiz
Apache OFBiz does not display the Weighted Average Cost directly on the product screen. It is accessible through the Facility module.
1. Navigate to Facility > Facilities
2. Select the relevant Facility ID from the dropdown
3. Go to Inventory > Inventory Average Costs
4. Locate the product using its Product ID in the list
The WAC for each product is updated automatically each time new stock is received, replacing the previous value. At the time of writing, the Inventory Average Costs screen does not include a search function, so products must be located by scrolling through the list.
For detailed instructions, refer to the Understanding the Calculation of Material Cost with Weighted Average Method in Apache OFBiz guide on the Apache OFBiz Confluence wiki.
Conclusion
Weighted Average Cost is the method Apache OFBiz uses to maintain accurate, stable inventory valuations across multiple purchases at varying prices. By recalculating the average cost with every receipt, the system ensures that material costs used in production runs, pricing decisions, and financial reporting always reflect the true cumulative cost of inventory on hand.
For manufacturers dealing with fluctuating supplier prices or high-volume procurement, WAC provides a reliable and consistent cost base that simple price tracking cannot match.
Looking to implement and optimize Apache OFBiz for your manufacturing and inventory operations? Partner with HotWax Systems for a tailored solution built around your business needs.

