Safety Stock Calculator

Set buffer inventory from demand variability, lead time, and service level

Calculate safety stock with the standard formula Z × σ-demand × √lead-time using a service-level z-score, with an optional combined model that also accounts for lead-time variability. For supply chain planners and inventory analysts. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is the basic safety stock formula?

Safety stock equals Z × σ_demand × √(lead time), where Z is the service-level z-score, σ_demand is the standard deviation of demand per period, and lead time is in the same period units. The square root reflects that variance accumulates over the lead-time window.

Safety stock is the buffer that absorbs demand and supply uncertainty so you do not stock out during the replenishment lead time. This calculator applies the standard statistical formula and an optional combined model that also captures variable lead times.

Why safety stock exists

A reorder point tells you when to order; safety stock tells you how much cushion to hold on top of expected demand during the replenishment window. Even with a perfect reorder point set to cover average demand over average lead time, two things vary in the real world: demand during the lead-time window is almost never exactly average, and suppliers rarely deliver in precisely the stated number of days. When both sources of uncertainty compound, the risk of a stockout is higher than either alone would suggest. Safety stock quantifies that risk and converts a target service level into a concrete buffer quantity.

How it works

The basic model multiplies a service-level z-score by demand variability scaled over the lead-time window:

basic:    SS = Z × σ_demand × √(lead time)
combined: SS = Z × √( lead_time × σ_demand²  +  avg_demand² × σ_leadtime² )

Z comes from the inverse normal distribution at your target cycle service level. The square root on lead time reflects that demand variance accumulates across the days the order is in transit. The combined (King’s) formula adds the term for lead-time variability, which often dominates the buffer.

Common z-scores for service level targets

Cycle service levelZ-score
84%1.00
90%1.28
95%1.65
97.5%1.96
98%2.05
99%2.33
99.9%3.09

Note that cycle service level measures the probability of not stocking out during one replenishment cycle — it is not the same as fill rate (the percentage of demand immediately fulfilled). A 95% CSL means you expect a stockout in roughly 1 in 20 cycles, not that 95% of individual units are always available.

Worked example

With σ_demand = 20 units/day, lead time = 9 days, and a 95% service level (Z = 1.65):

SS = 1.65 × 20 × √9 = 1.65 × 20 × 3 = 99 units

Raising the target to 99% (Z = 2.33) increases safety stock to 2.33 × 20 × 3 = 140 units — a 41% increase in buffer inventory for a 4 percentage-point service improvement.

Now add lead-time variability: if the same supplier varies between 7 and 11 days, the standard deviation of lead time might be about 1.5 days (σ_leadtime = 1.5) and average demand is 50 units/day. The King’s formula gives:

SS = 1.65 × √(9 × 400 + 2500 × 2.25)
   = 1.65 × √(3600 + 5625)
   = 1.65 × √9225
   = 1.65 × 96 ≈ 158 units

The extra 59 units compared to the basic formula come entirely from lead-time variability — illustrating why variable suppliers need more buffer than the basic formula provides.

Notes

Keep demand and lead time in the same period units. If your supplier’s lead time varies, switch on the combined formula — variable lead time frequently contributes more buffer than demand variability. Service levels above 98% raise safety stock sharply for small service gains, so weigh holding cost against the cost of a stockout before pushing to very high service levels.