Dashboard

How to Use AI for a Stock Take

Counting is the part you still do by hand. Deciding which of 60 variances deserve an hour of investigation is the part AI is genuinely good at.

Steve Jefferson
Steve Jefferson
Developer Advocate
15 October 20261 min read

Nothing counts your stock for you. If you use AI for a stock take expecting to skip the physical count, you will end up with a confident number that is wrong, which is worse than no number. What AI is actually good at is the three jobs around the count: preparing the sheet so the count goes faster, triaging the variances afterwards so you investigate the ones that matter, and getting the valuation basis right so the figure is usable in your accounts.

Before the count: build a sheet that reduces errors

A count goes wrong in predictable ways. Items counted twice because they live in two places. Units of measure confused, so a case of 24 is recorded as 24. Lines missed entirely because the sheet was ordered by product code and the shelves are not.

Fix that in the sheet rather than during the count.

text
Here is my stock list exported from the till system.

<stock>
[paste: code, description, pack size, unit cost, system qty, location]
</stock>

Prepare a count sheet:
1. Order it by location, then by shelf position within location,
   not by product code.
2. For every line, state the unit being counted explicitly
   (each / case of N / kg). Flag any line where the pack size
   looks inconsistent with the description.
3. Flag every item appearing in more than one location, so the
   counter knows to expect it twice.
4. Add a blank column for count and one for notes.
5. List separately any line with a system quantity below zero.
   Those are data errors, not stock.

Do not estimate or fill in any count.

Point five catches more problems than the rest combined. Negative system quantities mean something was sold that was never received, and no amount of careful counting resolves them. Finding them before you start saves an argument on the floor.

The last line matters too. A model handed a column called count will sometimes populate it, and a plausible fabricated count buried in a 400-line sheet is exactly the kind of error that survives review.

The variance triage that is worth the effort

You come back with 60 lines that do not match. This is the decision that eats a day if you do it by instinct: which of them do you chase?

The wrong instinct is to chase the largest unit discrepancies. Forty missing napkin packs is visually alarming and might be eleven pounds. Two missing bottles of the top shelf spirit is quiet and might be ninety. Rank by money at risk, not unit count.

text
Here are my variances: code, description, unit cost, system qty,
counted qty.

<variances>
[paste]
</variances>

1. Compute for each line: unit variance, value variance
   (unit variance x unit cost), and variance as a percentage
   of system quantity.
2. Sort by absolute value variance, largest first.
3. Compute the cumulative share of total absolute value variance
   as I go down the list, so I can see where 80% is reached.
4. Separately list any line where the percentage variance
   exceeds 25% regardless of value. Those are process problems
   even when the money is small.
5. For the top 10 by value, suggest the most likely cause given
   the direction and the item type: theft, miscount, wrong unit,
   goods received not booked in, wastage not recorded.

Do not merge categories 3 and 4. They are different questions.

The cumulative-share column is the output to act on. In most small retail and hospitality counts, somewhere between eight and fifteen lines account for 80 percent of the total value variance. Those are your afternoon. The remaining forty-odd go into an adjustment, and chasing them individually costs more than the stock is worth.

Category four exists because a 40 percent variance on a cheap item is telling you something about process even when the money is trivial. A line that swings 40 percent every count has a unit-of-measure problem or a recording habit behind it, and fixing that is worth more than the stock value.

Direction is a real clue and worth asking for explicitly. Consistent shortfalls on small high-value items point one way. Consistent surpluses point at goods received and never booked in, which is an accounts payable problem wearing a stock costume. If your receipts and delivery notes are a pile of paper, using AI to read receipts and invoices is the faster route to checking that theory.

Getting the valuation right

The count gives you quantities. Your accounts need a value, and the basis is not a free choice.

HMRC's Business Income Manual states there are two acceptable valuation bases for stock and work in progress, the lower of cost and net realisable value, and mark to market, and that all other bases are not acceptable for tax purposes. For almost every small business, that means lower of cost or net realisable value.

