In this article we address the widespread misuse of the safety stock calculation and show this is mathematically unsound and unfit for real-world supply chains. Rather than being a good first stop the use of the safety stock formulas is little better than guessing. Finally, we propose a method of using simulated supply chains to find the optimal parameters from simulations of all the potential configurations.

Operations and financial managers and planners are often tasked with optimising supply chains. Some planners use gut feelings to set safety stock levels, while others base them on a portion of cycle stock level – 10 or 20 percent, for example. Such techniques generally result in poor performance and rarely are fit for purpose. Some supply chain managers, realising this is unsatisfactory, instead decided to put their faith in the use of simple safety stock algorithms. There are a number of variants in their operation and use but essentially, they all use the same assumptions (see the box at the end of this article for a common expression of this if you are interested in the mathematical details).

At first glance the formula looks simple and convenient with just three principle variables in the equations: a service level, such as 95%, the mean demand and its variation; and the mean lead time and its variation. Most of the algorithms use these variables – they are simple to setup and easy to calculate in a spreadsheet. However, all algorithms are vulnerable to risks, such as biased logic or flawed assumptions. The simple demand and lead time calculation is riddled with such flaws and is not representative of real-world supply chains; consequently it is rarely better than guessing.

Let’s focus on why it gets it so wrong. Here is a shortlist of the three biggest problems illustrated with real items in real supply chains:

All simple safety stock calculations require you to calculate the average and variation of the demand and lead time: more formally known as the **mean and standard deviation**. These parameters define what is known as a normal distribution. As any supply chain professional that has dealt with actual data will tell you, real data has trends, intermittency and sometimes seasonal patterns. Further, your demand and lead time cannot be less than zero but normal distributions can, and do, include negatives. This all makes the normal distribution a bad fit for demand and lead time data. Let’s examine this with real data.

The figure below is a histogram of real monthly sales data for an item. In each month most of the sales peak around 2600 units but sometimes there are sales as high as 15,000 units. The blue line is the best fitting normal distribution, in this case the blue line does not represent the data at all – the peak is in the wrong place and the distribution is too wide. The algorithms best guess is around 6000 whereas the data shows a peak around 2800. In addition, the algorithm predicts negative sales and a huge spread of variability. In this case the mean and deviation are overestimated by a factor of two – leading to a large excess of safety stock. For seasonal demand (for example high demand in summer, low in winter), the formula will consistently produce stock outs in summer and waste in winter.

*In this example the fit was larger than the peak in the data. Sometimes the reverse is true. What this means is that the safety stock can be either underestimated or overestimated depending on the nature of the trends, intermittency and potential seasonality of the data. Consequently, you have no way of knowing if you have too much or too little safety stock.*

We can investigate this problem in an entirely different way. Rather than looking at the problem one product at a time we can examine entire datasets to see how poor the situation really is. Taking some real datasets and the ten most common distributions (including the normal) one can do a simple experiment. Using an unbiased search method we can let the data find the best distribution. One can then ask the question – how often does my real data choose the normal distribution as the best fit? In this way, by letting the data speak for itself, if the normal is a good distribution than we would expect it would commonly be the best fit, perhaps as much as 40-50% of the time. As an example, running the experiment with two real datasets, one with a decade of monthly data, and another larger one with just two years of data. The results are striking. The normal distribution is the best fitting distribution around 4% of the time. In short: the normal assumption is a bad one both theoretically and on real world data, and it really matters.

We spoke of why assumptions around the demand and lead time lead to incorrect estimates of safety stock. We now address the issues of the z-factor – a proxy factor than represents service levels (see the box at the end of the article for more details). The higher the score the larger the overall safety stock will be and the less likely you are to have a stockout.

In real supply chain situations, your service level is a quantity-based fill rate and the stockout quantity is important: a big stockout is worse than a small one. The use of a z score assumes each stockout is equally bad regardless of its size. Let’s look at an example to illustrate this problem. For an item that has 1000 items delivered over a month but 1 item was not delivered on 5 days – we can say that for this item there was a 99.5% fill rate. Suppose your target is 95%, then you would appear to be doing really well. However, using the z factor, it will see that as 5 stockouts in 30 days which corresponds to an 83% probability of no stockouts. This will be seen as a failure and may motivate higher stock levels. Raising the ‘apparent’ 83% to 95% will increase the inventory by 60% – this is a massive increase for logic that is flawed and an entirely unjustified increase in safety stock. There is one further strangeness of this factor. As you can see in the plot below the score increases dramatically after service rates of around 95%, consequently changing your service rates from 95% to 99.9% will practically nearly double your inventory – this is a big change for what is quite an arbitrary number.

