Moving Average Inventory Forecasting Explained
The moving average forecasting formula explained in plain English, with a worked example showing simple vs. weighted averages on real Shopify sales data.
The average daily sales figure behind a reorder point, five units a day for "Cedar & Fig, 250g," in this site's reorder point guide, has to come from somewhere. It comes from a moving average, whether anyone calls it that or not: average a stretch of recent sales and use that as the expected rate going forward. Naming the method properly is worth doing, because knowing where it stops being reliable changes how much you trust the number it hands you.
The formula
A simple moving average takes a fixed number of the most recent periods, averages them, and uses that average as the forecast for the period ahead:
Moving Average = (Sum of sales for the last N periods) ÷ N
N is the window: how many of the most recent periods you're including. Each period inside that window counts exactly the same as every other one: a sale from three weeks ago pulls the average just as hard as a sale from yesterday. That's the entire mechanism, and it's also the reason the method has a specific breaking point, covered further down.
A worked example
Take "Cedar & Fig, 250g" again. Over the last four weeks it sold 34, 33, 36, and 37 units, oldest week first.
Simple moving average, four-week window:
(34 + 33 + 36 + 37) ÷ 4 = 140 ÷ 4 = 35 units a week
Thirty-five units a week works out to five units a day, the exact figure the reorder point guide uses for the same candle. That's not a coincidence: a daily-sales average feeding a reorder point is a moving average by another name, just usually run over a longer window (that guide uses 90 days) than the four-week one here.
units/week, simple average
units/week, weighted average
week window used here
units/day, either method
Simple vs. weighted
A weighted moving average keeps the same basic idea but stops treating every week as equally informative. More recent periods get a bigger share of the result:
Weighted Moving Average = (Each period's sales × its weight, summed) ÷ (All the weights, summed)
A common way to set the weights: give the most recent period the highest number, then count down by one for each period further back. With a four-week window that's weights of 4, 3, 2, and 1, summing to 10.
Applied to the same four weeks, most recent week weighted 4×, oldest weighted 1×:
(4×37 + 3×36 + 2×33 + 1×34) ÷ 10 = (148 + 108 + 66 + 34) ÷ 10 = 356 ÷ 10 = 35.6 units a week
35.6 against 35 looks like rounding noise, but the direction matters. Sales climbed across those four weeks (34 → 33 → 36 → 37), and the weighted average reacted to that by landing higher than the simple average did. A simple moving average can't do that. It has no concept of "recent," only "inside the window."
The tradeoff is that the weighting scheme is a choice, not a derived number: there's no fixed rule for how steep it should be. Window size carries a matching tradeoff: a short window reacts fast to a genuine change in sales pace, but just as fast to a single unusual week (a bulk order, a stockout) and treats that noise as the new normal. A long window smooths the noise out but is slower to reflect a real shift, and keeps counting weeks that are, by the time you're using the number, already stale.
When it breaks down
A moving average, simple or weighted, assumes the recent past is a reasonable stand-in for the near future. That holds up well for a product selling at a fairly steady pace. It stops holding up in two specific situations.
The first is a real trend. If a product's sales are genuinely climbing or falling week over week, a moving average lags behind it. It's an average of the past, not a projection of where the line is heading. The mechanics estimate a level, not a trend, and a rising or falling series doesn't have a stable level to estimate.
The second is seasonality. A moving average has no way to represent "this month is always higher than the others." It just keeps averaging whatever periods sit inside the window, flattening a real seasonal peak into the same number as the slow months around it. If a product genuinely follows a calendar-based pattern, a plain moving average gets it wrong every time that pattern reasserts itself; forecasting seasonal demand needs a method built to model the pattern rather than smooth over it.
Recalculating the window by hand catches neither problem. Re-averaging the last few weeks every month is still just sliding the same flat window forward, not detecting that the ground underneath it has shifted. StockCue layers trend sensitivity, outlier exclusion, and seasonal indices on top of the same underlying velocity calculation, on every plan including Free, exactly the gap a flat moving average, run by hand, can't close on its own.
Frequently Asked Questions
What is the moving average formula for inventory forecasting?
A simple moving average forecasts the next period as the average of a fixed number of the most recent periods: add up sales for the last N periods and divide by N. Every period inside that window counts equally, so the method always forecasts a flat average of recent history rather than projecting a trend forward.
What's the difference between a simple and a weighted moving average?
A simple moving average gives every period in the window equal weight. A weighted moving average assigns more weight to the most recent periods, so it reacts a little faster when sales are climbing or falling, at the cost of the weighting scheme being a judgment call the analyst sets, not a number derived from the data itself.
Why does moving average forecasting struggle with seasonal products?
A moving average only knows how to average whatever periods happen to fall inside its window. It has no way to represent that a given month or week reliably runs higher or lower than the rest of the year. That flattens a real seasonal peak into the same forecast as the slow months around it, which is why a genuinely seasonal product needs a method built to model the pattern instead of smoothing over it.
STOCKCUE
A flat moving average can't see a trend or a season coming. StockCue adds trend sensitivity, outlier exclusion, and seasonal indices on top of the same underlying velocity math, on every plan including Free.
Install StockCue on Shopify →For how this method stacks up against exponential smoothing and reorder-point-based forecasting, see comparing forecasting methods, or the complete guide to Shopify inventory forecasting for the full process end to end.