Safety stock calculation example: the formula worked for four items, plus an AI prompt
Short answerSafety stock = Z × √(lead time × demand std dev² + daily demand² × lead time std dev²), where Z comes from your target cycle service level (1.645 for 95%). Reorder point = daily demand × lead time + safety stock. Use actual lead times from your receipts and keep every input in the same time unit.
Fictional exampleExample Valve Co., its four items and every number below are made up. The formula assumes demand and lead time vary independently and roughly follow a normal curve; check that against your own history before you rely on it. Don't paste real supplier pricing or customer data into an AI tool; see the data-safety checklist.
Safety stock is the buffer that covers you when demand runs high or a delivery runs late. Too little and you stock out; too much and cash sits on a shelf until it becomes an excess and obsolete problem. This page works through the standard formula for four items, shows why lead-time variability usually matters more than people expect, and gives you a free template and an AI prompt that does the math with you. For more inventory prompts, see ChatGPT prompts for inventory management.
What is the safety stock formula?
Safety stock = Z × √(LT × σd² + d² × σLT²), where d is average daily demand, σd is the standard deviation of daily demand, LT is the average lead time in days, σLT is the standard deviation of lead time in days, and Z comes from your target cycle service level (the chance of not running out during one replenishment cycle).
Reorder point = d × LT + safety stock. Keep every input in the same time unit: if demand is per day, lead time must be in days.
| Target cycle service level | Z value |
|---|---|
| 90% | 1.282 |
| 95% | 1.645 |
| 98% | 2.054 |
| 99% | 2.326 |
The Z values come from the standard normal table, for example in the NIST/SEMATECH e-Handbook of Statistical Methods. In Excel or Google Sheets, =NORM.S.INV(95%) returns 1.645.
Worked example: four items, one formula
| Item | Daily demand | σ demand | Lead time (days) | σ lead time | Service level | Combined σ | Safety stock | Reorder point | Unit cost | Safety stock value |
|---|---|---|---|---|---|---|---|---|---|---|
| A | 40 | 12 | 10 | 2 | 95% | 88.5 | 146 | 546 | $8.00 | $1,168 |
| B | 5 | 4 | 30 | 8 | 98% | 45.6 | 94 | 244 | $120.00 | $11,280 |
| C | 200 | 30 | 5 | 1 | 90% | 211.0 | 271 | 1,271 | $1.50 | $406.50 |
| D | 12 | 6 | 20 | 6 | 95% | 76.8 | 127 | 367 | $45.00 | $5,715 |
| Total | $18,569.50 |
Math for item A: 10 × 12² = 1,440 and 40² × 2² = 6,400. √(1,440 + 6,400) = √7,840 = 88.5. Safety stock = 1.645 × 88.5 = 145.7, rounded up to 146 units. Reorder point = 40 × 10 + 146 = 546 units.
Why does lead-time variability matter so much?
Look at item D. If you ignore lead-time variability and use only demand variability, safety stock is 1.645 × √20 × 6 = about 44 units. With a lead-time standard deviation of 6 days it is 127 units, nearly three times as much. Item C shows the same thing: a one-day swing in lead time on a 200-a-day item outweighs all of its demand noise. That is why a supplier whose deliveries get less reliable can quietly make your safety stock too thin, even when demand hasn't changed.
What should you check before changing a setting?
- Use actual lead times. Calculate them from PO date to receipt date, not from the number typed into the system years ago.
- Clean the history. Remove one-off orders, returns and data errors before you calculate standard deviations, and write down what you removed.
- Pick service levels by item class. A 98% target on a cheap, fast-moving item costs little; on a $120 item with a 30-day lead time (item B) it is most of the total.
- Know which service level you mean. Z covers cycle service level, not fill rate. If your target is a fill rate, the math is different.
- Review on a schedule. Recalculate when lead times or demand shift, and at least quarterly for your top items.
Do it with AI
You are an inventory planner calculating safety stock and reorder points. Inputs, all anonymized, one row per item: item code, average daily demand, standard deviation of daily demand, average lead time (days), standard deviation of lead time (days), target cycle service level, unit cost. [PASTE TABLE] 1) For each item, find Z for the service level (90% = 1.282, 95% = 1.645, 98% = 2.054, 99% = 2.326). 2) Calculate combined standard deviation = square root of (lead time x demand std dev squared + daily demand squared x lead time std dev squared). Show your math for the first row. 3) Calculate safety stock = Z x combined standard deviation, rounded up, then reorder point = daily demand x lead time + safety stock, and safety stock value = safety stock x unit cost. 4) For each item, say whether demand variability or lead-time variability drives most of the safety stock. 5) List the three items where safety stock value is highest and one question to ask about each. Output: a table with columns item, Z, combined std dev, safety stock, reorder point, safety stock value, main driver; then the three items and questions. Keep it under 350 words. Use only the numbers I give. List any missing or inconsistent data instead of guessing.
What to check: recompute one row by hand or in the template, confirm the lead-time history with your receiving data, and agree service-level targets with your supply chain manager and Finance before you change system settings. For news that moves lead times, follow #lead times and #forecasting.
Free template
Download the safety stock template (CSV), pre-filled with the fictional Example Valve Co. items. Z, combined standard deviation, safety stock, reorder point and safety stock value are formulas.
FAQ
How do you calculate safety stock?
Multiply Z for your service level by the square root of (lead time × demand std dev squared + daily demand squared × lead time std dev squared). In the example on this page, item A needs 146 units.
What Z value should I use?
1.282 for 90%, 1.645 for 95%, 2.054 for 98% and 2.326 for 99% cycle service level. In Excel or Sheets, NORM.S.INV(service level) returns it.
Why include lead-time variability?
Because late or uneven deliveries often drive more of the buffer than demand swings. In the example, item D needs about 44 units on demand variability alone and 127 once lead-time variability is included.
How is reorder point different from safety stock?
Reorder point is the stock level that triggers a new order: expected demand during the lead time plus safety stock.
Can ChatGPT calculate safety stock?
It can do the arithmetic and explain the drivers from an anonymized table. Recheck one row yourself, and never let it invent demand or lead-time history.
Is there a safety stock template?
Yes. The CSV on this page opens in Excel or Sheets with the formulas filled in.