Appearance
How stock is valued
Two figures in your books depend on what stock is worth: the balance sheet's Inventory line, and the cost side of every sale — the thing that turns revenue into actual profit. Nobody types either one. Both come from a single number the app maintains per product: the average cost, shown on every product's panel as Avg Cost (WAC).
This page shows how that number behaves, using round figures so you can check every step in your head:
| Pieces | Worth | Average | |
|---|---|---|---|
| You start with | 50 | RM 500 | RM 10.00 |
| Buy 50 more at RM 14 | 100 | RM 1,200 | RM 12.00 — it moved |
| Sell 20 at RM 25 | 80 | RM 960 | RM 12.00 — it did not |
Buying is what moves it
Seri Maju's opening 50 pieces cost RM 10 each — the shelf is worth RM 500, and the average says so:

Then VendorCo's price goes up: 50 more pieces arrive at RM 14. Old stock and new now sit mixed on one shelf, so the app does the only honest thing — it blends them: RM 500 of old plus RM 700 of new, across 100 pieces, is RM 12.00 apiece:

That is the whole algorithm. Weighted average cost is just "what the shelf is worth, divided by what is on it" — recomputed whenever a purchase arrives at a different price.
Selling never moves it — selling uses it
Sell 20 pieces at RM 25 and look again: the average is still RM 12.00. A sale takes pieces off the shelf at the average — this sale carried RM 240 of cost into your profit figure (20 × 12), which is how the P&L knows you really earned RM 13 a piece, not RM 25. What remains on the shelf is 80 pieces at the same RM 12, worth RM 960.
Goods that come back on a Return-basis credit note walk back in at that same average — so returns never distort the value either.
The valuation report
Switch on Stock Valuation under Settings → Report Features (on-hand quantity and value per product), and Reports → Stock Valuation shows the end of our story. The screen states its own formula — current stock value per product (WAC × on-hand):

Quantity × average = value, per product, and the total is the same figure your balance sheet carries as Inventory. When an accountant asks "how is your stock valued?", this report is the answer — weighted average, itemised.
Two cost numbers, two jobs
A product's form has a Default Purchase Price — a convenience you type, used to prefill purchase lines. Avg Cost (WAC) is different: computed, never typed, and it is the one your valuation and profit figures stand on. Setting one does not touch the other.
Next: Stock issues and returns.