How Small Shops Can Use AI to Forecast Stock and Reorder

Coding Liquids tutorial cover featuring Sagnik Bhattacharya for How Small Shops Can Use AI to Forecast Stock and Reorder.
Coding Liquids tutorial cover featuring Sagnik Bhattacharya for How Small Shops Can Use AI to Forecast Stock and Reorder.

Export 12 to 24 months of item-level sales from your till, then either use its built-in tools (Square's stock alerts and purchase orders, Shopify's Sidekick answering "What should I reorder?") or upload the file to ChatGPT or Claude to calculate weekly demand, seasonality and a reorder point for each line. You still approve every order.

A reorder point is the stock level at which you place the next order, so it arrives before you run out. For a small shop the forecast doesn't need to be clever; it needs to be applied every week to the lines that matter. That's why this ends with a 20-minute weekly routine rather than a sophisticated model, and starts with the one sum you should do by hand before trusting any tool with it.

Follow me on Instagram@sagnikteaches

Four questions a small-shop forecast has to answer

For each line you stock, the forecast is only useful if it answers:

Connect on LinkedInSagnik Bhattacharya
  1. How many do we sell in a normal week, and how does that change through the year?
  2. At what stock level do I reorder, given how long the supplier takes?
  3. How many do I order, once pack sizes, minimum order values and delivery days are taken into account?
  4. Which lines should I stop reordering altogether?

Not every line deserves the same attention. Rank your lines by sales value over the last year. The top group (call them A lines) gets a weekly look; the middle (B) a monthly one; the long tail of slow sellers (C) runs on a simple rule such as "reorder when the last one sells". In many shops a small share of lines makes most of the takings, but check your own ranking rather than assuming.

Subscribe on YouTube@codingliquids

Getting clean sales history out of your till

Most tills can export a "sales by item" report as a CSV file. Export it by week, with the item code (SKU), item name, quantity sold and net sales. Separately, export current stock on hand. Then add four columns yourself, once, in a spreadsheet: supplier, lead time in weeks, pack size, and cost price.

Before any forecasting, fix four traps that quietly ruin the numbers:

  • Stockouts hide demand. A week with zero sales because the shelf was empty looks exactly like a week nobody wanted it. Mark those weeks so they're left out of the averages. The effect is bigger than it looks: eight weeks of a line selling 12, 15, 0, 0, 14, 13, 16, 0 averages under 9 a week with the empty-shelf weeks included, and 14 without them. A forecast built on 9 reorders too little, runs out again, and records more zero weeks, so the error feeds itself.
  • One-off bulk orders inflate demand. A trade customer buying 40 of something once will make the forecast order 40 again. Flag them.
  • Variants. Decide whether you forecast each size or colour separately, or the product as a whole and split by past shares. For a work glove selling about 20 pairs a week across four sizes, forecasting each size alone gives noisy numbers (the XL might sell 0, 6 and 1 in three weeks). Forecasting the glove as a whole and splitting by last year's shares (say S 10%, M 35%, L 40%, XL 15%) gives about 2, 7, 8 and 3 a week, which is steadier and easier to check.
  • Renamed or re-coded items. If a product changed SKU when a supplier changed, merge the two histories or the forecast starts from zero.

The reorder-point sum, done once by hand

Doing one item by hand means you'll know whether the AI's numbers are sensible later. The formula:

Reorder point = average weekly sales x lead time in weeks + safety stock.

Safety stock is the extra you keep for weeks that sell more than average, or deliveries that arrive late. The simple version is a fixed amount of extra cover, say one week of sales. The slightly more careful version is 1.65 x the standard deviation of weekly sales (a measure of how much weeks vary) x the square root of the lead time in weeks. The 1.65 gives roughly a 95% chance of not running out while waiting for a delivery, if sales vary in a normal way.

Illustrative item: a hardware and garden shop sells boxes of exterior wood screws at an average of 14 a week, with weekly sales usually between about 8 and 20 (a standard deviation of 4). The wholesaler takes two weeks to deliver.

StepSumResult
Demand during the lead time14 x 228 boxes
Safety stock, simpleone week of sales14, giving a reorder point of 42
Safety stock, careful1.65 x 4 x the square root of 2about 10, giving a reorder point of 38
Order-up-to level, ordering every 2 weeks14 x (2 review + 2 lead) + 1066 boxes
Order today, with 40 on the shelf66 - 4026, rounded to the case size of 12: 24 or 36

Whether you round to 24 or 36 depends on shelf space, cash and how painful a stockout of that line is. That's a judgement the maths can inform but not make. For more on setting these levels line by line, using AI to set reorder points and prevent stockouts goes deeper.

Letting ChatGPT or Claude run it across the whole range

