Safety Stock Calculator

Set safety stock from a target service level, using how much your daily sales and lead time actually vary, not just a fixed cushion.

Describe the result you need. AI will set up the tool and ask for any missing details.

Configure with AI

Enter to submit · Shift + Enter for a new line

Sent to AI. Leave out passwords and private customer data.

Your numbers

Demand
units/day

How much daily sales bounce around the average. Excel's STDEV over your last few months of daily sales gives you this.

units/day
Lead time
days

How much the supplier's delivery time varies. Enter 0 if it barely changes order to order.

days
Target

Your result · updates as you type

Safety stock for a 95% service level

43 units

At a 95% chance of staying in stock through the reorder cycle (a 5% chance of a stockout), keep 43 extra units beyond what average demand and lead time would need. That's about 3.6 days of average sales.

Z-score used
1.64
Combined demand/lead-time variability (σ)
25.81
Stockout risk at this level
5%

Higher service levels cost more in carrying cost for a shrinking reduction in stockouts, so they make sense for your best sellers, not everything. Feed this number into the reorder point calculator, and check what it costs to hold with the inventory carrying cost calculator.

Safety stock at each service level
90%
34
95%
43
97.5%
51
99%
61
99.9%
80

Breakdown

Service level → safety stock
90%
34 units
95%
43 units
97.5%
51 units
99%
61 units
99.9%
80 units

The service-level method

Instead of a worst-case guess, this method uses how much your daily sales and lead time actually bounce around their averages (their standard deviation), and a target service level: the odds you stay in stock through the reorder cycle.

Safety stock = Z × √(average lead time × σ²(daily usage) + average daily usage² × σ²(lead time))

Example: the default numbers, 95% service level

Average daily usage, std. dev.
12 units/day, 3 units/day
Average lead time, std. dev.
10 days, 2 days
Combined variability (σ)
√(10×3² + 12²×2²) = √666 ≈ 25.81

Z for 95% is 1.6449, so safety stock = 1.6449 × 25.81 ≈ 42.45, rounded up to 43 units (about 3.6 days of average sales).

Picking a service level

Service levelZ-scoreStockout risk
90%1.281 in 10 cycles
95%1.641 in 20 cycles
97.5%1.961 in 40 cycles
99%2.331 in 100 cycles

Higher service levels don't cost proportionally more: going from 95% to 99% only raises safety stock by about 41%, but it more than triples how rarely you're caught out. Reserve 99%+ for your best sellers and anything with a long lead time.

Where to get the standard deviations

  • Daily usage. Export the last 60–90 days of orders per SKU and run Excel's STDEV function over the daily totals.
  • Lead time. Look at your last 5–10 purchase orders for that supplier and take the standard deviation of days from order to received.
  • No history yet? Start with a rough guess (a std. dev. around 20–30% of the average is common for demand) and tighten it once you have real data.

Questions people ask

What service level should I use?

95% is a common default. Use 99% for your best sellers or anything where a stockout costs you a lot, and consider 90% for slow, low-margin items where carrying cost matters more.

What's a Z-score?

A statistics term for how many standard deviations above the average you need to cover a given probability. Higher service levels need a higher Z-score, which needs more safety stock.

Why does lead time variability matter as much as demand variability?

A supplier that's sometimes 20 days late can blow through your safety stock just as easily as a sales spike, especially for slower-moving items where lead time swings dominate the formula.

How do I turn this into a reorder point?

Add it to expected usage during your average lead time (average daily usage × average lead time), or use the reorder point calculator, which does that step for you.

Want this builtinto your store?

I'm Emmanuel, a Shopify and WooCommerce developer. If this tool pointed at something you'd rather have fixed for you (a faster store, cleaner product data, a migration, a custom feature), send me a note.

Emmanuel Asika

Emmanuel Asika

Shopify & WooCommerce developer, Dublin

I build and fix online stores: new builds, migrations, speed, SEO and the custom bits apps can't do.

hello@emmanuelasika.com

Last reviewed 30 September 2026.