How To Calculate Safety Stock and Avoid Stockouts in My eCommerce Business?
As an eCommerce business owner, here are the top reasons you should know about safety stocks.
- Safety Stock helps your business cover the demand during the replenishment lead time.
- It helps in avoiding stockouts.
- A trade-off between the safety stock holding and stockout costs helps optimize inventory.
Typically, it is suggested that inventory management’s primary objective is to minimize inventory costs. That’s because it directly impacts a business’s return on assets. As a result, many companies consider investing in the stock inventory as an element of cost. However, this approach to managing inventory is not completely correct.
The primary objective of inventory management must not be to minimize investment in the stock inventory. Rather, it must be to determine an inventory level that enhances customer service and maximizes the company’s financial performance.
Increasing global supply chains, more dynamic product life cycles, and multi-channel distribution have made traditional inventory management practices obsolete. As a result, truly successful companies are adopting new inventory management technology. Such technology not only helps them reduce inventories but it supports them in enhancing customer service levels.
Inventory management’s customer service level refers to the probability of not hitting a stockout during the next replenishment cycle. In other words, it refers to the expected probability of not losing sales.
Thus, the customer service level of a company depends on the level of stocks. This means an e-commerce business needs to maintain enough safety stock levels. The safety stock levels of an e-commerce business must be high enough that it:
- Covers vendor’s delivery times,
- Meets customers’ demands, and
- Maintains moderate carrying costs
This article will discuss safety stock levels and how to calculate a safety stock level for an e-commerce business. Besides this, we will also learn why safety stock is important for e-commerce businesses to avoid stockouts.
What is Safety Stock?

The Safety Stock is defined as the inventory level a business needs to carry or maintain to avoid stockouts and backorders. It is a buffer to a business’ on-hand inventory or the extra inventory that exceeds customers’ demand.
In other words, safety stocks are inventories over the average demand. E-commerce businesses need to maintain safe stock inventories to avoid stockouts. Such stock inventories are needed to cover the demand during the replenishment lead time. An e-commerce business may depend on safety stock when the actual demand exceeds expected demand or the lead time exceeds the lead time.
So, to calculate safety stock levels, a business needs to work on sales forecasts. This is because the level of safety stock that an e-commerce business needs to maintain depends on its sales forecasts.
Remember, while calculating the safety stock level, the aim of a business should not be to calculate the exact level. This is because safety stock is an estimated figure that depends on sales forecasts which are rarely exact.
Thus, determining safety stock levels protects an e-commerce business against higher-than-expected demand levels. It is not intended to eliminate all stockouts—just most.
Also, in the case of an e-commerce business, safety stock is a function of the supply cycle time and transportation time. This means the inventory shortfall risk will increase with the increasing supply and delivery time variability.
Though the safety stock levels may avoid stockouts for an e-commerce business. But maintaining such stock levels may also influence the firm’s cost. That is, maintaining the safety stock may reduce the cost of stockouts. But it increases the holding cost of inventory for the business.
Therefore, a business must consider a trade-off between holding and stockout costs.
What is Safety Stock Formula?
There are various formulas to calculate Safety Stock levels. The Safety Stock formula that an e-commerce business must use depends on the stock volume variability, lead time, type of business, etc.
As mentioned earlier, estimating the safety stock level is not intended to eliminate all stockouts. The main objective behind determining such stock levels is to avoid the majority of stockouts.