*Service rate and z coefficient*

The order frequency does not play a part in the safety stock equations yet common sense would suggest that you would need more inventory to achieve a consistent monthly service level than a daily one. This is also where the concept of confidence would really play a part – the safety stock numbers might feasibly be similar for different order frequencies but the level of confidence would be dramatically different. Simple formulas of safety stock, however, exclude the order frequency and its confidence entirely.

In addition to the order frequency the planner is often faced with a number of reorder-quantity constraints such as the minimum order quantities (MOQ): a factor that is also not part of simple formulas. The MOQs play an important role in the replenishment cycles and have an effect on the amount of safety stock that will be needed. None of the simple safety stock formulas have this. The replenishment method itself affects both the optimal safety stock and the parameters that achieve it. Even within one replenishment strategy such as reorder point (ROP) replenishment the adjustment of various decision variables and supply chain constraints will mean the oversimplistic safety stock calculation will be ill-fitting. It simply isn’t parametrised to change as your supply chain strategy changes.

Supply chains are often organised in many different ways. One can have a single-echelon system, where a single distribution centre acts as a central repository between the supplier and the customer. However, oftentimes, even for small companies, the supply chain is organised as a multi-echelon system – one that relies on layers of suppliers across multiple distribution centres organised in layers or echelons. Simple algorithms do not take account of this fact at all: they don’t have a mechanism to treat safety stock from a comprehensive or globalized perspective and consequently have no visibility of the inventory stored throughout the supply chain.

As outlined above configuring a supply chain planning system correctly is a complex task and a crucial one. No matter the capability of the planning software being used, failure to set the right parameters will result in the wrong plans being generated and inefficiencies propagated across the network as a matter of course. There is no simple formula for calculating safety stock and optimising the parameters in real-world supply chains – instead there is a need for a system that works with real data and takes into account the constraints posed by each organisation’s supply chain strategies.

Our proprietary **Cognitive Self-Modelling Supply Chain** considers the millions of options that are available in real time and identifies a costed and optimised solution that is the best fit for your organisation’s specific strategic needs. It does not replace the planning system or the planner. It is designed to work with your existing system, retrieving data from it to find the best solution across multiple dimensions of cost and service level.

Orchestrated Intelligence enables organisations to consistently achieve the perfect Supply Chain Planning set-up to meet their strategic goals and leverage benefit. It achieves this by combining multi-objective mathematical modelling techniques with the power of Artificial Intelligence to find and maintain the optimal network configuration to maximise service whilst minimising cost.

The calculations vary but essentially, they are based on looking at the demand variability and lead time variability separately then combining them. You will notice that sometimes the total safety stock is combined indifferent ways depending on whether demand and lead time variability are independent—that is, they are influenced by different factors. Let’s look at each term in the equation first.

If the only data available is demand variability and the data are normally distributed, a demand based safety stock can be calculated. Logically speaking there are three factors to consider here.Frst a factor that accounts for the uncertainty in demand: σD. The second term is a lead time factor that accounts for the fact that the demand period most likely does not exactly match the lead time period – this makes logical sense if the lead time is super long, this will affect the demand variability and it needs to be scaled accordingly. Finally, there is a z-score factor that gives you some service level assurance. This latter factor is non-intuitive but can be seen as a mathematically consistent way to ramp up and down safety stock according to how sure you need to be. The higher the score the less likely you are to have a stock out. For example, to satisfy demand with a 95 percent confidence level, according to statistical analysis, it’s necessary to carry extra inventory equal to z=1.65 of demand variability.

As a formula this is:

〖SS〗_D= z_α×√(E(L)) × σ_D

*SS**D* is the required level of safety stock considering demand variability, *z*α is the service level at a particular value (technically it is inverse distribution function of a standard normal distribution) and *E*(L) and σ*D* are the mean and standard deviation of lead time and demand respectively.

The previous equation assumed demand was the main source of variability. Instead if lead time variability is a concern then the factor safety stock equation is:

〖SS〗_L= z_α× E(D)× σ_L

*E*(D) and σ*L* are the mean and standard deviation of demand and lead time respectively and *z**α* is as before.

If demand and lead time variability data are available, normally distributed and are independent, they can be either be combined to give a lower total safety stock than the sum of the two individual calculations. In this case, the combined safety stock equation becomes:

SS= z_α×√(E(L)σ_D^2+〖E(D)〗^2 ) σ_L^2

If the demand and lead time data are not independent then the demand and supply safety stock calculations are added together.

Thank you! Your submission has been received!

Oops! Something went wrong while submitting the form.