Once you trust the sum, have an AI assistant run it for every line. ChatGPT's data analysis writes and runs code on the file you upload, and OpenAI's help pages put the limit for spreadsheets and CSV files at roughly 50MB, far more than a small shop's sales history needs. Claude handles CSV analysis in a similar way.

Attached: weekly_sales.csv (sku, item, week_start, qty, net_sales,
stockout_week Y/N, bulk_order Y/N) and items.csv (sku, supplier,
lead_time_weeks, pack_size, cost, stock_on_hand).
For each SKU, excluding weeks where stockout_week or bulk_order = Y:
1. average weekly sales over the last 12 weeks, and over the same
   12 weeks last year
2. a seasonal adjustment = same period last year / last year's average
3. standard deviation of weekly sales (last 26 weeks)
4. safety stock = 1.65 x std dev x sqrt(lead_time_weeks)
5. reorder point = forecast weekly sales x lead time + safety stock
6. order-up-to level assuming I order every 2 weeks
7. suggested order = order-up-to minus stock on hand, rounded UP
   to pack size; 0 if stock is above the reorder point
Flag SKUs with fewer than 8 weeks of history or big recent changes.
Return one table sorted by supplier, and show the full working for
3 SKUs I can check by hand: [list 3 SKUs].

An illustrative slice of what comes back, from the same hardware and garden shop in late September:

ItemForecast a weekOn handReorder pointSuggested orderWhat to do with it
Exterior wood screws1452380Right: 52 is above the reorder point
30m garden hosepipe962436Wrong: last year's heatwave inflated the seasonal factor
Rock salt, 25 kg1430Fine today; add to the override list before the first frost
Masking tape, 25mm22103064Wrong: 64 isn't a multiple of the 24-roll case

Two rows are wrong in ways that are easy to spot if you know the shop. The hosepipe row applied a seasonal factor of about 3 because the same weeks last year had unusual heat; in late September nobody needs 36 hosepipes. Cap the seasonal adjustment (for example, "never more than 1.5 unless I confirm it") and the order drops to something sensible. The masking tape row ignored the "round UP to pack size" instruction, which models occasionally do when they tidy a table; the order should be 72. The rock salt row is correct on recent sales and blind to the first frost, which is what the override list is for.

Check the three worked SKUs against your hand calculation. Then compare the suggested orders for your top 20 lines with what you'd have ordered by instinct, and ask the model to explain any big differences. Usually the answer is a stockout week you forgot to flag or a supplier lead time that's out of date. If you'd rather work in a spreadsheet, the ChatGPT and Excel guide shows how to have it write the formulas instead of running the analysis itself. What to upload and check when AI analyses a sales spreadsheet covers the checking in more detail.

What your till system may already do

Before building a routine, check what you already pay for. As of September 2026:

  • Square: its inventory tools include daily alerts for low and out-of-stock items; vendor profiles, purchase orders and inventory insights come with the paid Plus and Premium plans. Square lists Plus at $49 a month; check whether that applies per location for you.
  • Shopify: the Stocky app is no longer available as of 31 August 2026. Purchase orders, transfers and stock adjustments now live in the Shopify admin, and Shopify's migration guide suggests asking its Sidekick assistant questions such as "What should I reorder?". Stocky's history doesn't move across automatically, so keep any purchase order CSV exports you made. For deeper forecasting, third-party apps such as Inventory Planner by Sage and Prediko fill the gap.
  • Other tills: look for reorder point or minimum stock fields on each item. If they exist, you don't need a weekly AI run at all.

That last point is the most useful decision rule here. If your till can hold a reorder point per item and alert you, use AI once a quarter to recalculate the points and type them in; the till does the daily watching. If it can't, the weekly routine below does the job. The best AI inventory tools for small retailers compares dedicated options if you're outgrowing both.

A 20-minute weekly reorder routine

  1. Monday morning: export last week's sales and current stock on hand.
  2. Upload both to the same chat or project that holds your standing prompt and item file, and run it.
  3. Review the A lines by hand. Accept suggestions for B and C lines unless flagged.
  4. Check your override list: events coming up, new lines, a weather change, anything customers have asked for that you don't stock.
  5. Raise purchase orders by supplier, respecting minimum order values and delivery days. When a supplier's suggested lines come to less than its minimum (say $180 against a $250 minimum), don't pad the order with whatever's on offer. Add lines from that supplier that are within about 20% of their reorder point, fastest sellers first, until you clear the minimum. You can put that rule in the standing prompt so the table arrives already topped up.
  6. Note last week's stockouts, including items customers asked for when the shelf was empty, so next week's file flags them.

The override list at step 4 works best as a short running note you add to during the week. An illustrative one for the garden shop:

  • Frost forecast from Thursday: double the rock salt and pipe lagging orders.
  • Garden club talk on the 14th; members usually buy spring bulbs afterwards: add 40 bags on top of the forecast.
  • New line, solar path lights: no history, so order 12 and borrow the pattern of the festoon lights at half their volume.
  • Three customers asked for 6mm masonry drill bits this week: trial a box of 10.
  • Trade customer's one-off order of 40 fence posts: flag as a bulk order in the file so it doesn't inflate next month's forecast.

