Opening & Closing Stock Explained: Codes 5200 & 5201
Total purchases in a period aren't the same as the true cost of what was actually sold — some of what was bought is still sitting on the shelf at year end, and some of what's sold came from stock bought in an earlier period. These two codes make that adjustment.
The codes, and what each one holds
Code 5200 — Opening Stock brings in the value of stock held at the start of the period, effectively adding it to the cost of sales calculation since it's available to be sold this period.
Code 5201 — Closing Stock removes the value of stock still held at the end of the period, since it hasn't been sold yet and shouldn't be counted as a cost this period. Both are Purchases & Direct Costs codes and normally carry a debit balance, though Closing Stock's entry is a credit that reduces the overall cost of sales figure.
Real-world examples across industries
Retail and wholesale
A homeware retailer starts the year with £42,000 of stock on the shelves — last year's closing figure carried forward — and buys £180,000 of goods for resale during the year. A physical count at the year end, valued at the lower of cost and net realisable value, comes to £38,000. The entries are a debit of £42,000 to 5200 (Opening Stock) matched by a credit to the stock account on the balance sheet, and a credit of £38,000 to 5201 (Closing Stock) matched by a debit to the same stock account — both valuation journals, with no VAT involved either side. True cost of sales for the year comes to £42,000 + £180,000 − £38,000 = £184,000, not the raw £180,000 purchases figure.
Manufacturing
A manufacturer's stock figure is more than just goods on a shelf — it spans raw materials, work in progress and finished goods, with WIP and finished units carrying a share of absorbed labour and production overhead in their valuation, not just material cost. Opening stock of £68,000 (debit 5200, credit the stock account) and closing stock of £74,000 (credit 5201, debit the stock account) reduce the year's £310,000 of purchases and direct costs to a true cost of sales of £68,000 + £310,000 − £74,000 = £304,000. Arriving at that £74,000 closing figure typically involves considerably more judgement than a retailer's stocktake, since it means estimating percentage completion on every unfinished job.
Food and hospitality (perishables)
A restaurant has a much narrower window to count stock accurately at year end than a business holding durable goods, since ingredients can't sit around waiting to be valued. Opening stock of £4,000 is debited to 5200 as normal, but the year-end count of £3,600 gets written down to £3,200 once near-expiry and spoiled items are stripped out, and it's that £3,200 that's credited to 5201. The write-down means less is carried forward as an asset and more is recognised as cost of sales for the year — a bigger swing, proportionally, than a retailer selling goods that don't perish would ever see.
Why this matters day to day
Without this adjustment, a business that stockpiles materials late in the year would show an inflated cost of sales and understated profit, even though most of that stock hasn't actually been used yet. Getting the closing stock valuation right — and counting it accurately at year end — is one of the most commonly checked figures in any set of accounts, since it directly affects both the balance sheet and reported profit.