Safety Stock Formula (With Example)
The Safety Stock formula calculates the buffer inventory needed to absorb demand variability and lead-time variability while protecting a chosen service level. If you want the conceptual background first, read What Is Safety Stock?
Variables Defined
| Symbol | Name | Unit | How to Measure | Common Error |
|---|---|---|---|---|
| Z | Service-Level Z-score | Dimensionless | Look up from the standard normal distribution for your target service level (see table below) | Using fill rate when the formula expects cycle service level; the two are different metrics |
| σd | Standard Deviation of Daily Demand | Units per day | Calculate from 90–180 days of actual daily sales data using =STDEV() in a spreadsheet | Using weekly or monthly σ — must match the time unit of lead time (days); converting weekly σ to daily: σd = σweekly ÷ √7 |
| LT | Lead Time | Days | Measure from purchase order placement to goods-in receipt across historical orders; use average | Using supplier-quoted lead time instead of observed lead time; the two frequently differ by 20–40% |
| SS | Safety Stock | Units | Output of the formula — the buffer to hold above lead-time demand | Treating SS as the reorder point; SS is the buffer component: ROP = (d × LT) + SS |
Z-Score Reference by Service Level
The Z-score is the number of standard deviations above the mean required to cover the chosen percentile of demand. Use this reference table — or the safety stock calculator which applies the correct Z for you automatically.
| Service Level | Z-score | Meaning |
|---|---|---|
| 85% | 1.04 | 1 in 6.7 replenishment cycles risks a stockout |
| 90% | 1.28 | 1 in 10 cycles risks a stockout |
| 95% (most common) | 1.65 | 1 in 20 cycles risks a stockout |
| 98% | 2.05 | 1 in 50 cycles risks a stockout |
| 99% | 2.33 | 1 in 100 cycles risks a stockout |
Step-by-Step Worked Example
A distributor carries a hardware component. Daily demand has a standard deviation of 20 units. The supplier's average replenishment lead time is 5 days. The inventory team targets a 95% cycle service level.
Enter your service level, demand standard deviation, and lead time — get your safety stock in seconds.
Why √LT and Not LT?
The square root appears because of how variance accumulates over independent time periods. If daily demand is independently and identically distributed with standard deviation σd, the total demand over L days has variance equal to L × σd². The standard deviation of that total is therefore:
σ_LT = √(L × σd²) = σd × √L
Safety stock is set in terms of standard deviations of lead-time demand (via the Z multiplier), so the formula uses σd × √LT rather than σd × LT. The practical implication: doubling lead time increases safety stock by only 41% (√2 ≈ 1.41), not 100% — so shortening lead time has diminishing but real returns on buffer inventory.
Formula Variants
The standard formula assumes demand varies but lead time is fixed. When lead time also varies, or when you have only weekly demand data, use the appropriate variant below.
Use when lead time is relatively stable. Requires daily demand σd and average lead time in days.
Use when lead time varies significantly. Requires σd, σLT (std dev of lead time), d_avg, and LT_avg.
Convert weekly σ to daily before applying the standard formula. Do not use weekly σ and daily LT without converting.
A rough heuristic only. Ignores actual variability and produces the wrong result for volatile or stable SKUs alike.
Assumptions
- Daily demand is independent across days. The formula applies σd × √LT only if each day's demand is independent. Highly autocorrelated demand (e.g., large orders causing demand spikes followed by lulls) requires a more advanced model.
- Lead time is fixed (standard variant). If lead time variance is significant — for example, the supplier sometimes delivers in 3 days and sometimes in 8 — switch to the both-variabilities variant to avoid understating the buffer.
- Demand follows a roughly normal distribution. The Z-score lookup assumes normality. For very slow-moving SKUs (many zero-demand days) a Poisson-based model gives more accurate results.
- σd is current. The formula is only as accurate as the demand data feeding it. Recalculate σd from the last 90–180 days of actual sales whenever demand patterns shift materially.
Frequently Asked Questions
What is the safety stock formula?
The standard safety stock formula is SS = Z × σd × √LT, where Z is the z-score for the chosen service level, σd is the standard deviation of daily demand, and LT is the replenishment lead time in days. It calculates the buffer inventory needed to protect against demand and lead-time variability.
What is the z-score for a 95% service level?
A 95% service level corresponds to Z = 1.65. Other common values: 85% → 1.04, 90% → 1.28, 98% → 2.05, 99% → 2.33. These z-scores come from the standard normal distribution and represent the number of standard deviations above the mean needed to cover the chosen percentile of demand outcomes.
Why does the safety stock formula use the square root of lead time?
If daily demand is independent and identically distributed, the variance of total demand over L days is L × σd². The standard deviation is therefore σd × √L. Because safety stock is measured in standard deviations (via the Z multiplier), the formula uses √LT rather than LT. This is a consequence of variance being additive for independent distributions.
What is the safety stock formula when lead time also varies?
When lead time varies, use: SS = Z × √(LT_avg × σd² + d_avg² × σLT²), where LT_avg is average lead time in days, σd is standard deviation of daily demand, d_avg is average daily demand, and σLT is standard deviation of lead time in days. This combines demand and lead-time variability into a single standard deviation before applying Z.
How do I calculate σd (standard deviation of daily demand)?
Calculate σd from 90–180 days of actual daily sales data using the standard deviation formula. In a spreadsheet, use =STDEV(range) on a column of daily demand figures. Refresh σd whenever demand patterns change materially — using stale data is the most common safety stock calculation error. If you only have weekly data, convert: σd = σweekly ÷ √7.