Two definitions you need to get right, both from the same manual. Cost should be interpreted as all costs of purchase, costs of conversion and other costs incurred in bringing the inventories to their present location and condition, approximated where exact figures are not available. Net realisable value is the expected sale price in your normal selling market, less the estimated further costs needed to make the stock saleable.

So a case of stock you paid 40 for, that cost 6 to ship in, and that you would now have to discount to 38 to move, is valued at the lower of 46 and 38, which is 38. Net realisable value falls below cost through deterioration, obsolescence or falling demand, and that write-down is exactly what a stock take is for.

Where a model helps: applying that rule line by line across 400 items without missing the handful where NRV has fallen below cost.

text
For each line, I will give you: quantity counted, unit cost
(purchase + inbound shipping), and current selling price.

Compute:
- cost per unit
- net realisable value per unit, taking selling price less the
  further costs I specify below
- the valuation per unit as the LOWER of those two
- total value per line and the grand total
- a separate list of every line where NRV is below cost, with
  the write-down amount

Further costs to deduct from selling price: [state yours, e.g.
3% card fees, 2.50 packing and postage for online lines, 0 for
over-the-counter].

Flag any line where I have not given you enough to compute NRV
rather than guessing it.

That last instruction is the one to keep. The write-down list is the output your accountant wants, and a guessed NRV on a line with missing data turns a defensible figure into an undefendable one. Keep a note of which basis you used and apply it consistently: the manual is clear that the basis should be consistent, and that you should tell HMRC if you change it.

What stays manual when you use AI for a stock take

Three things, said plainly, because the pitch for AI inventory tools tends to blur them.

  • The count itself. There is no substitute for counting it and recording what was counted and how it was valued. A system quantity is a claim, not a measurement.

  • The second count on high-value lines. Count your top-value items twice, by two people where you can. The triage above makes the case: those lines carry most of the money.

  • The judgement on obsolescence. Whether that stock will actually sell at the price you hope is a commercial call about your market, and a model has no information about your market beyond what you tell it.

A stock take is a backward-looking count. The forward-looking version, deciding how much to order before a busy period, is a different job with different inputs, and we covered it separately in planning stock for a busy week with AI. The count you have just finished is one of the better inputs to it.

Once the count is done and valued, the number feeds straight into your cash picture, and that is where it earns its keep: see using AI to forecast cash flow for a small business and our AI for small business pillar for the rest of the finance admin worth automating.

Frequently asked questions

Can AI count stock from a photo of a shelf?

Poorly, and not reliably enough to put in your accounts. It will miscount occluded items, confuse similar packaging and give you a number with no indication of its own uncertainty. Useful as a prompt for a human recount, not as the count.

How often should a small business do a stock take?

A full count at least once a year for your accounts, plus rolling counts on your highest-value lines more often. The triage above tells you which lines those are, which makes a monthly count of twelve items a realistic habit rather than a plan you abandon.

What variance is acceptable?

It depends on sector and item, so the better question is whether a variance is explainable. A line you can account for is fine at a larger number than a line you cannot explain at a small one. Rank by value, investigate what you cannot explain, adjust the rest.

Which valuation basis should I use?

For most small businesses, the lower of cost or net realisable value. HMRC's manual names only that and mark to market as acceptable for tax, and mark to market is for a narrow set of traders. Apply the same basis each year and tell HMRC if you change it.

Can AI do the accounting adjustment too?

It can tell you the figures and the journal shape, and your bookkeeping system or accountant should post it. Keep the valuation working papers either way: the count sheet, the variance list and the write-down list are what make the number defensible later. For related finance tidying see using AI to categorise business expenses.

How did this land?

About the author

Steve Jefferson
Steve Jefferson

Developer Advocate

Steve builds something with Swarmz every week and writes up what worked, what broke, and what he'd do differently. Tutorials and hands-on guides are his lane.

Share

Get the next post in your inbox

One email a month. Product updates, engineering posts, and the best of Built with Swarmz.

I agree to receive emails about AI building tips and Swarmz product news. Unsubscribe any time.