Ask a warehouse manager how they set safety stock, and a surprising number will say some version of "we add 20% on top of what we think we need." It is an understandable shortcut, and it is also one of the most common ways operations end up simultaneously overstocked on items that do not need the cushion and understocked on the ones that do. Safety stock is not supposed to be a flat insurance policy. It is supposed to be a calculated buffer sized to the actual uncertainty in demand and supply for each SKU, and that calculation is more approachable than it sounds once you walk through it with real numbers.
What safety stock is actually protecting against
Safety stock exists to absorb two kinds of uncertainty: demand variability, how much more or less of an item customers order than your forecast predicts, and lead-time variability, how much longer or shorter it actually takes a supplier to deliver than the quoted lead time. If both demand and lead time were perfectly predictable, you would not need safety stock at all; you would simply reorder exactly enough, exactly when needed. Because neither is perfectly predictable, safety stock is the quantity that keeps you covered during the uncertain window between placing a reorder and the new stock actually arriving.
The standard formula, in plain terms
The most widely used safety stock formula that accounts for both sources of variability is:
Safety Stock = Z × √[(Average Lead Time × Demand Std. Deviation²) + (Average Demand² × Lead Time Std. Deviation²)]
That looks intimidating written out, but each piece is measurable from data you likely already have: average daily demand and its standard deviation (from sales or pick history), average lead time and its standard deviation (from purchase order and receiving history), and a Z-score that corresponds to your target service level, the probability you want of not stocking out during the lead-time window. A 95% service level corresponds to a Z-score of 1.65. A 99% service level corresponds to roughly 2.33. Higher service levels require a higher Z-score, which directly increases the safety stock quantity, so the service level you choose is doing real work in this formula, not just a label.
A worked example
Say you are calculating safety stock for a mid-velocity SKU with the following history:
- Average daily demand: 40 units
- Standard deviation of daily demand: 12 units
- Average lead time: 10 days
- Standard deviation of lead time: 2 days
- Target service level: 95% (Z = 1.65)
Plugging into the formula:
Term one: Average Lead Time × Demand Std. Dev² = 10 × (12²) = 10 × 144 = 1,440
Term two: Average Demand² × Lead Time Std. Dev² = (40²) × (2²) = 1,600 × 4 = 6,400
Sum: 1,440 + 6,400 = 7,840
Square root of 7,840 ≈ 88.5
Safety Stock = 1.65 × 88.5 ≈ 146 units
So this SKU needs roughly 146 units of safety stock to hit a 95% service level, given its actual demand and lead-time variability, not a guessed-at percentage. If this same facility had instead applied a flat 20% buffer on top of the 400 units expected to sell during the 10-day lead time (40 units/day × 10 days), that would have produced 80 units of safety stock, meaningfully under-covering this particular SKU relative to what its actual variability calls for. For a steadier SKU with lower standard deviations, the formula might land below a flat 20% buffer instead, which is exactly the point: a flat percentage gets some SKUs right by coincidence and gets plenty of others wrong in both directions.
Where the flat percentage buffer goes wrong
The appeal of a flat percentage is obvious: it is fast, and it does not require pulling demand and lead-time history for every SKU. But it treats every item as equally uncertain, which is rarely true. A steady, high-volume SKU with a reliable supplier needs far less proportional buffer than a sporadic, low-volume SKU sourced from a supplier with inconsistent delivery performance. Applying the same percentage to both means the stable SKU is carrying excess capital in inventory that is not doing useful work, while the volatile SKU is still exposed to stockouts the flat buffer never actually priced in. Over a full catalog, this mismatch compounds: total safety stock investment ends up both higher than necessary and less protective where it matters, which is the worst of both outcomes.
Setting service-level targets that make sense
Not every SKU deserves the same service-level target. A reasonable approach ties service level to the cost of a stockout: critical, customer-committed, or hard-to-substitute items warrant a higher target, 98 or 99%, while low-risk, easily substituted, or low-margin SKUs can run comfortably at 90 to 95% without meaningful business impact. Pushing every SKU to a 99% target drives up the Z-score, and therefore the safety stock quantity, across the entire catalog, which is rarely worth the carrying cost for items where an occasional stockout is genuinely low-stakes.
Keeping the inputs current
A safety stock calculation is only as good as the demand and lead-time data feeding it. Seasonal shifts, new suppliers, and changing customer order patterns all move the averages and standard deviations the formula depends on. Recalculating safety stock on a regular cadence, quarterly for most catalogs, more often for fast-moving or newly introduced SKUs, keeps the buffer sized to current reality rather than a snapshot from months ago that no longer reflects how the business actually operates.
Get a free facility assessment and see what autonomous inventory and security robotics would look like for your operation.
Frequently Asked Questions
Why is a flat percentage buffer a bad way to set safety stock?
A flat percentage, like always holding 20% extra, ignores the fact that demand and lead-time variability differ by SKU. It overstocks steady, predictable items while leaving volatile, high-risk items under-protected, which wastes capital in one place and creates stockout risk in another.
What is a reasonable service level target to start with?
Many operations start around a 95% service level for most SKUs, reserving higher targets like 98 or 99% for critical or customer-committed items, since pushing every SKU to a very high service level drives safety stock and carrying cost up sharply for diminishing returns.
Do I need both demand variability and lead-time variability in the formula?
Yes, if either varies meaningfully. Using a formula that only accounts for demand variability while ignoring lead-time swings will understate the safety stock needed for SKUs where supplier delivery times are inconsistent.