Safety stock and service level
The buffer that protects you against selling more than expected or a late supplier. How big it is depends on the service level you choose: 95% by default.
On this page
The forecast says how much you expect to sell, but real sales never land exactly on it and suppliers do not always take the same time. Safety stock is what you order on top to cover both surprises.
Two risks that add up
- Demand varies during the lead time.
- The lead time varies, even with normal demand.
They combine the way two independent variations do: their squares add, not the values themselves.
safety stock = z × √( T × σd² + d² × σT² )
z service-level factor
T lead time + order frequency, in periods
σd variation of demand per period
d average demand per period
σT variation of the lead timeThe service level
It is the probability with which you want to cover demand while you wait for the order. More service level means more buffer, and the increase is not linear:
| Service level | z factor |
|---|---|
| 90% | 1.282 |
| 95% (factory) | 1.645 |
| 97% | 1.881 |
| 99% | 2.326 |
If you did not set one, StockAI uses 95% and marks it as estimated in "Why?". You change it in the product editor in Inventory, "Service level" field. To see the effect before touching anything, use a "Safety stock" rule in the scenario simulator.
Where the lead-time variation comes from
- From that supplier's real receptions, once at least 3 are recorded.
- Otherwise from the "Variability (days)" field on the supplier card: if it says 15 days but sometimes arrives in 18, put 3.
- If the product has no supplier and no variability, that term is zero and the buffer covers demand variation only.
When the buffer is measured instead of assumed
When the engine measured the forecast's real errors over the lead time, that measured buffer replaces the demand part of the formula (the lead-time part is still added). The screen says so: "This cushion comes from … own errors across the lead time, not from the textbook formula". It is the same range you see on the Forecasts chart.