Inventory forecasting methods for small online stores
For a small online store, an inventory forecast answers one practical question: how many units of each product will you sell between now and the end of the period the next delivery has to cover? Reorder points, order quantities and purchase orders are all built on that number.
You don't need machine learning to get it reasonably right. You need clean sales history, a method that suits each kind of product, and a check against what actually sold. This guide covers the three methods that do most of the work in a small store (moving average, trend and seasonality), the cleaning step that matters more than any method, and how to test a forecast on past weeks.
All of it can be done in a spreadsheet for a few dozen products. For a whole catalogue, DemandPilot is our WooCommerce inventory forecasting tool; the end of this guide says what it does.
What you're actually forecasting
- Units, not revenue. You buy units, and a revenue forecast can't tell you how many of a size or colour to reorder.
- Per SKU, down to the variant. A T-shirt in five sizes is five forecasts, because you reorder sizes.
- Over a specific window: the supplier's lead time plus the days the delivery must last. For a supplier that takes 10 days and that you order from every two weeks, that's about 24 days.
First, clean the sales history
The data you feed a method matters more than the method. Four things to fix:
- Out-of-stock days. A day with no sales because the product wasn't there isn't a day with no demand, so divide units sold by in-stock days, not calendar days. Example: 60 units in 30 days looks like 2 a day; if the product was out of stock for 10 of those days, the real rate is 60 ÷ 20 = 3 a day.
- Refunds and cancellations. Take them off, or you'll forecast sales that came back.
- One-offs. A bulk order from a business customer, a test order, a duplicate: leave them out, or one order sets your buying for months.
- Promotions. Mark them. A sale week inflates both the rate and the trend.
In a WooCommerce store, the orders hold the sales, refunds included, but not stock history: WooCommerce keeps each product's current stock level, not a day-by-day record. To know which days a product was out of stock, capture stock daily from now on, or rebuild the past from orders and deliveries.
Method 1: moving average
Daily rate = units sold in the last N in-stock days ÷ N
The simplest forecast: the recent pace carries on. The one real decision is the window, N.
- Short, around 28 days: reacts quickly, but one busy week moves it a lot.
- Long, around 90 days: steady, but slow to notice that a product is taking off or dying.
A common middle way gives recent weeks more weight. Exponential smoothing does it with one setting, α (alpha), between 0 and 1:
New forecast = α × latest actual + (1 − α) × previous forecast
With α = 0.2, the latest week counts for 20% and the earlier weeks share the other 80%, less the older they are. Both versions suit steady sellers.
Method 2: trend
When a product is clearly rising or falling, a moving average lags behind. Add the trend:
Forecast = recent rate + trend × periods ahead
Example: a product sold 2 a day two months ago, 3 a day last month and 4 a day this month. The trend is +1 a day per month. A three-month average says 3 a day; the trend says next month will be nearer 5.
Two cautions:
- Damp it. Trends don't last: project a smaller step for each month ahead, and cap it.
- Check the cause. A rise just after a stock-out is often the product simply coming back; a fall after a promotion is the promotion ending. Neither will continue.
Method 3: seasonality
If the calendar drives demand (gifts, summer goods, back to school, Black Friday), the recent pace is the wrong guide to the coming months. A seasonal index corrects it:
Seasonal index of a month = that month's sales ÷ average monthly sales
Forecast for a future month = base rate × that month's index
The base rate is the recent pace with its own season taken out: recent sales divided by the index of the months they came from.
Example: a product averages 100 units a month over the year, and last December it sold 180, so December's index is 1.8. In October it's selling 2.7 a day and October's index is 0.9, so its base rate is 2.7 ÷ 0.9 = 3 a day. The forecast for December is 3 × 1.8 = 5.4 a day, twice October's pace.
Three cautions:
- It needs history: at least one full year, better two, so that one odd month doesn't set the index.
- Growth can look like season. If your store grew through the year, the later months look strong for the wrong reason. Compare each month with the average of the twelve months around it, not with the calendar year's total.
- New products have no season of their own. Borrow the index of their category or of a similar product.
What about advanced models?
Statistical models such as ARIMA or Holt-Winters (which combines the three ideas above in one model), and machine-learning models, can do better. In a small store the gain is usually modest: they need long histories and steady sales per SKU, and much of a small catalogue sells a few units a week.
Those slow sellers need their own approach. A rate of 0.1 a day (2 units every 20 days) means little day to day, so forecast them per month or keep a fixed minimum on the shelf. Croston's method, which forecasts the size of each sale and the gap between sales separately, is the classic tool for this kind of demand.
Which method for which product
| Product | Method | History needed |
|---|---|---|
| Steady seller | Moving average over in-stock days | 2 to 3 months |
| Rising or falling | Average plus a damped trend | 3 months or more |
| Seasonal | Base rate × seasonal index | 1 to 2 full years |
| Slow seller | Monthly rate or a fixed minimum | Any |
| New product | A similar product's history | None of its own |
How to test a forecast on past weeks
A forecast you never check is a guess with a formula. The test: go back to a Monday in the past, forecast the next four weeks using only what you knew that Monday, and compare with what actually sold. Repeat for many Mondays. Forecasters call this evaluation on a rolling origin; the open textbook Forecasting: Principles and Practice explains it in its section on time series cross-validation.
Two numbers tell you most of what you need:
- Bias: (total forecast − total actual) ÷ total actual. Positive means you over-forecast and will end up with overstock; negative means you'll run out.
- WAPE (weighted absolute percentage error): the sum of the errors, ignoring their sign, ÷ total actual sales. How far off you are, in either direction.
Worked example
Four weeks of one product, with illustrative numbers:
| Week | Actual | Method A | Method B |
|---|---|---|---|
| 1 | 40 | 50 | 60 |
| 2 | 60 | 50 | 60 |
| 3 | 45 | 50 | 60 |
| 4 | 55 | 50 | 60 |
| Total | 200 | 200 | 240 |
- Method A: errors of 10 + 10 + 5 + 5 = 30 units. WAPE = 30 ÷ 200 = 15%. Bias = 0%.
- Method B: errors of 20 + 0 + 15 + 5 = 40 units. WAPE = 40 ÷ 200 = 20%. Bias = 40 ÷ 200 = +20%.
Method B is spot on in week 2, but over the month it forecasts a fifth more than sold, and buying on it would leave that fifth on the shelf. Method A is never exact, but its misses cancel out.
Two rules keep the test fair:
- Leave out weeks when the product was out of stock. Sales in those weeks weren't demand, so they'd mark a good forecast as wrong.
- Compare with a simple benchmark, such as the same weeks last year, or the pace of the last four weeks. If your method can't beat it, use the benchmark.
From forecast to purchase
To act on a forecast, turn the daily rate into a date and a quantity: when the stock runs out, the last day to order so the delivery arrives first, and how many units cover the period after it. The reorder point formula guide works through both with an example.
How DemandPilot forecasts
DemandPilot reads your WooCommerce catalogue, orders and stock with a read-only REST key. Nothing is installed in WordPress, and it never changes your shop's stock.
- Each night it measures each SKU's rate of sale on in-stock days only, so out-of-stock days don't look like falling demand. It uses recent sales and their trend, and seasonal peaks when there is history.
- It forecasts over the supplier's lead time plus the days of stock you want, and projects stock at the end of that period: today's stock, minus forecast sales, plus orders arriving on their expected day. The shortfall becomes the suggested quantity, raised to the supplier's minimum order quantity and whole case packs.
- A weekly check shows how it would have forecast past weeks, using only what it knew each Monday.
It's priced per shop, by quote.
Frequently asked questions
What is the best inventory forecasting method for a small store?
For most products, a moving average over in-stock days; add a trend for products clearly rising or falling, and a seasonal index for products that follow the calendar. For any one product, the best method is the one that wins when tested on past weeks.
Can I forecast inventory in a spreadsheet?
Yes, for a few dozen products. Beyond that it gets hard to keep up: every SKU needs its in-stock days, a method that suits it and a weekly refresh.
How do I forecast a product with no sales history?
Start from a similar product's first weeks, order cautiously, and switch to the new product's own sales once it has a few weeks of them.
How often should I update the forecast?
Before every order. For most small stores that means weekly, with sales and stock no more than a day old.