Image Source: MIT
Consider the image above. It demonstrates safety stock designed for a 95% service level. As is evident, a business may not need to maintain safety stock for 50% of the replenishment cycles. The safety stock will be sufficient for another 45% of the replenishment cycles. But the business may expect a stockout in approximately 5% of the replenishment cycles.
Likewise, safety stock designed for a 98% service level would result in fewer stockouts. However, a business must maintain more safety stock in such a case. The ideal situation is when the business will maintain a balance between inventory costs and customer service.
Using the following safety stock methods and equations, a business can find safety stock levels to achieve its desired customer service levels.
1. Basic Safety Stock Formula
The basic safety stock formula calculates the safety stock level based on the average daily sales and the number of safety days a business wants to maintain.
Accordingly, the Safety Stock Formula is,
Safety Stock = Average Sales Per Day * Number of Safety Days
Safety Stock Example
For instance, ‘Zapin’ is an e-commerce store selling consumer electronics to customers. Suppose ‘Zapin’ sells 1000 SKUs of consumer electronics daily and has 10 days to replenish the Stock with additional SKUs. Further, ‘Zapin’ wants to maintain a safety stock of 5 days. Accordingly:
Average Sales Per Day = 1000 SKUs
Number of Safety Days = 5 days
Lead Time = 10 days
Safety Stock = Average Sales Per Day * Number of Safety Days = 1000 * 5 = 5,000 SKUs
Reorder Point = Safety Stock + (Average Sales Per Day * Lead Time) = 5,000 + (1000*10) = 15,000 SKUs.
Say, the EOQ level is 25,000 SKUs.
This means you have a safety stock of 5,000 SKUs and a reorder point of 15,000. As a result, when your inventory level reaches 15,000 SKUs, you need to place an order of 25,000 SKUs. Since the lead time for ‘Zapin’ is 10 days, ‘Zapin’ will consume 10,000 SKUs during the transit time. ‘Zapin’ will be left with 5,000 SKUs when it receives 25,000.
This safety stock example demonstrates the basic method. In this method, a business must manually calculate the safety stock levels. This means it is time-consuming.
2. Average – Max Formula
This is the general formula for safety stock calculation. In this method, safety stock is the difference between the maximum and minimum reorder levels.
The maximum reorder level is the level of inventory above which an e-commerce business cannot hold inventory. It is the maximum capacity of goods that a business can stock in its store.
Likewise, the minimum reorders level is the inventory level that an e-commerce business must always maintain during the normal course of its business. A prudent inventory level demonstrates that the supply of goods may take more than the normal lead time.
Thus, to calculate safety stock under this method, the maximum inventory level is calculated by multiplying the maximum number of units sold in a single day by the maximum lead time. Maximum lead time is the longest the supplier has taken to deliver the Stock.
Likewise, the minimum stock level is calculated by multiplying the average number of units sold daily by the average lead time.
Accordingly, the safety stock formula is:
Safety Stock = (Maximum Sale * Maximum Lead Time) – (Average Sale * Average Lead Time)
Safety Stock Example
Let’s consider the previous example to understand this formula. Say ‘Zapin’ sells 360,000 SKUs over 12 months. This means it sells 30,000 SKUs monthly and 1000 SKUs of consumer electronics daily. The maximum sale in a day was 1200 SKUs. Further, the number of deliveries was 15 during the past 12 months, and the average time for each delivery was 12 days. The maximum time of delivery recorded was 15 days. Accordingly:
Total Sales over 12 Months = 360,000 SKUs
Sales in a month = 30,000 SKUs
Average Sales Per Day = 1000 SKUs
Maimum Sales Per Day = 1200 SKUs
Average Lead Time = 12 days
Maximum Lead Time = 15 days
Safety Stock = (Maximum Sale * Maximum Lead Time) – (Average Sale * Average Lead Time) = (1200*15) – (1000*12) = 18000 – 12000 = 6,000 SKUs
Reorder Point = Safety stock + Average Sale * Average Lead Time = 6,000 + 1000*12 = 6,000 + 12,000 = 18,000 SKUs
The major challenge with using this safety stock formula is that it does not consider the service level. Also, such a method may impact the numbers for businesses with long lead periods.
3. Normal Distribution Method
The normal distribution method is also called King’s Method. This method considers a normal distribution that is a probability bell curve.
The bell curve demonstrates that most values are close to the mean or average. It also showcases that fewer values exist at extreme distances from the mean value. Plus, the total number of values occurring above the average is close to the total number occurring below the average value.
Moreover, the distribution along the bell curve is symmetrical. This means that a business is as likely to sell the average quantity of goods as it is to sell more than the average quantity.
Further, the curve’s width demonstrates the average demand and its variability. Such variability is characterized by a statistical property called Standard Deviation. —sigma denotes this accordingly; the narrow the bell curve, the little the variability in average demand. Likewise, the wider the bell curve, the greater the variability in average demand.
The following is the typical normal distribution curve. It demonstrates that for a normal distribution, 68.26% of the data falls under one standard Deviation of the mean ( ± 𝛔), 95.45% of the data falls under two standard deviations of the mean ( ±2𝛔), and 99.73% of the data falls under three standard Deviation of the mean.

