What the Safety Stock Calculator does
This calculator works out safety stock - the buffer you hold so that normal ups and downs in demand and supplier lead time do not empty the shelf before the next delivery arrives. It gives the answer from four textbook methods side by side, because they answer slightly different questions and the gap between them is often the most useful thing to see.
Three of the methods are statistical: they turn a service level such as 95% into a Z value using the inverse of the normal distribution, then scale it by how much demand, lead time or both vary. The fourth, maximum minus average, uses no statistics at all. Units are carried through explicitly: whatever you enter per week or in weeks is converted to days first, and the conversion is shown.
How to use it
- Choose whether your demand figures are per day or per week, and how many days your week has. Use 5 or 6 if you count working days - and then count lead time in working days too.
- Enter average demand and its standard deviation. Take both from the same history, for example the last 13 or 26 weeks of sales for this item.
- Enter the average supplier lead time and its standard deviation, from the gap between order and receipt on recent purchase orders. Enter 0 if lead time never varies.
- Set the cycle service level: the chance of not running out during one lead time. 95% means about one stock-out in twenty order cycles.
- Optionally open the maximum figures section and enter the highest demand and longest lead time you have seen, to compare against the simple max-minus-average rule.
- Read the table of methods and the chart, then copy the summary or download the CSV with the working.
Reading the results
The headline uses the combined method, Z x sqrt(L x sigma_d^2 + d^2 x sigma_L^2), because it is the only one of the three statistical methods that accounts for both sources of uncertainty. Use the demand-only figure if your supplier is genuinely reliable, and the lead-time figure only if demand is almost constant.
The service-level chart shows why chasing 99.9% is expensive: Z rises from 1.64 at 95% to 2.33 at 99% and 3.09 at 99.9%, so the buffer nearly doubles between 95% and 99.9% for the same item.
Safety stock covers is the buffer divided by average daily demand - how many extra days of sales it represents. It is a quick sense check: a slow-moving spare part and a fast-moving grocery line should not end up with the same number of days.
Worked example: a shop item with variable demand and a variable supplier
An item sells 20 units a day on average with a standard deviation of 5 units a day. The supplier takes 9 days on average, with a standard deviation of 2 days. The target is a 95% cycle service level, so Z = 1.644854.
Demand variability only: 1.644854 x 5 x sqrt(9) = 1.644854 x 15 = 24.7 units. Lead-time variability only: 1.644854 x 20 x 2 = 65.8 units. Both combined: sqrt(9 x 25 + 400 x 4) = sqrt(1,825) = 42.72, and 1.644854 x 42.72 = 70.3 units, rounded up to 71.
The worst week on record saw 30 units a day and the slowest delivery took 12 days, so max minus average gives 30 x 12 - 20 x 9 = 360 - 180 = 180 units - more than two and a half times the statistical answer, because it assumes the worst demand and the worst delay coincide.
With 71 units of safety stock the reorder point is 180 + 70.3 = about 250 units, and the buffer covers roughly 3.5 days of average sales.
Formulas and scoring rules
- Service factor
Z = invNorm(service level)Inverse standard normal (Acklam's approximation, accurate to about 1e-9). 90% -> 1.2816, 95% -> 1.6449, 98% -> 2.0537, 99% -> 2.3263.- Demand variability only
SS = Z x sigma_d x sqrt(L)sigma_d is the SD of daily demand; L is the average lead time in days.- Lead-time variability only
SS = Z x d x sigma_Ld is average daily demand; sigma_L is the SD of lead time in days.- Both, assumed independent
SS = Z x sqrt(L x sigma_d^2 + d^2 x sigma_L^2)The headline figure. Collapses to the demand-only formula when sigma_L = 0.- Maximum minus average
SS = (d_max x L_max) - (d x L)No service level; a rule of thumb that usually over-stocks.- Weekly to daily
d_day = d_week / k; sigma_day = sigma_week / sqrt(k); L_days = L_weeks x kk is the days in your week (7, 6 or 5). The SD rule assumes independent days. The headline rounds up to the next whole unit; the table shows one decimal.
Which standard deviation to use
The formulas need the standard deviation of demand per day, not per month. If you only have monthly history, dividing the monthly SD by sqrt(30) is a rough fix that assumes days are independent - real demand often has promotions and seasonality that make it lumpier than that, so the answer will be optimistic.
Measure demand as what customers asked for, not what you shipped. Days when you were already out of stock record zero sales, which understates both the average and the variability and quietly shrinks the buffer the calculator recommends.
Cycle service level is not fill rate
A 95% cycle service level means 95% of order cycles finish without a stock-out. It does not mean 95% of units demanded are supplied - that is fill rate, which is usually much higher for the same buffer because a stock-out near the end of a cycle only misses a few units. Fill-rate targets need a different calculation using the normal loss function, which this tool does not do.
Limitations: what the result does not prove
- The statistical methods assume demand and lead time are roughly normal and independent. Intermittent demand (many zero days) and seasonal items break that assumption, and the buffer will be wrong.
- The answer is only as good as the history behind the averages and standard deviations. A few weeks of data, or data that includes stock-out days, gives an unreliable figure.
- Safety stock protects against variability, not against trend. If demand is growing, update the average - a bigger buffer is the wrong fix.
- It does not optimise cost. A higher service level is not automatically better; that trade-off is a business decision about holding cost against the cost of a lost sale.
Privacy: where your data goes
Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics. Session recording and tag-manager scripts are switched off on this page.
Standards and sources
- NIST/SEMATECH e-Handbook of Statistical Methods - checked 19 Sep 2026
- NIST/SEMATECH e-Handbook of Statistical Methods - Normal distribution
- NIST/SEMATECH e-Handbook - Standard normal cumulative distribution table
Frequently asked questions
What service level should I use for safety stock?
There is no universal right answer. Many businesses use 90-95% for ordinary lines and 97-99% for items where a stock-out loses a customer or stops a production line. The chart shows what each extra point costs in units, which is the evidence you need for that decision.
Why are there several different safety stock formulas?
They model different uncertainty. One covers only demand swings, one only late deliveries, one both at once, and max-minus-average ignores probability altogether. Seeing them together shows which uncertainty drives your buffer, which tells you whether to work on forecasting or on the supplier.
How do I convert weekly demand standard deviation to daily?
Divide it by the square root of the number of days in your week, not by the number of days. A weekly SD of 35 units in a 7-day week is 35 / 2.6458 = 13.2 units a day. That rule assumes days are independent of each other.
Is the Z value for 95% really 1.64 and not 1.96?
Yes, for safety stock. The question is one-sided - you only care about running out, not about having too much - so 95% maps to 1.645. The 1.96 figure is for two-sided confidence intervals, where 2.5% is left in each tail.
What if my supplier's lead time never changes?
Enter a lead-time standard deviation of zero. The lead-time method then gives nothing, and the combined formula becomes exactly the demand-only formula, Z x sigma_d x sqrt(L), which is the correct buffer when only demand varies.
Why is max minus average so much higher than the other methods?
Because it plans for your worst demand day and your slowest delivery happening at the same time. That is possible, but for independent causes it is rare, so the result is usually a generous buffer with no stated probability behind it. It is simple to explain, which is why it survives.
Last reviewed by the A2Z.Tools team against the sources listed above.