software lab

Inventory forecasting techniques, tested on one Shopify product

updated: 2026-11-23

Inventory forecasting is estimating how many units you will sell in the coming weeks, so you can order enough before you run out.

There are seven common techniques. Below, each one in a line, then all of them tested on the same product. The test shows the one thing to remember: clean data matters more than a clever technique.

The techniques at a glance

Technique What it does Weak spot
Simple average Everything sold ÷ the time it took Slow to notice change
Moving average Average of the last few weeks Short ones jump, long ones lag
Weighted average Recent weeks count more Still fooled by stockouts and promotions
Exponential smoothing Each week nudges the forecast Hard to see where the number comes from
Seasonality Adjusts for the time of year Needs a year of sales
Trend Adjusts for growth or decline Easy to count growth twice
Judgement Your own call Only works for a few products

The test: one product, eight weeks

A Shopify store sells a linen tote bag. A normal week sells about 23. In the last eight weeks it had a promotion, then sold out:

Week Sold In stock Note
1 21 7 days
2 23 7 days
3 48 7 days Promotion
4 22 7 days
5 24 7 days
6 10 3 days Sold out
7 0 0 days Sold out
8 17 5 days Back in stock

How many will it sell next week? Each technique's answer:

  • Simple average, all 8 weeks 21
  • Moving average, last 4 weeks 13
  • Weighted average, last 4 weeks 11
  • Exponential smoothing, 30% 16
  • Moving average, last 4 weeks, days in stock only 24
A normal week: about 23

The smarter techniques did worse. They trust the recent weeks most, and the recent weeks are the sold-out ones. Order 11 bags and you run out again.

The winner is the plain moving average, divided by the days the bag was in stock instead of by calendar days: 51 bags in 15 days is 3.4 a day, 24 a week. Same technique, clean data.

Clean the data first

Before any technique, fix these three things:

1Days in stockDivide by the days the product could be bought. A sold-out week is not a slow week.
2One-off spikesCap days that sold far more than usual, so one promotion doesn't set the pace.
3ReturnsSubtract units returned. A returned sale was not real demand.

The techniques, one by one

Simple average

Everything sold, divided by the days it took. Good for a steady product. Slow to notice change: a product that doubled its sales last month still looks like last year.

Moving average

The same, but only for the last few weeks. Fewer weeks react faster but jump around. More weeks are steadier but slower. Four weeks is a common choice.

Weighted moving average

A moving average where recent weeks count more. For example, the last four weeks at 40%, 30%, 20% and 10%, newest first.

Exponential smoothing

Each week, move the forecast part of the way toward what really sold. Forecast 20, sold 30, move 30% of the way: the new forecast is 23. It works, but it is hard to explain where a number came from.

Seasonality

Some products sell more in some months. A seasonal index says how much: 1.5 in December means December sells 50% more than an average month. Multiply the forecast by it. You need a full year of sales to know it.

Trend

Is the product growing? Compare the last 4 weeks with the last 13. If the recent weeks sell 30% more, it is growing. But a weighted average already leans on recent weeks, so adding a trend on top counts the growth twice.

Judgement

A new product or a planned promotion has no history. Use what you know: a similar product's sales, the size of the campaign. Fine for a few products, impossible for a whole catalogue.

What MDF Inventory Forecasting uses

A weighted average over days in stock, on cleaned data:

Three windowsThe last 7, 28 and 90 days, weighted 50%, 30% and 20%. Each one divided by its days in stock.
Spikes cappedNo day counts for more than 3 times a normal selling day.
Returns subtractedReturned units come off the day they were sold.
SeasonalityA monthly index per product type, once there are 12 months of sales.
Trend shownYou see it, but it isn't added on top. The 7-day window already leans recent.
New variantsNo sales yet? They borrow the typical speed of the product's other variants.

Then it turns the forecast into a reorder point and an order quantity, using your supplier's lead time. The reorder point guide covers that part, with a calculator.

Which technique should you use?

  1. A few steady products: a moving average over days in stock, in a spreadsheet.
  2. Seasonal products: add a seasonal index once you have a year of sales.
  3. Hundreds of variants: the spreadsheet becomes the job. That is when an app pays for itself.

FAQ

What are the main inventory forecasting techniques?

Two families. Quantitative ones work from past sales: averages, moving and weighted averages, exponential smoothing, seasonality and trend. Qualitative ones work from judgement: launches, promotions and new products.

Which forecasting technique is the most accurate?

The one fed with clean data. In the test above, a plain moving average over days in stock beat every fancier technique run on raw sales. With clean data, a weighted average plus seasonality is enough for most stores.

How much sales history do I need?

About four weeks in stock for a reliable rate. A full year to see the season. With less, add your own judgement.

Can I forecast inventory in Excel?

Yes. Export units sold per variant, count the days each one was sold out, and divide. It works for tens of products. Past that, the exports and counting take longer than the ordering.