Safety stock is the stock you hold for the days that go wrong. Demand runs high, or the delivery runs late, and the buffer is what keeps the shelf from emptying before the next order lands.
The usual formula covers only the first of those. The EOQ note uses it: z · σ · √L, with a fixed lead time. This note adds the late truck.
The numbers below are a made-up product, chosen to be easy to check.
The setup
- Average daily demand d = 20 units, with standard deviation σd = 5 units a day.
- Average lead time L = 9 days, with standard deviation σL = 2 days.
- Target: a 95 percent chance of not running out in a cycle, so z = 1.645.
The safety stock formula with variable lead time
Safety stock formula: SS = z · √(L · σd² + d² · σL²). The square root is the standard deviation of demand over the lead time, when both demand and lead time vary and the two are independent.
Each term inside the root is one source of risk. L · σd² is demand being noisy for L days. d² · σL² is the lead time itself moving, which shifts d units of demand into or out of the gap for every day the truck is early or late.
On the numbers: 9 × 5² = 225, and 20² × 2² = 1,600. The root of 1,825 is 42.72 units, and 1.645 × 42.72 = 70.3 units of safety stock.
Reorder point: ROP = d · L + SS = 20 × 9 + 70.3 = 250.3. Order when stock falls to 251.
Where the buffer goes
Run each source of risk on its own and the split is lopsided:
| What varies | Formula | Safety stock |
|---|---|---|
| Demand only | z · σd · √L | 24.7 |
| Lead time only | z · d · σL | 65.8 |
| Both, added (wrong) | 24.7 + 65.8 | 90.5 |
| Both, combined | z · √(L·σd² + d²·σL²) | 70.3 |
Two things in that table matter.
First, the buffers do not add. Variances add, standard deviations do not, because a high-demand week and a late truck rarely land together. Adding the two numbers holds 20 units too many, 29 percent over.
Second, the lead time is 1,600 of the 1,825 inside the root. Halve the supplier's spread to one day and safety stock falls to 41.1, down 41 percent. Halve the demand spread instead and it falls to 66.9, down 5 percent.
So before buying a better forecast, I would get the supplier on time. On these numbers it is worth eight times as much stock.
Safety stock calculator
Change any input and the safety stock, the reorder point and the fill rate are worked out again with the formulas above. It opens on the same product, so the first answer is 70.3 units and a reorder point of 251.
Safety stock calculator with variable lead time
Everything is computed in your browser. The defaults are the product worked above.
What each service level costs
The same σ of 42.72 units at other targets:
| Chance of not running out in a cycle | z | Safety stock | Reorder point |
|---|---|---|---|
| 90% | 1.282 | 54.7 | 235 |
| 95% | 1.645 | 70.3 | 251 |
| 97.5% | 1.960 | 83.7 | 264 |
| 99% | 2.326 | 99.4 | 280 |
| 99.9% | 3.090 | 132.0 | 313 |
Going from 95 to 99 percent costs 29 more units. Going from 99 to 99.9 costs 33 more, for a tenth of the gain. The z values come from the normal table.
Fill rate is not service level
"95 percent service" means two different things, and the gap between them is large.
Cycle service level is the chance a cycle ends without a stockout. That is what z sets, and what everything above uses.
Fill rate is the share of demand served from the shelf. A cycle that runs short by one unit fails the first test and barely dents the second.
The expected shortage per cycle is σ · G(z), where G(z) = φ(z) − z · (1 − Φ(z)). At z = 1.645 that is 42.72 × 0.0209 = 0.89 units. With orders of Q = 600 units, the fill rate is 1 − 0.89 / 600 = 99.85 percent.
Turn it around. If the target is really a 99 percent fill rate, z only needs to be 0.71, and safety stock is 30.3 units, not 70.3. A buyer who reads a fill-rate target as a cycle service level holds 40 units nobody needed.
Where the formula breaks
- It assumes demand and lead time are independent. A supplier who runs late exactly when everyone is ordering breaks that, and the true buffer is larger.
- It assumes the history is demand, not sales. On sold-out days sales understate demand, and both d and σd come out too low. That is censored demand.
- It assumes a normal spread. Slow movers that sell zero most days and a few units now and then are not normal, and intermittent demand needs its own method.
- σd should be the spread of forecast errors, not of raw demand. A trend or a season inflates raw σ and buys stock against movement the forecast already expected. See forecast bias.
References
- Silver, E. A., Pyke, D. F. and Thomas, D. J. Inventory and Production Management in Supply Chains, 4th edition. CRC Press, 2017.
- Chopra, S. and Meindl, P. Supply Chain Management: Strategy, Planning, and Operation, 6th edition. Pearson, 2016.