InventoryCosting

Weighted average cost, and the three cases that break it

The method is four lines of arithmetic. The value is in knowing when not to apply it.

2 min read

Under a weighted moving average, the cost of an item is recalculated every time you receive more of it: total value on hand plus value received, divided by total units. Receipts move the average; issues do not.

Twenty units at 10 is 200. Receive thirty at 15, which is 450. Fifty units worth 650, so the average is 13. Sell ten, and you relieve 130 — the average stays at 13, because selling does not change what the remaining units cost.

Case one: a refund must not move the average

This is the one most systems get wrong. If an issue does not move the average, then reversing an issue must not move it either. Re-averaging on a refund makes an item’s cost depend on the timing of returns, which is not a property inventory has.

It also opens a straightforward exploit: sell cheap, receive dear, refund the cheap sale, and the returned units come back into stock at the new higher average. Repeat and you can inflate inventory value without buying anything.

Restore the quantity at the cost that went out, and leave the average alone. The gap between the two is worth recording — it is purchase price variance, and it is information rather than noise.

Case two: nothing on hand

With zero units in stock there is nothing to weight the new receipt against, so the receipt cost simply becomes the cost. Attempting the formula divides by the incoming quantity alone and produces the right answer by accident; making it an explicit case avoids the day the quantity is also zero.

Case three: the existing cost is an estimate

If the cost you hold was estimated during a migration rather than derived from an invoice, averaging a real receipt against it launders the guess into a figure that now looks precise and is flagged by nothing. Take the receipt cost outright instead, and mark the estimate as resolved.

Keep two costs, not one

The weighted average is what your stock is worth. What you paid on the most recent delivery is a different number and a more useful one when you are negotiating. Storing only the average loses the second; storing only the last cost misstates the balance sheet.

Snapshot the cost onto the sale

The most important consequence of a moving average is that today’s cost is not last month’s cost. If your reports compute historical cost of goods by joining to the product’s current cost, then every price change silently rewrites the margin on orders that are already closed.

Capture the cost onto the sale line at the moment it sells, and read history from that. It is what makes the moving average safe to move.

Bizsoftbiz does this for you

Fourteen days with every feature unlocked, no card required.