Skip to content

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).

units/day

Units sold per day, averaged over a recent window.

units/day

How much daily sales swing around the average. If unsure, try 30–50% of the average.

days

Days from placing the order to having stock ready to sell.

days

How much supplier lead time varies. Use 0 if it never does.

%

The chance of not stocking out during the lead time. 95% is a common starting point.

Safety stock
145 units

Rounded up to a whole unit.

Z-score for service level
1.64
Share of safety stock caused by lead-time variability
83%

A high share means a steadier supplier saves more stock than better demand data would.

Working

  1. Demand term: lead time × σ² = 21 × 8² = 1,344
  2. Lead-time term: demand² × σ(lead time)² = 20² × 4² = 6,400
  3. Combined spread: √(1,344 + 6,400) = 88
  4. 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?
There is no universal number. Many ecommerce teams start at 95% for ordinary products and raise it for best-sellers or items with long restock times. Each increase costs more stock, so match it to the cost of a stockout for that product.
Can I use weekly demand instead of daily?
Yes, as long as demand, its standard deviation and lead time all use the same unit. If you use weeks, enter lead time in weeks and standard deviation of weekly demand.
What if I do not know my lead-time variability?
Look at your last several purchase orders and compare promised against actual receipt dates. Even a rough standard deviation is better than assuming suppliers are always on time. Setting it to zero understates the buffer.
Does Stokrio calculate safety stock automatically?
Yes. Stokrio computes safety stock per product from forecast error and measured supplier lead times from received purchase orders, using the same formula, and feeds it into the reorder point.

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.