Safety stock calculatorwith service level and Z score
Work out how much buffer stock to hold against demand spikes and late deliveries, see what each extra point of service level costs, and get the reorder point that goes with it.
The starting numbers are example values, not Spark data. Replace them with your own.
Safety stock
38units
Reorder point
178
Days of cover
3.8
What a higher service level costs
| Service level | Z | Safety stock |
|---|---|---|
| 90% | 1.28 | 30 |
| 95% | 1.64 | 38 |
| 97.5% | 1.96 | 45 |
| 99% | 2.33 | 54 |
| 99.9% | 3.09 | 71 |
Safety stock is rounded up to whole units. Reorder point = average daily demand × average lead time + safety stock.
The safety stock formula
A buffer sized to how unpredictable you are
Safety stock covers the gap between average demand during a lead time and what can actually happen: a busy week, a late truck, or both. The service level formula scales that buffer by how much demand and lead time vary, and by how rarely you are willing to run out.
Safety stock = Z × √(lead time × σ_demand² + daily demand² × σ_lead time²)
Safety stock sets the floor. Use the reorder point calculator for when to order and the EOQ calculator for how much.
Worked example (illustrative numbers)
- 1. Demand variability. A SKU sells 10 units a day with a standard deviation of 3, and the supplier takes 14 days: 14 × 3² = 126.
- 2. Lead time variability. Deliveries vary by 2 days: 10² × 2² = 400.
- 3. Safety stock at 95%. Z = 1.645, so 1.645 × √(126 + 400) ≈ 38 units, about 4 days of demand. The reorder point is 140 + 38 = 178.
The same SKU needs 30 units at 90%, 54 at 99% and 71 at 99.9%. Most of this buffer comes from the late deliveries, not the demand swings, so a more reliable supplier would cut it in half.
Demand ESP
The formula is standard. The inputs are where Spark is different.
Spark Inventory uses the same service level formula for every SKU and warehouse. What changes the answer is where the variability and lead time come from. Demand ESP, Spark’s forecasting engine, measures them from your own history and keeps them current.
Variability from forecast misses, not raw swings
The calculator above measures how much demand moves. Spark measures how far Demand ESP’s forecast actually missed. Swings the forecast saw coming, like a seasonal peak, do not inflate the buffer, so you hold less stock for the same protection.
Measured where your next order lands
Only misses at the horizon a purchase order placed today would cover are counted, over the last year of monthly forecasts. Until an item has three scored months, Spark uses the forecast’s own confidence band instead.
Real lead time spread per supplier
Lead time variability comes from completed purchase orders, so a supplier who is sometimes a week late gets a bigger buffer than one who is always on time.
A model picked for each SKU, with a trust grade
Demand ESP sorts every SKU as steady, trending, seasonal or intermittent, backtests several models on its own history and keeps the best one. Each forecast gets an A to D grade with the reasons behind it.
Stockouts, seasons, promotions and new items
Sales lost to stockouts are added back, seasonal curves are borrowed from similar items when history is short, Demand Calendar events adjust the forecast for a set window, and new products start from look-alikes.
Your service level, your overrides
Set the target service level for the workspace (95% by default) and override safety stock on any item. Items with no forecast yet fall back to a simple days-of-cover buffer instead of a guess dressed up as statistics.
From buffer to purchase order
Safety stock only helps if someone reorders in time
Reorder automation you control
A reorder rule checks every SKU against its reorder point and drafts one purchase order per supplier and warehouse. Run it in Observe, Propose or Autopilot mode from the Automation page.
Text with Sparki
Get a text when an item reaches its reorder point and approve the drafted purchase order with one reply. Included on Solo ($99/mo) and up.
Spark MCP
Ask Claude, ChatGPT or any MCP client why an item carries the buffer it does. Spark answers from your live stock, lead times and Demand ESP forecasts.
Safety stock FAQ
Safety stock questions
What is the safety stock formula?+
The most complete version is safety stock = Z × √(average lead time × σ_demand² + average daily demand² × σ_lead time²), where Z comes from your target service level, σ_demand is the standard deviation of daily demand and σ_lead time is the standard deviation of the lead time in days. If your lead time never varies, it simplifies to Z × σ_demand × √(lead time).
What Z score should I use?+
Z depends on the service level you want: about 1.28 for 90%, 1.645 for 95%, 1.96 for 97.5%, 2.33 for 99% and 3.09 for 99.9%. Many businesses start at 95% and go higher for fast movers and items where a stockout loses the sale.
Is service level the same as fill rate?+
No. The service level in this formula is the cycle service level: the chance of not running out at all before the next order arrives. Fill rate is the share of units ordered that you ship from stock. A 95% cycle service level usually means a fill rate well above 95%, because most stockouts are short.
Which safety stock method should I use?+
Use the service level method when you have enough sales history to measure how much demand varies. The max and average method is quick but often oversizes the buffer, because it assumes the worst day and the worst lead time happen together. Days of cover is the simplest to explain but ignores how predictable each item is.
Why does safety stock grow so fast at high service levels?+
Z rises steeply near 100%. Going from 95% to 99% raises Z from about 1.645 to 2.33, roughly 40% more safety stock, and 99.9% needs nearly twice the 95% buffer. That is why it pays to set a high service level only where a stockout really costs you.
How does Spark Inventory calculate safety stock?+
Spark uses the same statistical formula, but measures variability from Demand ESP’s own forecast misses instead of raw demand swings. Once an item has three scored months of forecasts, its buffer is sized from how far the forecast actually missed over the last year at the horizon a new order lands; before that it uses the forecast’s confidence band. Lead time variability comes from completed purchase orders, and the target service level is a setting, 95% by default.