Thus, an e-commerce business can set a service rate at which it wants to maintain safety stock. In return, such a distribution will indicate the safety factor that a business can use to calculate safety stock.
Safety Stock Example
Let’s consider the above example. The following table showcases the normal distribution for ‘Zapin,’ where the service rate is the only variable factor. Accordingly, the following are the service rate coefficients at different levels of service rates.
Normal Distribution | |
Service Rate | Z = Coefficient of Service Rate |
99.99% | 3.719016482 |
99% | 2.326347874 |
98% | 2.053748909 |
97% | 1.880793606 |
96% | 1.750686073 |
95% | 1.644853625 |
94% | 1.554773595 |
93% | 1.47579103 |
92% | 1.405071561 |
91% | 1.340755033 |
90% | 1.281551564 |
89% | 1.226528119 |
88% | 1.174986792 |
87% | 1.12639113 |
86% | 1.080319342 |
85% | 1.036433391 |
84% | 0.9944578841 |
83% | 0.9541652535 |
82% | 0.9153650877 |
81% | 0.8778962945 |
80% | 0.8416212327 |
79% | 0.8064212461 |
78% | 0.7721932134 |
77% | 0.7388468486 |
76% | 0.7063025626 |
75% | 0.6744897502 |
Say ‘Zapin’ wants to set an average service rate of 50%. This means there is no need for ‘Zapin’ to maintain safety stock. That’s because it has a 50/50 chance of selling more or less than the average next month.
However, if ‘Zapin’ sets the service rate at 90%, the normal distribution will give a multiplier coefficient of 1.28 to meet 90% of the demand.
Now, there can be three scenarios when considering the variability factors. The variability can occur in the following ways:
- Variability in demand only
- Variability in lead time only
- Uncertainty in demand and lead time independently
- Uncertainty in demand and lead time-dependently
I. Normal Distribution When Only Demand is Variable
The first method under normal distribution is used when the average demand is the only uncertain factor. Thus, the safety stock needed to give a certain level of protection is the Standard Deviation of demand variability multiplied by the Z-score and the square root of the average delay time. Note that the Z score is a statistical figure known as the standard score.
Thus the safety stock formula is:
Safety Stock = Z * Standard Deviation in Demand * Average Lead Time
Let’s look at the normal distribution table above. It is clear that to satisfy demand with a 95% confidence level, it’s necessary for ‘Zapin’ to carry extra inventory equal to 1.65 standard deviations of demand variability. This is nothing but a Z-Score of 1.65.
Likewise, to satisfy demand with a 50% confidence level, ‘Zapin’ need not carry any safety stock inventory. Thus, in this case, the Z-Score would be 0.
Further, if ‘Zapin’ wants to satisfy demand with an 84% confidence level, it must carry extra inventory equal to 1 standard deviation of demand variability. Thus, in this case, the Z-Score would be 1. This means that there will be enough inventory 84% of the time.
The above table also showcases the relationship between the desired service levels that ‘Zapin’ wants to maintain and the level of Z-Score. It showcases that higher service levels require disproportionally higher Z-scores. Accordingly, the safety stock required would also be disproportionately higher.
Further, the above safety stock formula answers how you calculate service level from safety stock.
Safety Stock Example
Let’s consider the previous example to understand this formula. Say ‘Zapin’ sells 360,000 SKUs over 12 months. This means it sells 30,000 SKUs monthly and 1000 SKUs of consumer electronics daily. The maximum sale in a day was 1200 SKUs. Further, the number of deliveries was 15 during the past 12 months, and the average time for each delivery was 12 days. The maximum time of delivery recorded was 15 days. Accordingly:
Total Sales over 12 Months = 360,000 SKUs
Sales in a month = 30,000 SKUs
Average Sales Per Day = 1000 SKUs
Maimum Sales Per Day = 1200 SKUs
Average Lead Time = 12 days
Maximum Lead Time = 15 days
Per Month Sales | |
Month | Sales |
January | 20000 |
February | 30000 |
March | 10000 |
April | 40000 |
May | 20000 |
June | 50000 |
July | 20000 |
August | 40000 |
September | 40000 |
October | 30000 |
November | 20000 |
December | 40000 |
Total | 360,000 |
Average Demand (Per Month) | 30000 |
Average Demand (Per Day) | 1000 |
Target Service Rate | 90% |
Z= Coefficient of Service Rate | 1.281551564 |
Demand Standard Deviation | 12060.45378 |
Per Month Lead Time | ||
Delivery | Lead Time (in Days) | Lead Time (in Months) |
1 | 14 | 0.03835616438 |
2 | 13 | 0.03561643836 |
3 | 14 | 0.03835616438 |
4 | 15 | 0.04109589041 |
5 | 11 | 0.0301369863 |
6 | 9 | 0.02465753425 |
7 | 13 | 0.03561643836 |
8 | 12 | 0.03287671233 |
9 | 12 | 0.03287671233 |
10 | 8 | 0.02191780822 |
11 | 10 | 0.02739726027 |
12 | 12 | 0.03287671233 |
13 | 13 | 0.03561643836 |
14 | 14 | 0.03835616438 |
15 | 10 | 0.02739726027 |
Average Lead Time | 12 | 0.03287671233 |
Maximum Lead Time | 15 | 0.04109589041 |
Lead Time Standard Deviation | 2.035400978 | 0.005576441037 |
Normal Distribution When Demand Is Uncertain | |
Safety Stock Formula | Z * Standard Deviation in Demand * (SQRT) Average Lead Time |
Safety Stock | 2802.489051 |
Reorder Point Formula | Safety Stock + Average Sale*Average Time |
Reorder Point | 3788.790421 |
Thus, we have a Safety Stock of 2,802 SKUs and a reorder point of 3,789 SKUs per this method.
II. Normal Distribution When Only Lead Time Is Variable
An e-commerce business can use this formula when there are significant supply changes on the supplier’s part.
This method utilizes the Standard Deviation of the lead time distribution. Hence it gives a correct picture of the lead time and how frequently the e-commerce business deals with delayed shipments for a longer period.
However, this method does not consider the seasonal changes in demand.
Under this method, an e-commerce business can calculate safety stock by multiplying the desired service level with a standard deviation in lead time. The standard Deviation in lead time is nothing but the extent and frequency with which the average lead time differs from the actual lead time.
Accordingly, the safety stock formula is:
Safety Stock = Z * Average Sale * Lead Time Standard Deviation
As mentioned above, the Z score is the desired service level that an e-commerce business wants to operate at. It indicates the confidence level about having enough Stock in which an e-commerce business wants to operate.
Safety Stock Example
Considering the above example, the following table showcases the safety stock and reorder point when only lead time is variable.
Normal Distribution When Lead Time Is Uncertain | |
Safety Stock Formula | Z * Average Sale* Lead Time standard Deviation |
Safety Stock | 2608.471308 |
Reorder Point Formula | Safety Stock + Average Sale*Average Time |
Reorder Point | 14608.47131 |
In the per-month Lead Time table, it is clear that the more unstable the lead time, the greater the standard Deviation. As we can see in the above table, the safety stock is of a lower level as the fluctuation in lead time is small.
III. Normal Distribution When Demand and Lead Time Are Variable Independently
This is the scenario where an e-commerce business experiences fluctuations in demand and lead time. However, the uncertainty in demand is independent of uncertainty in supply.
This method calculates safety stock.
Accordingly, the safety stock formula is:
Safety Stock = Z * (Average Lead Time*(Demand Standard Deviation)2 + (Average Sale*Lead Time Standard Deviation)2)
Safety Stock Example
Considering the above example, the following table showcases the safety stock and reorder point when demand and lead time are variables independently.
Normal Distribution When Demand & Lead Time Change Independently | |
Safety Stock Formula | Z * (SQRT) ((Average Lead Time* (Demand Standard Deviation)2 + (Average Sale * Lead Time Standard Deviation)2) |
Safety Stock | 2803.702731 |
Reorder Point Formula | Safety Stock + Average Sale*Average Time |
Reorder Point | 14803.70273 |
Using this method, our safety stock is 2804 SKUs, and the reorder point is 14,804.
IV. Normal Distribution When Demand and Lead Time Are Variable Dependently
This is the scenario where an e-commerce business experiences fluctuations in demand and lead time. However, the uncertainty in demand and supply depends on one another.
Thus, safety stock in this formula is calculated by adding the safety stock levels calculated in the first two formulas under the normal distribution. The first formula considers demand fluctuations, and the second considers lead time fluctuations.
This, the safety stock formula is:
Safety Stock = Z * Demand Standard Deviation * Average Lead Time+ Z * Average Sale * Lead Time Standard Deviation
Safety Stock Example
Considering the above example, the following table showcases the safety stock and reorder point when demand and lead time are variable dependent.
Normal Distribution When Demand & Lead Time Change Dependently | |
Safety Stock Formula | Z * Standard Deviation in Demand * (SQRT) Average Lead Time + Z * Average Sale* Lead Time standard Deviation |
Safety Stock | 5410.960359 |
Reorder Point Formula | Safety Stock + Average Sale*Average Time |
Reorder Point | 17410.96036 |
Using this formula, the safety stock level is 5411 SKUs, and the reorder point is 17,410. As we can see, this formula considers both the fluctuations in demand and the corresponding changes in the lead time.
Safety Stock Vs. Reorder Point
The following table showcases the difference between the safety stock and the reorder point.
Attribute | Safety Stock | Reorder Point |
Definition | Safety stock is the stock level a business must maintain to prevent material shortages, backorders, or avoid stockouts. It is a kind of preventive Stock or buffer stock for a business. | Reorder level refers to the level of Stock at which the supplier needs to add additional inventory to maintain the inventory at the optimum point. |
Purpose | Maintaining safety stock is meant to avoid material shortages and backorders or stockouts. | Determining the reorder level is to replenish the inventory during the lead time. |
Quantity Type | It helps the business determine the minimum quantity of Stock required to avoid cessation of work. | It helps a business to calculate the quantity of Stock a business needs to order in a single order. |
Stock Level | Safety stock is the level of Stock that lies below the reorder level. | Reorder point is the stock level above the safety stock level. |
Calculation | To determine safety stock, one must specify the risk of a material shortage and the desired service level. | To determine the reorder point, one must specify the total material for requirements planning, including the safety stock. |
Components | Safety stock covers excess material consumption within the replenishment lead time and any additional requirements expected to occur due to delivery delays. | Reorder point covers material consumption within the replenishment lead time. |
Formula | Safety Stock = Z * Standard Deviation in Demand * (SQRT) Average Lead Time + Z * Average Sale* Lead Time standard Deviation | Reorder Point = Safety Stock + Average Sale*Average Time |
Why Do You Need Safety Stock?
It is very important for a business, especially an e-commerce store, to maintain sufficient Safety Stock. This is because it helps businesses avoid a situation where customers must go empty-handed. Furthermore, it helps them maintain good relations with suppliers as they do not have to pressurize them for speedy supply.
The following is why safety stock is so important for an e-commerce business.
1. Seamless Supply Chain Functioning
The Buffer stock is the level of Stock that helps in the smooth functioning of your e-commerce business’ supply chain. This is because the demand for the near future, say a few days or months, is forecasted already, and the products are stored accordingly.
As a result, the business ensures that there is no obstacle in the flow of the supply chain circuit. Also, the business will not have to wait to access more products in case there’s a sudden increase in demand.
2. High Customer Satisfaction
As mentioned above, the Safety stock level ensures that customers do not have to go empty-handed. This would satisfy customers since the e-commerce store has the products they want. Besides this, increased customer satisfaction would mean recurring customers, which will positively impact the business revenues and profits.
3. Avoid Stockouts or Backorders
An e-commerce business may experience scenarios where there is a sudden spike in demand. Thus, businesses with sufficient safety stock would not have to experience situations like stockouts and backorders.
Stockout is when a business’ inventory gets exhausted or goes out of Stock. Backorders refer to a situation where a business cannot fulfill a current order as it does not have the product inventory. It indicates that an e-commerce business needs to order more inventory from suppliers or the Stock ordered from third-party suppliers is still in transit.
4. Overcome Price Fluctuations
The change in external factors may have a direct impact on the business. For instance, a change in government policies or an increase in raw materials or merchandise prices may impact the supply or production of goods. A sufficient amount of safety stock can help a business not get impacted by such scenarios. Moreover, it will help in making businesses efficient.