Safety Stock Calculator (Basic, Z-Score & King's Formula)
Calculate safety stock three ways in one place: the basic max-min formula, the Z-score service-level method, and King's formula for when both demand and lead time vary. Everything runs in your browser - no sign-up, no server, and you can export the result to CSV. The calculator is pre-filled with a worked example, so you see a real answer immediately; change any number and it recalculates on the spot.
How to get this number
Put your daily sales for the item in a spreadsheet, one day per row, and run STDEV over the column in Excel or Google Sheets. Use daily buckets and at least a couple of months of history.
Stop calculating this by hand
Evenbatch tracks inventory, BOMs, and lot numbers for small manufacturers and syncs honestly with QuickBooks Online. $49.99/month flat, unlimited users, every feature included. Start your free trial, then enter code TOOLS30 on the Billing page for 30 days free - no card required.
Start freeWhat is safety stock?
Safety stock is extra inventory you hold beyond expected demand so that a demand spike or a late delivery does not cause a stockout. It is calculated from your demand and lead-time numbers - not guessed - and it becomes part of your reorder point, not a separate pile.
Every method on this page produces the same kind of answer: a number of units to hold as a buffer. The methods differ only in what data they need and how precisely they model your variability. Hold too little and you stock out during ordinary bad weeks; hold too much and you tie up cash in inventory that mostly sits there. The point of calculating instead of guessing is to put the buffer where your data says the risk actually is.
Three safety stock formulas - which one should you use?
All three methods are available in the calculator above, free and without sign-up. Pick based on the data you have:
| Method | Formula | Data you need | Best when |
|---|---|---|---|
| Basic max-min | (max daily demand x max lead time) - (avg daily demand x avg lead time) | Max and average demand, max and average lead time | You have no standard deviation data and want a quick, defensible buffer |
| Z-score | Z x demand std dev x sqrt(lead time) | Demand standard deviation, average lead time, target service level | Your lead time is steady but demand fluctuates |
| King's formula | Z x sqrt(avg lead time x demand variance + avg demand squared x lead time variance) | Everything above, plus lead time standard deviation | Both your demand and your supplier's delivery times swing |
The basic max-min method is the roughest of the three: it assumes your worst demand and your worst lead time land in the same cycle, which overstates risk for most items. The Z-score method sizes the buffer statistically to a service level you choose. King's formula (published by Peter L. King through APICS in 2011) extends the Z-score method to cover lead-time variability too - if your lead time never varies, it collapses to the plain Z-score result, which you can verify in the calculator by setting lead time standard deviation to zero.
Service level and the Z-score table
A service level is the share of replenishment cycles in which you do not stock out. The Z-score converts that target into a multiplier on your demand variability:
| Service level | Z-score | Expected stockout share |
|---|---|---|
| 90% | 1.28 | About 10% of cycles |
| 95% | 1.64 | About 5% of cycles |
| 98% | 2.05 | About 2% of cycles |
| 99% | 2.33 | About 1% of cycles |
95% is the common practical default because the cost curve is steep at the top: moving from 95% to 99% takes roughly forty percent more buffer stock (Z goes from 1.64 to 2.33) to remove the last few percentage points of risk. Reserve 98-99% for items where a stockout is genuinely expensive - a component that halts production, or a product with a contractual fill-rate commitment. For slow, cheap items, 90% is often plenty.
How to use this calculator
Pick the tab that matches your data. The fields are pre-filled with a worked example and the result is calculated as soon as the page loads; edit any number and the result updates immediately - the Calculate button is there if you prefer to press it. Shared fields keep their values when you switch tabs, and if enough fields are filled the result panel also shows a side-by-side comparison of all three methods so you can see how much the answer depends on the method.
If you enter your average daily demand and average lead time, the calculator also chains the result into a reorder point for you - safety stock is the buffer, but the reorder point is the number you actually act on. The Download CSV button exports your inputs, the Z-score, the safety stock, and the reorder point in one row, so you can paste it into the spreadsheet where the rest of your planning lives.
Worked examples
Basic max-min. Your item sells 40 units a day on average but has hit 60 on its best days. Your supplier averages 7 days but has taken 10. Safety stock = (60 x 10) - (40 x 7) = 600 - 280 = 320 units. With average demand and lead time entered, the chained reorder point is 40 x 7 + 320 = 600 units.
Z-score. Demand standard deviation is 12 units/day, lead time is a steady 9 days, and you want a 95% service level. Safety stock = 1.6449 x 12 x sqrt(9) = 59.2, rounded up to 60 units. At 99% the same inputs with a standard deviation of 8 and a 16-day lead time give 2.3263 x 8 x 4 = 74.4, rounded up to 75.
King's formula. Average demand 50 units/day with a standard deviation of 5; average lead time 10 days with a standard deviation of 2; 95% service level. Safety stock = 1.6449 x sqrt(10 x 25 + 2500 x 4) = 1.6449 x sqrt(10,250) = 166.5, rounded up to 167 units. Notice how much of that buffer comes from the lead-time term: 2,500 x 4 dwarfs 10 x 25, which is typical when a high-volume item meets an unreliable supplier.
These are the same numbers the calculator produces with the same inputs - try them.
Safety stock vs reorder point
The two get mixed up constantly, so here is the clean split. Safety stock answers "how big should my buffer be?" The reorder point answers "at what stock level do I place the next order?" The reorder point already contains the buffer: reorder point = (average daily demand x average lead time) + safety stock. You never act on safety stock directly - you act when stock falls to the reorder point, and the safety stock is what keeps you covered if that particular cycle goes badly. Once you have your buffer from this page, our reorder point calculator handles the trigger side, including EOQ for how much to order.
Common mistakes when setting safety stock
- Using monthly numbers in a daily formula. The standard deviation must be over daily buckets if your demand and lead time are in days. A monthly STDEV plugged into these formulas inflates the buffer massively.
- Treating a one-time spike as "maximum demand." One viral day two years ago is not your max. Use a maximum that recurs - the kind of bad week you actually expect to see again.
- Setting one service level for everything. A component that stops production deserves 98-99%; a slow accessory does not. Blanket service levels overspend on the tail of your catalog.
- Ignoring shelf life. For products that expire, a big buffer can quietly become a write-off. Check your buffer against remaining shelf life with our shelf life calculator, and rotate stock FEFO so the oldest-dated lots leave first.
- Calculating once and never revisiting. Demand variability drifts with seasons and suppliers change. Recheck quarterly - and recheck component buffers whenever a bill of materials changes, because a new recipe changes which components carry the risk.
Keeping safety stock live in QuickBooks Online
A calculator gives you the right number for today. The harder problem is keeping it true next month: demand shifts, a supplier slips, and the buffer you set in January quietly stops matching reality - usually discovered during a stockout. QuickBooks Online tracks quantities and costs, but it will not watch your reorder points for you, and for manufacturers it also lacks BOMs and lot tracking entirely.
Evenbatch sits on top of QuickBooks Online and keeps this loop running: reorder points with safety stock on every item, low-stock alerts when stock crosses the line, component demand driven by your BOMs, and lot-level expiry so buffers of dated stock rotate instead of expiring. It is $49.99/month flat with unlimited users, and it syncs honestly - every change is previewed and logged before it touches your books. If you would rather stop recalculating this by hand, start a free trial of Evenbatch.
Frequently asked questions
What is the safety stock formula?
The simplest formula is max-min: safety stock = (maximum daily demand x maximum lead time) - (average daily demand x average lead time). For example, (60 x 10) - (40 x 7) = 320 units. If you know your demand standard deviation, the Z-score method (Z x demand standard deviation x square root of lead time) sizes the buffer to a target service level instead.
What Z-score should I use for a 95% service level?
1.64 (more precisely 1.6449). Common values: 90% = 1.28, 95% = 1.64, 98% = 2.05, 99% = 2.33. A 95% service level means you would still expect to stock out in about 5% of replenishment cycles, which is why 95% is a common practical default.
What is King's formula for safety stock?
King's formula accounts for variability on both sides - demand and lead time: safety stock = Z x sqrt(average lead time x demand variance + average demand squared x lead time variance). Use it when your supplier's delivery times swing as much as your demand does. If lead time never varies, it collapses to the plain Z-score method.
How do I find my demand standard deviation?
Put your daily sales for the item into a spreadsheet, one day per row, and run STDEV over the column in Excel or Google Sheets. Use daily buckets that match the daily demand units in the formula, and cover at least a couple of months of history so a single spike does not dominate the result.
Is safety stock included in the reorder point?
Yes. Reorder point = (average daily demand x average lead time) + safety stock. Safety stock is the buffer; the reorder point is the trigger, and it already contains the buffer. This calculator shows the chained reorder point automatically when you enter your average demand and lead time.
Is this safety stock calculator really free?
Yes. No signup, no email capture, and no server - all three methods run entirely in your browser and you can export the result to CSV. Evenbatch, the company behind it, makes inventory software for small manufacturers on QuickBooks Online.
See something outdated or incorrect on this page? Email support@evenbatch.com and we will correct it within 48 hours. Last updated: July 18, 2026.