Costing
Weighted-average costing explained for Pakistani wholesalers
Why FIFO is rarely how shops actually buy, how weighted-average cost works on every GRN, and how CountOS posts COGS without overwriting opening stock.

Ask ten wholesalers in Lahore how they cost stock and you will hear “last purchase price” more often than any textbook method. That shortcut is why two partners can look at the same month and disagree on profit. Weighted-average costing is the method CountOS uses because it matches how Pakistani traders actually buy: the same item, many invoices, mixed rates.
What weighted-average cost means in one line
After every inbound receipt, the new average cost is:
(old qty × old average) + (received qty × this invoice’s rate), divided by new qty.
Sales then take stock out at that running average — not at the price of the box you think you sold. You do not need to pick which lot left the warehouse. That is why the method works for shops that do not practise strict batch picking.
A worked example (PKR)
You open the month with 100 units of a battery pack at Rs 200 average. You receive 50 more at Rs 230.
- Old value: 100 × 200 = Rs 20,000
- Inbound value: 50 × 230 = Rs 11,500
- New qty: 150
- New average: 31,500 ÷ 150 = Rs 210
Sell 40 units. COGS is 40 × 210 = Rs 8,400 — even if the customer paid a promotional sell price of Rs 300. Gross profit on those 40 units is Rs 3,600. If you had used “last price” (Rs 230), you would have overstated COGS by Rs 800 and understated profit. Over a catalogue of 2,000 SKUs, that error is not a rounding issue. It is a wrong buying decision.
Rules that keep the ledger honest
A costing method is only as good as the stock rules underneath it. In CountOS we enforce three:
- Opening stock is never overwritten. After go-live, quantity only changes through movements: sale, purchase/GRN, adjustment, transfer, count, or return.
- Inbound stock updates average cost. POS purchase and goods receiving both recalculate the average when the document is posted.
- Posted sales reduce stock and post COGS from the current average. Draft documents do not touch the ledger.
That last point matters. Staff can prepare a purchase or count, a supervisor posts it, and the audit log records who did what. You cannot “fix” profit by editing a number on the product screen.

When FIFO or specific identification is better
We do not pretend one method fits every business. FIFO (first in, first out) is cleaner when lots have expiry dates — pharma, some foods — and you pick the oldest lot on purpose. Specific identification is right for serialised goods (generators, phones) where each unit has its own cost. CountOS is built for the common Pakistani wholesale pattern: mixed inbound rates, fast movers, no lot picking at the counter. If your regulator or auditor requires FIFO lots, say so in the demo so we can scope it honestly.
What to check in any software demo
- Receive the same SKU at two different rates. Does average cost move?
- Sell one unit. Does COGS use the new average?
- Open the stock ledger for that SKU. Can you see every movement, not just a closing balance?
- Can someone type a new “on hand” quantity without a reason code? If yes, walk away.
How this shows up in CountOS reports
Once average cost is live, these reports become usable for buying and pricing:
- Inventory valuation — qty × average cost, not sell price dressed up as value.
- Sales and profit by product — margin after real COGS.
- Stock ledger — inbound, outbound, and running qty per product.
- Low stock — reorder before you discover a hole at the counter.
That is the difference between “we have software” and “we know which SKUs pay the rent.”
Book a demo and we will walk through a receive-then-sell on your own sample products.

