## Definition

A company holds safety stock to mitigate the risk of running out of stock due to an unexpected increase in demand rate and/or lead time. In other words, it is an extra quantity of stock that can be used as a buffer to cover a higher demand rate until the next order arrives or if the delivery date shifts forward. The disadvantage of holding safety stock is an increase in carrying cost that can greatly affect business profit, and if the amount of safety stock is insufficient, a loss in sales could occur. Thus, the amount of safety stock is always a trade-off between the risk of running out and carrying cost.

## Formula

There are several ways to calculate safety stock level. If the rate of demand or lead time is constant, a quite simple approach can be used.

If the lead time is constant but the demand rate is variable, the following formula can be used:

If the demand rate is constant but the lead time is variable, the following formula can be used:

In real life, however, both the demand rate and lead time could vary, so more complicated approaches should be used to calculate safety stock.

### Probability approach

If the demand rate and lead time vary independently, i.e., they are independent variables, the formula to calculate safety stock is as follows,

where the Z-Score is an inverse distribution function of a standard normal distribution, µ_{L} is the average lead time, µ_{D} is the average demand per each unit period, σ_{D} is the standard deviation of demand, and σ_{L} is the standard deviation of lead time.

If demand and lead time are normally distributed variables, a Z-score of 1 gives a confidence level of 84%, a Z-score of 1.65 gives a confidence level of 95%, and a Z-score of 2.33 gives a confidence level of 99%. Thus, the higher the confidence level (also referred to as service level), the more safety stock and vice versa.

## Safety stock calculation example

XYZ Ltd. is a real estate developer. Historical data about weekly reinforcing bar usage and lead times are shown in the table below.

The average weekly demand is 43.14 tons, and the average lead time is 1.85.

To calculate the standard deviation, you can use our online calculator below or Excel function Standard Deviation. Using the calculator below, we can find a weekly demand standard deviation of 4.22 tons and a lead time standard deviation of 0.25 weeks.

As reinforcing bar is an important stock, the confidence level of 95% should be used, which corresponds to a Z-Score of 1.65.

Thus, the safety stock level of 9.86 could prevent running out of stock and a confidence level of 95%.

## Graph

The graph below explains how safety stock helps to avoid running out of stock.

If there is any increase in demand and/or lead time, a business can use its safety stock until the next order arrives.