A controller notices that one product's cost doubled overnight. Nothing physically changed in the warehouse, no one entered an adjustment they remember, and margin on last month's shipments now looks wrong. That pattern is typical of average unit cost, or AVC: it is recalculated every time a valued receipt hits stock, so a single unusual transaction can reset the cost that every subsequent issue consumes at.
Unexpected AVC movement can normally be traced to one of three things — a valued transaction entered at an unusual price, a configuration choice about where price differences land, or a cost adjustment that arrived after the stock was gone. This page explains the calculation, the transactions that change it, and the sequence that finds the culprit.
Symptoms that point at AVC
- Product cost jumps or drops sharply immediately after a receipt, invoice, or adjustment
- Cost of goods sold on deliveries or work orders does not match what finance expected
- The stock valuation report changes with no physical stock movement behind it
- Products at zero quantity still carrying value, or value sitting at zero with stock on hand
- The same product valued very differently at two sites despite similar purchase prices
- The inventory GL balance drifting away from the stock valuation report over several periods
How average unit cost actually works
Valuation method is defined per product-site, inherited from the product category's valuation settings for that site. Available methods include average unit cost, FIFO, LIFO, standard cost, revised standard cost, lot cost, and last cost — and the same product can carry different methods at different sites, which is worth confirming before drawing conclusions from a single screen.
AVC is recalculated on receipt-type movements: purchase receipts, production receipts, miscellaneous receipts, positive adjustments, and inter-site receipts. The new cost is the existing quantity multiplied by the existing AVC, plus the received quantity multiplied by the receipt cost, divided by the total quantity. Issues — deliveries, consumptions, negative adjustments — never change AVC; they consume at the current value.
The current cost and quantity totals per product-site are held in ITMMVT, while each individual movement is written to the stock journal, STOJOU, with the unit cost and amount applied at the moment it was processed. That distinction matters: the product screen tells you today's cost, but reconstructing how it got there means reading the stock journal in sequence.
The usual causes, in the order we check them
Purchase invoice price variance
When an invoice price differs from the receipt price, Sage X3 can either push the difference into stock — adjusting AVC — or send it to a variance account. The purchasing parameter PIHCPR controls that choice. If stock is updated and the received quantity has already been consumed, the full variance lands on whatever small quantity remains, and AVC spikes out of all proportion.
Receipts valued at the wrong price
A receipt taken from an incorrect purchase order price, an unexpected currency rate, or a unit-of-measure conversion error — ordering in cases and receiving in units, for example — produces a distorted receipt cost that then blends permanently into the average.
Negative stock
Where a product-site permits negative stock, issues can be processed before the matching receipt exists. With no valid quantity to average against, the next receipt can effectively set or distort the cost. Long-standing negative stock is one of the most frequent sources of unreliable average costs and is worth investigating early.
Landed costs and additional invoices
Landed cost and additional invoice charges allocated to receipts increase receipt value. Inconsistent allocation rules, or a freight invoice arriving weeks after the stock shipped, reproduce the same small-remaining-quantity effect as an invoice price variance.
Production receipts valued at planned cost
Work order receipts are valued at planned or provisional cost until WIP finalization or cost close. The actual cost adjustment then flows back to the finished item, and when real material and labor consumption differed from plan, AVC can move significantly at close.
Manual corrections run straight into production
Manual cost adjustments and mass valuation corrections executed against live data without a controlled test are a recurring cause of costs that nobody can reconcile afterwards.
Inter-site transfers across differing methods
Stock transferred at the sending site's cost into a receiving site using a different valuation method will not behave the way either site's finance team expects.
Customizations and imports
Custom code or interfaces that write stock movements without passing through standard valuation logic can create quantity without value, or value without quantity.
Tracing a bad cost to its source
- 1. Reproduce the observation precisely
Pin down the product-site and the date range in which the cost changed, using the valuation history or the cost held on the product-site record. Vague timeframes make every later step longer.
- 2. Isolate the movement that diverged
List the stock journal movements for that product-site in processing sequence and find the first movement where unit cost stops looking like its neighbours.
- 3. Compare the source document
Trace that movement to its originating purchase receipt, invoice, work order, or adjustment, and compare document price against order price, unit of measure, and currency rate.
- 4. Compare the configuration
Review the product-site settings that govern the outcome: valuation method, whether negative stock is allowed, and the invoice price variance parameter.
- 5. Review the later transaction history
Check whether a purchase invoice or additional invoice posted a stock variance after the received quantity had already been consumed — the classic cause of a disproportionate spike.
- 6. Validate the accounting side
Compare stock account postings for the same movements against the stock journal amounts, so you know whether the problem is valuation, posting, or both.
- 7. Test the correction in a non-production folder
Apply the intended valuation correction to the affected quantity in a copy of the folder and confirm both the resulting cost and the accounting entries before going near live data.
- 8. Correct, then validate and monitor
Make the correction through supported functions, confirm downstream cost of goods sold behaves as expected, and keep a query running on cost movement so the next distortion surfaces immediately.
When a distorted cost stops being a support ticket
- The wrong cost has already flowed into deliveries, work orders, or closed periods
- Multiple sites or currencies are in scope
- Negative stock has been allowed for a long time and history is unreliable
- Historical costs need to be reconstructed for audit or margin analysis
- Custom code or an integration is writing stock movements
- The answer you have been given is "run the recalculation" with no explanation of the cause
At that point the issue is no longer routine support — it is a costing investigation with accounting consequences. PRH runs costing diagnostics with targeted queries against the stock journal and product-site cost tables, corrects through the application rather than mass batch functions against live data, and leaves monitoring in place afterwards. Recalculating a cost without understanding why it broke usually buys a quiet quarter, not a fix.
Average cost questions we hear most
Why did my Sage X3 average cost suddenly change?
Almost always a receipt-type transaction valued at an unusual price, or a purchase invoice variance applied to a small remaining quantity. Reading the stock journal in sequence will show the movement where cost diverged.
Can Sage X3 recalculate average cost?
There are valuation correction utilities, but they adjust the current value rather than re-deriving history. Running one without identifying the cause typically reproduces the same distortion later.
How are purchase invoice price variances handled in Sage X3?
The invoice price variance stock-update parameter determines whether the difference goes into stock, adjusting average cost, or to a variance account. Which behavior you have depends on how purchasing was configured.
Can negative inventory affect average cost?
Yes, and frequently. Once the operational reason for the negative stock is addressed, switching it off per product-site removes a whole class of costing problems.
How do landed costs affect inventory valuation?
They increase receipt value and therefore the average cost, according to the allocation method in use. Additional invoices arriving late can adjust stock value after the goods have already been consumed.
Does a delivery or issue change average cost?
No. Issues consume at the current average; only receipt-type movements recalculate it.
Why is average cost different at two sites?
Valuation is maintained per product-site. Different receipt prices, transfer costs, or a different valuation method on one site will all produce a legitimate difference.
Where to go next
- Sage X3 Inventory Valuation and Stock-to-GL Reconciliation
The costing pillar: how value reaches the ledger and how to reconcile it.
- Sage X3 Standard Cost Setup and Roll-Up
If the answer to unstable averages is moving part of the catalogue to standard cost.
- Slow Sage X3 performance
When valuation reports and costing inquiries take too long to run.
- Stock discrepancies and inventory variances
Quantity accuracy problems that frequently sit underneath cost problems.
- Sage X3 inventory troubleshooting
Wider inventory diagnostics across stock, planning, and warehouse processes.
- ERP rescue and project recovery
When costing problems are one symptom of a deployment that was never finished properly.
- Sage X3 support and optimization
Senior support for issues past the limits of routine ticket handling.
- Distribution ERP experience
High-volume receipt and issue environments where AVC moves constantly.