Safety Stock Calculator Widget
Add the textbook safety stock formula to your supply chain content. Readers choose a cycle service level, enter average demand and its standard deviation, the lead time and, if deliveries vary, its standard deviation, and get the safety stock, the Z score used and the reorder point.
Live preview
Under the widget on your page: Powered by A2Z Tools
Embed code
<iframe src="https://a2z.tools/embed/w/safety-stock-calculator" title="Safety Stock Calculator by A2Z Tools" width="100%" height="560" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>
A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.
<div data-a2z-widget="safety-stock-calculator" data-height="560"></div> <script async src="https://a2z.tools/embed.js"></script>
Adds a small script (what it does) that sizes the widget to fit its content, loads it lazily and keeps it isolated from your page's CSS.
Works with
How it works
The service level is turned into a Z score with an accurate inverse of the standard normal distribution (Acklam's rational approximation, good to about nine significant digits): 90% gives 1.2816, 95% gives 1.6449, 98% gives 2.0537 and 99% gives 2.3263, matching published normal tables. Safety stock is Z times the standard deviation of demand over the replenishment lead time. When demand and lead time vary independently, the two variances add: SS = Z x sqrt(LT x sd_d^2 + d^2 x sd_LT^2). At 95% with 50 units a day, a daily standard deviation of 10, a 7-day lead time and a one-day lead-time standard deviation, that is 1.6449 x sqrt(700 + 2,500) = 93.05, so 94 units after rounding up. The reorder point adds the average lead-time demand of 350. Every input must use the same period - days, weeks or months - and the selector only changes the labels. Service levels are limited to 50-99.99% because 100% would need infinite stock.
Calculation method
- Z = inverse standard normal CDF of the cycle service level
- Safety stock = Z x sqrt(LT x sd_d^2 + d^2 x sd_LT^2)
- d = average demand per period, sd_d = its standard deviation, LT = average lead time in periods, sd_LT = lead-time standard deviation
- With a fixed lead time (sd_LT = 0): safety stock = Z x sd_d x sqrt(LT)
- Reorder point = d x LT + safety stock; both rounded up to whole units
Worked examples
Variable demand and lead time
Inputs: 95% service; 50 a day, SD 10; lead time 7 days, SD 1 day
Result: Z 1.6449; safety stock 94 units (93.05); reorder point 444
Lead-time variability contributes 2,500 of the 3,200 variance - it dominates.
Fixed lead time
Inputs: 95% service; SD 10 a day; lead time 4 days; no lead-time variation
Result: Safety stock 33 units (32.90)
1.6449 x 10 x sqrt(4) = 32.90; doubling the lead time would raise it only by sqrt(2).
Limitations
- Assumes demand and lead time are independent and roughly normal; lumpy, intermittent demand needs other methods.
- Gives a cycle service level, not a fill-rate target.
- Does not include a review period; for periodic review add the review interval to the lead time.
Where publishers use it
- Supply chain and operations-management lectures on service levels
- A distributor's blog post on why fast movers and slow movers need different buffers
- ERP and inventory-planning software documentation
- Procurement teams preparing a stocking policy for imported parts with long, variable lead times
- Retail category managers setting store-level buffers before promotions
Questions
What does a 95% service level mean here?
It is the cycle service level: in 95% of replenishment cycles stock does not run out before the delivery arrives. It is not the same as fill rate, the share of units demanded that are shipped from stock, which is usually higher for the same buffer.
Why does safety stock jump so much between 98% and 99.9%?
Because the normal distribution's tail thins out. Z rises from 2.05 at 98% to 2.33 at 99% and 3.09 at 99.9%, so the last few points of service cost far more stock than the first. Many companies set 90-98% and reserve higher levels for critical items.
How do I get the standard deviation of demand?
Take at least 12 periods of demand history - for example daily sales for three months - and compute the sample standard deviation in a spreadsheet with STDEV.S. Use the same period length as the average demand and lead time.
Can I check it against a published example?
Yes. Peter King's APICS article uses a weekly standard deviation of 10, an average of 50 a week, a lead time of 8/7 weeks with a standard deviation of 0.07 weeks and Z = 1.65, and gets about 18.6 units. With the exact Z of 1.6449 the widget returns 18.51.
When should I not add the two variances?
When demand and lead time are linked - for example a supplier that is slower exactly when everyone is ordering more. Then the safe approach is to add the two safety stocks: Z x sd_d x sqrt(LT) + Z x d x sd_LT, which gives a larger buffer.
Sources
- Crack the Code: Understanding safety stock and mastering its equations (P. L. King, APICS magazine, July/August 2011) - MIT course 2.810 readings (reprint of APICS magazine) . Gives the combined demand and lead-time variability formula, the Z table (90% 1.28, 95% 1.65, 98% 2.05, 99% 2.33) and the worked example. Checked 2026-10-01.
- Cumulative Distribution Function of the Standard Normal Distribution (e-Handbook 1.3.6.7.1) - NIST/SEMATECH e-Handbook of Statistical Methods . Normal table used to verify the Z values; area 0 to 1.28 = 0.3997. Checked 2026-10-01.
Cite or recommend this tool
If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.
A2Z Tools Safety Stock Calculator https://a2z.tools/safety-stock-calculator
<a href="https://a2z.tools/safety-stock-calculator">A2Z Tools Safety Stock Calculator</a>
[A2Z Tools Safety Stock Calculator](https://a2z.tools/safety-stock-calculator)
Safety Stock Calculator by A2Z Tools - https://a2z.tools/safety-stock-calculator
Related widgets
-
The stock level that should trigger a purchase order, and how many days remain before you hit it.
-
Economic order quantity, orders per year and the lowest ordering-plus-holding cost, with a cost curve.
-
Mean, median, mode, range, variance, standard deviation and quartiles of any list of numbers.
-
Availability, Performance, Quality and overall equipment effectiveness from shift data.
-
The production pace customer demand requires, plus the operators a line needs to hold it.
-
Measured seconds per unit and hourly throughput, checked against a target takt if you have one.