Inventory, Part II: Calculating Safety Stock Correctly

In our last blog we stated that there is no simple formula for calculating the safety stock required for a given fill rate if the reorder quantity is greater than one.  In this blog, I’ll provide detail on correct safety stock calculation and some considerations when trying to optimize safety stock for a set of parts.

First, I decided to go to the “source of all knowledge” (i.e., the Internet) and see what I could find.  At Factory Physics Inc., we have long held that management, and industry in general, is often unaware of the operations science that governs operations. This ignorance manifests itself in great confusion about such things as inventory and safety stock calculations. My internet search immediately provided evidence supporting this idea.

The first result that came up for a Google search of “formula for safety stock” was the link, which describes the method shown below:

“The definition of standard deviation is a quantity calculated to indicate the extent of deviation for a group as a whole.

Which, in layman’s terms, means you:

  1. Find the average of a set of data
  2. Calculate the sum of the average and the data set
  3. Take the sum and divide it by the sample proportion to get the variance
  4. Add the variance to the average

The sum amount will be your standard deviation. With this definition in mind, the formula for calculating safety stock is given by the equation.


Z is the desired service level, σLT is the standard deviation of lead time and Davg is average demand.

This is quite remarkable.  After step 1, the next steps become completely bizarre.  “Calculate the sum of the average and the data set.”  What does this mean?  Should it be “sum of the average”?  What would that mean?  Then “divide it by the sample proportion to get the variance.”  I taught statistics for more than 15 years at universities like Georgia Tech and Northwestern and have never seen anything like this.  It gets worse, “Add the variance to the average.”  Variance is the dimension squared while average is just the dimension.  That would be like adding apples and oranges.  Even if they got the variance right, the formula for safety stock is missing the variability in demand—usually the larger component of variability.

Wikipedia does a better job of describing the issues (and cites Factory Physics, 3rd Edition) and points out that there is no single formula but still does not give a useful means of computing safety stock.  Following is a short background discussion of inventory mechanics with leads to a useful method for accurately calculating safety stock.

Safety Stock Calculation

To properly control inventory, companies should monitor the inventory position (“IP”), and not just on-hand inventory.  The inventory position is the net inventory (on hand – backorders) plus the pipeline inventory (anything on order). The inventory position should always be above the reorder point (“ROP”) and not more than the reorder point plus the reorder quantity (“ROQ”),



A couple of qualifications, one, we are using ROP and ROQ policies here for simplicity of explanation. Your system does not have to use a ROP, ROQ policy for your parts—the policies can be translated to any other policy format as long as your system is using the correct mathematics for inventory control, this is not always the case. Two, if policies are calculated optimally considering variability in demand and supply AND inventory position is maintained between the upper and lower control limits, you will achieve the targeted service level with the minimum amount of average on-hand inventory investment. See section on Inventory Compliance Monitor on page 235 in Factory Physics for Managers for more description of this inventory control approach.

As described in our previous blog, the usual “z-formula” is correct if ROQ = 1.  When ROQ is greater than one, the z-formula overestimates safety stock but it is correct for Type I Service (also known as “Cycle Service”) which is the probability that there are zero stockouts between replenishments.  When there is a large ROQ, it is very unlikely that there will be a stockout soon after replenishment.  Indeed, the only stockouts will mostly occur just before the next replenishment occurs (see the chart below).

In this example, the average demand is 5 units per day and the lead time is exactly 10 days with a ROP of 50 units so that the safety stock is zero (ROP = avg demand X lead time + safety stock).  The Type I fill rate (“SI”) is around 50% (1/2 of the cycles stock out).  But the customer fill rate (“SC

“) is 93% with relatively few days being stocked out.  Type I fill rates are computed as the probability of replenishment time demand not exceeding the ROP,


Eq 1

where X is replenishment time demand.

We can take advantage of the fact that stockouts only occur near the end of the replenishment time by considering, not cycle fill rates but customer fill rates.  For a given customer, it depends on where what the inventory position is when they show up as demand.  If the IP is high, it is likely that their demand will be filled but when the demand is low it will be less likely.  Since the IP is mostly independent of when the customer shows up, we need only average the fill rates for all of the different inventory positions.  So, the customer fill rate or service level will be,

Eq 2

Where i is the inventory position. For more description see p. 127, Estimating Fill Rate, in Factory Physics for Managers.

There are other ways to compute this quantity.  For instance, the standard loss formula would allow one to compute Eq 2 by subtracting only two terms (instead of adding Q terms) but these are usually not available in spreadsheet packages.

This tells us what the customer service level will be given the ROP and ROQ.  But we want to find the ROP for a given customer service level.  This requires an algorithm and some caution!

Finding the Right Safety Stock

The algorithm is pretty simple.

Some care must be taken in choosing a good probability distribution for the calculation of P{Xi}. For low variability situations (i.e., when the standard deviation is less than 1/3 of the mean), the normal distribution offers a good approximation and is easy to use in most spreadsheet programs.  But, in our experience, the standard deviation of real demand is often on the order of or even larger than the mean demand.  Because the normal distribution can take on negative values a normal distribution will not do whenever the variability is high as it would have a significant probability of there being a negative demand (and that is not going to happen).

Likewise, the Poisson distribution which only has one parameter (the mean) will not work whenever there is high demand.  Since the standard deviation of the Poisson is the square root of the mean, whenever the demand is high the standard deviation is often relatively low.  For instance, if the mean demand were 1000 the standard deviation would be only around 32 which is only 3% of the mean.  Real demand data very often has much more variability than this and, when combined with the variability in the replenishment times, the Poisson would be way too low to be accurate.  There are other distributions that can be used but these require some knowledge of advanced statistics.

Our recommendation is to use the normal formula whenever the standard deviation of replenishment time demand is significantly less than its mean.  Another alternative is to simulate the demand and use trial and error to set safety stocks.  If there are many items, however, this could take a long time.  If you have many items and highly variable demand, an inventory optimization software package such as Factory Physics Inc.’s CSUITE Inventory Optimizer is a good investment.  However, be careful when purchasing inventory optimization software.  Many of the errors described above have been incorporated into other software packages that look good but produce bad results.

If you want to make improvements now, give us a call at 979.846.7828. We can train your people in practical operations science to ensure improvements last. We have worked with leading companies the world over to create and implement breakthrough operations strategies. We accelerate results using your existing efforts, such as Lean or Six Sigma, and your existing information technology. Call us if you want better results quickly or send an email to

Mark L. Spearman is the founder, president and chief executive officer of Factory Physics Inc. and a trusted advisor to Fortune 1000 company executives around the world.  Mark is the thought leader in applying the breakthrough concepts and applications of Factory Physics® principles to unite and accelerate operations science efforts for designing and implementing successful management strategies. Mark has worked extensively with executives to successfully improve on-time delivery and profitability for manufacturing supply chains.  Mark co-authored the award-winning book Factory Physics: The Foundations of Manufacturing Management.  The book has led a paradigm shift in the approach companies take in managing their operations. Mark is also co-author of McGraw Hill’s lead business title, Factory Physics for Managers.