Paste the note into the chat with the weekly files and ask the model to apply it, then check the affected rows. Five lines takes a minute to write and covers most of what a forecast can't know.

Every quarter, update lead times and pack sizes, and recalculate the seasonal adjustments. If you count stock by hand for the quarterly check, running a stocktake faster with a phone scanner cuts that job down.

Items AI forecasts badly, and what to do instead

  • New lines with under eight weeks of history. Borrow the pattern of a similar item, order small, reorder quickly.
  • Weather-driven lines: de-icer, fans, hosepipes. The forecast doesn't know next week's weather. Set a manual trigger ("first frost forecast: double de-icer order").
  • Anything tied to one-off events or a single big customer.
  • Trend and fashion lines, where last year's pattern says little about this year.
  • Lines that were often out of stock, because the history understates real demand. Increase them gradually and watch.
  • Very slow sellers (one or two a month). Don't forecast; use a fixed minimum and maximum.

More of these traps, and how to spot them early, are in why AI stock forecasts go wrong.

A hardware and garden shop stops ordering by eye

Illustrative figures. Say a hardware and garden shop stocks about 1,800 lines and orders from three wholesalers and a handful of direct suppliers. Today the owner walks the shelves and orders by eye, about four hours a week, and runs out of fast-selling lines several times a month.

  • Setup: one afternoon to export two years of sales, add supplier, lead time and pack size to the item file, and hand-check three items.
  • Ranking: the top 200 lines turn out to be most of the sales value. They become A lines, reviewed weekly.
  • Dead stock: the analysis finds 120 lines with no sales in six months, about $6,000 of stock at cost. They come off the reorder list and go into a clearance promotion.
  • Routine: the weekly ordering drops to about an hour and a half, including the override check and raising purchase orders.
  • Cost: ChatGPT Plus or Claude Pro at $20 a month, or the till's paid plan if it already does reorder alerts.

The saved two and a half hours a week is real but secondary. The main gains are fewer empty shelves on the lines customers come in for, and cash no longer tied up in stock that doesn't move.

Checking the forecast earned its keep

After eight to twelve weeks, compare with the months before:

  • Stockouts on A lines per month, from zero-stock days and your "customer asked for it" notes.
  • Overstock: the value of stock holding more than about 13 weeks of cover.
  • Forecast error on A lines: forecast weekly sales against actual. Consistently high on a line means it belongs on the override list. A quick way to read it: a line forecast at 14 a week that actually sells 9, 8, 10 and 9 is overestimating by about a third, week after week. That's not noise. Something changed (a competitor, a price rise, a product replaced by a newer version), and the history needs trimming to the recent weeks.
  • Time spent ordering each week.

If stockouts fell and overstock didn't rise, the routine is working. If both rose, the lead times or pack sizes in your item file are probably wrong, and that's the first thing to check.

Stock forecasting questions from shop owners

How much sales history does a small shop need to forecast stock?

Twelve months is the practical minimum, because it lets you see each season once. Twenty-four months is better for seasonal lines, since one unusual year can mislead. For lines with less than about eight weeks of history, don't forecast at all: order small quantities based on a similar product or the supplier's advice, and reorder quickly until a pattern appears.

Is it safe to upload my shop's sales data to ChatGPT?

Item-level sales without customer details aren't personal data, but they are commercially sensitive. On a personal plan, switch off the model-training setting in privacy settings, or use a business plan, which doesn't train on your content by default. Strip customer names, emails and loyalty numbers from the export before uploading. Supplier cost prices are fine to include if you're comfortable with the plan's privacy terms.

Do I need a paid AI plan for this?

For a one-off calculation, a free plan may be enough, but free plans have tight limits on file uploads and data analysis, and a weekly routine will hit them. ChatGPT Plus or Claude Pro at $20 a month handles a small shop's sales file comfortably. If your till system's paid plan already includes reorder alerts and purchase orders, you may only need the AI plan for the quarterly recalculation.

Further reads

Sources: Shopify Help Centre on migrating from Stocky (Stocky unavailable from 31 August 2026, purchase orders in Shopify admin, Sidekick reorder questions); Square inventory management page (daily stock alerts, purchase orders and vendor profiles on Plus and Premium); OpenAI help pages on data analysis and file uploads. Checked September 2026. Shop figures are illustrative.

Want a reorder routine built around your till and suppliers?

On a 1:1 call we'll look at your till export, set reorder points for the lines that matter most, and decide whether your till's own tools or an AI routine should do the weekly work.

Book a 1:1 call with me