Free calculator
Safety stock calculator
Safety stock is the extra inventory you hold to cover swings in demand and supplier lead time. This calculator uses z × √(lead time × σ² of demand + demand² × σ² of lead time).
- Safety stock
- 145 units
- Z-score for service level
- 1.64
- Share of safety stock caused by lead-time variability
- 83%
Rounded up to a whole unit.
A high share means a steadier supplier saves more stock than better demand data would.
Working
- Demand term: lead time × σ² = 21 × 8² = 1,344
- Lead-time term: demand² × σ(lead time)² = 20² × 4² = 6,400
- Combined spread: √(1,344 + 6,400) = 88
- Safety stock: z × spread = 1.64 × 88 = 144.7 units
Runs in your browser; nothing you enter is sent anywhere. Results are estimates from the numbers you provide.
The formula
Safety stock = z × √( LT × σd² + d² × σLT² )
How it works
Safety stock protects you from two kinds of uncertainty: customers buying more than average while you wait for a delivery, and the delivery arriving later than promised. Each is measured as a standard deviation, combined, and scaled by a z-score that reflects how often you are willing to run out.
The z-score comes from the service level. A 95% service level uses z ≈ 1.64, 97.5% uses z ≈ 1.96 and 99% uses z ≈ 2.33. Each step up costs noticeably more stock, so set service levels by product value and importance, not one number for the catalogue.
The calculator also shows how much of the buffer is caused by lead-time variability. When that share is high, working with a steadier supplier reduces stock more cheaply than better forecasting would.
Worked example
A product sells 20 units a day with a daily standard deviation of 8. The supplier takes 21 days, give or take 4 days, and you want a 95% service level (z = 1.64). Demand term: 21 × 8² = 1,344. Lead-time term: 20² × 4² = 6,400. Spread = √7,744 = 88. Safety stock = 1.64 × 88 ≈ 145 units, most of it driven by the unreliable lead time.
Watch out for
- Use the standard deviation of daily demand, not of weekly or monthly totals. Mixing periods understates or overstates the buffer.
- Out-of-stock days are not zero demand. If history includes stockouts, the standard deviation is biased low; exclude those days.
- The formula assumes demand is roughly bell-shaped. For slow, lumpy products with many zero days it understates risk; simulate or use a method designed for intermittent demand.
- Safety stock is not the whole reorder point. Add the demand expected during lead time; see the reorder point calculator.
Frequently asked questions
What is a good service level for safety stock?
Can I use weekly demand instead of daily?
What if I do not know my lead-time variability?
Does Stokrio calculate safety stock automatically?
Shopify App · 3PL Partner API · US$39/mo entry plan
Skip the spreadsheet
Stokrio runs these calculations for every product, using your own sales and supplier lead times.