Skip to content
All guides
Basics

What is safety stock? Formula, example and how much you need

Safety stock is the buffer that covers surprise demand and late deliveries. See the formula, a worked example, how service level changes the answer and common mistakes.

Stokrio Team · · 7 min read

Safety stock is extra inventory you hold on top of what you expect to sell, so that a busy week or a late delivery does not leave you with empty shelves. It is not "just in case" stock; it is a calculated buffer, sized for how unpredictable a product is and how costly a stockout would be.

Key takeaways

  • Safety stock covers two uncertainties: demand varying and lead time varying.
  • The buffer is set per product and grows with your service level target.
  • A steadier supplier often saves more stock than better forecasting.
  • Safety stock is part of the reorder point, not a separate rule.

The formula

When both demand and lead time vary, the usual formula is:

safety stock = z × √( lead time × σd² + d² × σLT² )
  • z comes from your service level. 90% gives 1.28, 95% gives 1.64, 97.5% gives 1.96 and 99% gives 2.33.
  • σd is the standard deviation of daily demand.
  • d is average daily demand.
  • σLT is the standard deviation of lead time in days.

If lead time never varies, the second term drops out and the formula becomes z × σd × √lead time.

Worked example

A product sells 20 units a day with a standard deviation of 8. The supplier takes 21 days, varying by 4 days either way. You want 95% service (z = 1.64).

  • Demand term: 21 × 8² = 1,344
  • Lead-time term: 20² × 4² = 6,400
  • Spread: √(1,344 + 6,400) = 88
  • Safety stock: 1.64 × 88 ≈ 145 units

Notice that the lead-time term is almost five times the demand term. Here, getting the supplier to deliver within a tighter window would cut the buffer far more than refining the forecast. You can try your own numbers in the safety stock calculator.

What changes the answer

  • Service level. Going from 95% to 99% raises the buffer by about 40% for the same product.
  • Lead time. Longer lead times increase both the demand uncertainty and the exposure to delays.
  • Demand variability. Promotions, seasonality and erratic buying all widen the spread.
  • Review period. If you only reorder weekly, you must cover the extra days between reviews as well.

Common mistakes

  • One safety stock rule for everything. A flat "two weeks" is too much for steady products and too little for erratic ones.
  • Counting stockout days as zero demand. This understates variability and leaves you with too little buffer.
  • Ignoring lead-time variability. Quoted lead times are rarely what arrives.
  • Using the formula for lumpy, slow products. Many zero days and occasional large orders are not bell-shaped; use a method built for intermittent demand.

How Stokrio handles it

Stokrio calculates safety stock per product from forecast error and the lead times measured on received purchase orders, then builds it into the reorder point. For lumpy products it simulates demand instead of assuming a bell curve. See replenishment and why static reorder points fail.

Frequently asked questions

How do I calculate safety stock simply?
A quick rule is z × standard deviation of demand × √lead time, using lead time in the same unit as demand. Add the lead-time variability term when your supplier is inconsistent.
What is the difference between safety stock and reorder point?
Safety stock is the buffer. The reorder point is the trigger level: expected demand during the lead time plus the safety stock.
Is more safety stock always better?
No. Extra stock reduces stockouts but ties up cash and space and raises the risk of dead stock. The right level balances those costs per product.

Shopify App · 3PL Partner API · US$39/mo entry plan

See Stokrio with your own data

Install Stokrio from Shopify and your products and orders flow in. Running a 3PL? Start with the demo.