The Maths Behind the Predictions

For a more detailed rundown of maths that power the demand planner, check out our blog post Some Simple Math To Improve Your Stock Ordering.

You’ll notice I haven’t actually explained how the demand planner “works” from a mathematical perspective. Well, that’s partially because it’s only semi-relevant to you, as a user. Of course, understanding the mechanics of the calculations will help you get your head around the predictions it makes and potentially understand any odd recommendations, but you don’t need all your team to fully understand the algorithms at work.

The core calculation the demand planner makes is based on the “weekly average sales” of each item. If you want to stop there, that’s a good place to leave your understanding. So, if you sell, on average, 10 units a week of SKU_A and have “stock cover” set to the default 4 (one month), the demand planner will aim for a stock level of at least 40 after placing the order. That's a big simplification - the demand planner will actually tend to encourage you to order more in order to be more confident of being able to fulfil orders if demand is higher than normal. More on that in a minute.

I say “aim for a stock level of 40” rather than “order 40” because the demand planner, as explained previously, takes into account how much of the product you already have on hand, how much is already on order from the supplier and how much is on back order from customers. Hence it might be the case that you already have 50 available, in which case you’d have more than enough and no order would be necessary. That’s one of the nice aspects of having all your stock data in one place!

Of course, there’s more to the calculation than “average weekly sales”, but that’s a good starting point for understanding the algorithm. We also take into account an element of “variability” to adjust the order recommendation: for example, the average sales per week might be 10, but what if this is made up of some weeks where 100 are sold and some weeks where none are sold - this will significantly impact the stock you need to have on hand in order to be confident of fulfilling orders.

Confidence is actually the key word here. The demand planner uses a statistical concept called “Confidence Intervals” in order to calculate a stock recommendation for which is can be “pretty confident” you’ll have enough stock to get through the stock cover period you’ve set. Of course, it can never be 100% confident - for that you’d have to order 20 times more stock than you really need, so it would be a useless approach. But “pretty confident” is normally a good balance between not overstocking too much and being able to fulfil your orders.

The exact level of confidence used by the demand planner is influenced by the 'strategy you choose' (see above). For example, if you choose 'Avoid Stockouts Aggressively', the system will use a 95% confidence interval, which means a statistical chance of running out of stock of 2.5%. Unfortunately, the more aggressive the strategy you use (in terms of avoiding stockouts), the more stock you'll need to order. Therefore, if capital outlay is more important to you than keeping everything in stock, choose a less aggressive strategy like 'Balanced overstock' or 'Minimise Outlay' (which will actually deliberately underorder).

At the end of the day though, it’s just a guess, so you should add in some human expertise. Just understand that the demand planner will encourage you to order more than you need to cover average sales, because it tries to help you maintain 100% stock coverage and avoid stock outages.

If you want to be more conservative in your ordering and are less concerned about stock outages, you should adjust your ordering downwards.

Last updated