The Formula, Term by Term
Safety Stock (units) = Z x σd (units/day) x √L (days)
| Term | What it is | Unit |
|---|---|---|
| Z | Score for your service level | none |
| σd | Standard deviation of daily demand | units per day |
| L | Average lead time, order placed to stock you can sell | days |
The days cancel out, so the answer is in units. That is the number of extra units to keep on hand.
The square root matters. Demand swings do not all stack up in one direction. Some days run high and some run low, so they partly cancel. Four times the lead time needs twice the buffer, not four times.
Pick Your Z Score
Z sets how often you are willing to run out. These are the standard values from a normal table:
| Service level | Z | In plain words |
|---|---|---|
| 90% | 1.28 | Out of stock in about 1 of 10 order cycles |
| 95% | 1.65 | Out of stock in about 1 of 20 order cycles |
| 97.5% | 1.96 | Out of stock in about 1 of 40 order cycles |
| 99% | 2.33 | Out of stock in about 1 of 100 order cycles |
We start most SKUs at 95%. Safety stock moves in step with Z, so the 99% buffer is 2.33 / 1.65 times the 95% buffer. We spend that extra on best sellers, not on everything. Example 2 below runs it on one SKU.
The Max-Minus-Average Formula
No standard deviation? This form needs four numbers you already know:
Safety Stock = (Max Daily Sales x Max Lead Time) - (Avg Daily Sales x Avg Lead Time)
It asks one question. What if your best sales day and your slowest supplier hit at the same time? The answer is the gap between that worst case and a normal cycle.
It is simple, and it runs high. Both worst cases rarely land together. The table under Which Formula to Use, further down, shows when it is still the right pick.
Worked Examples
These are illustrative numbers for one SKU, used in Examples 1 to 3 so you can compare them.
The SKU sells 20 units a day on average. Its best day was 30 units. Daily sales have a standard deviation of 6 units. Lead time averages 16 days, and the slowest order took 21 days.
Example 1: Z-score at 95%
Safety Stock = 1.65 x 6 x √16
= 1.65 x 6 x 4
= 39.6, round up to 40 units
Hold 40 extra units. At 20 sales a day, that is 2 days of cover.
Example 2: The same SKU at 99%
Safety Stock = 2.33 x 6 x √16
= 2.33 x 6 x 4
= 55.9, round up to 56 units
16 more units buy you the drop from 1 miss in 20 cycles to 1 in 100. On a hero SKU that may be worth it. On a slow seller it is cash on a shelf.
Example 3: Max-minus-average
Safety Stock = (30 x 21) - (20 x 16)
= 630 - 320
= 310 units
Same SKU, 310 units. That is almost eight times the Z-score answer at 95%. The gap is the price of planning for the worst day and the worst shipment at once. If you can pull a standard deviation from your sales report, the Z-score form will free up most of that cash.
Example 4: Weekly numbers for an Amazon FBA SKU
This one is a different SKU, also with illustrative numbers. The seller tracks it by the week. It averages 70 units a week, with a standard deviation of 21 units a week. From order to available at Amazon takes about 6 weeks. The target is 97.5%.
Keep everything in weeks:
Safety Stock = 1.96 x 21 x √6
= 1.96 x 21 x 2.449
= 100.8, round up to 101 units
A common slip pairs the weekly standard deviation with a lead time of 42 days:
Safety Stock = 1.96 x 21 x √42
= 1.96 x 21 x 6.481
= 266.8 units
That is about 2.6 times too much, because a weekly swing was paired with a lead time in days. Same SKU, wrong units. If your demand numbers are per week, your lead time is in weeks. If they are per day, it is in days.
How the Calculator Gets σd
The calculator above asks for max and average daily sales, not a standard deviation. It estimates one from them:
σd ≈ (Max Daily Sales - Avg Daily Sales) / 3.29
That treats your max day as a rare high point, about 3.29 standard deviations above the mean. It is a fair shortcut when you have no other data. If your report gives you a real standard deviation, run the formula by hand with that number instead.
With the calculator's starting numbers (average 20, max 35, lead time 14 days, 95%), σd comes out at 4.56. The Z-score result is 28.1 units. The max-minus-average result, using a 21-day max lead time, is 455 units.
When Lead Time Varies Too
The formula above assumes your lead time is steady. If your supplier is sometimes on time and sometimes a week late, a longer form adds lead time spread to demand spread:
Safety Stock = Z x √(L x σd² + d² x σL²)
L is average lead time in days, d is average daily sales, and σL is the standard deviation of lead time in days. Measure each lead time from order placed to stock you can sell, with the same start and end points for every receipt. The form assumes demand and delays move independently. If your busy weeks and your late shipments tend to land together, test that case by hand as well. NC State's safety stock tutorial
Illustrative example. A SKU sells 10 units a day with a σd of 3, lead time averages 30 days with a σL of 5 days, and the target is 95%:
Safety Stock = 1.65 x √(30 x 9 + 100 x 25)
= 1.65 x √2,770
= 86.8, round up to 87 units
With steady lead time, the same SKU needs 1.65 x 3 x √30 = 28 units. The extra 59 units cover delivery risk under this model. Check each supplier's receipts before you reuse one buffer for all of them. How to size safety stock by vendor
Buffer Days When Records Are Thin
With too little history for any standard deviation, size the buffer in days of cover:
Safety Stock = Expected Daily Sales x Buffer Days
Pick the buffer days from a plausible delay for that supplier or route, and check what the extra units cost. Illustrative example: at 10 units a day, five buffer days is 50 units. With a 30-day lead time you expect to sell 300 units while you wait, so the reorder point is 350.
Run that buffer against a longer wait before you use it. If sales rise to 12 a day and the supplier takes 35 days, you need 420 units. Ordering at 350 with nothing else due leaves you 70 units short.
Which Formula to Use
| Your situation | Use |
|---|---|
| Little or no usable sales history | Buffer days, then stress-test it |
| Less than about 90 days of sales history | Max-minus-average |
| Steady supplier, enough daily history to get σd | Z-score |
| Lead time that varies from order to order | Combined form (see When Lead Time Varies Too) |
| A stockout costs far more than the extra stock | Max-minus-average, or Z-score at 99% |
| Slow, cheap items where cash matters more | Z-score at 90% |
Start with the Z-score form whenever you have the data, and treat max-minus-average as an upper bound. If the two land close together, either one is safe to use. If they land far apart, find out which worst case makes the gap: the best sales day or the slowest shipment.
Safety Stock and Buffer Stock
They are the same thing. Some planners say buffer stock for spare units held against sales spikes. In day-to-day use the two words mean one number. Every formula on this page works for either.
Where the Number Goes Next
Safety stock is not a trigger on its own. It is one input to your reorder point:
Reorder Point = (Avg Daily Sales x Lead Time) + Safety Stock
For the SKU in Example 1, that is (20 x 16) + 40 = 360 units. When stock falls to 360, place the order. Run it on your own numbers in the reorder point calculator.
To see your buffer in days, divide it by daily sales. 40 units at 20 a day is 2 days. The days of supply calculator does the same for your whole stock on hand.
Put the Buffer Where You Can Sell It
For Amazon FBA, measure lead time through the point when Amazon makes the units available for sale, including the prep, freight and receiving time you depend on. Stock at your own warehouse helps only if you can move it to FBA in time. Check Amazon's storage fees before moving the full buffer there. Amazon FBA fees and FBA fee changes for 2027
If Shopify and another channel draw from the same shelf, size one buffer from their combined demand. Keep a separate buffer for stock that takes time to move between locations. Multi-channel inventory planning
When the Formula Breaks
The Z-score form assumes daily sales follow a bell curve. That holds for steady sellers. It fails in three common cases:
Seasonal SKUs. A standard deviation taken across peak and off-peak months is too wide for the quiet months and too narrow for the busy ones. Work out σd for the season you are buying for.
New products. With a few weeks of sales, the standard deviation is a guess. Use max-minus-average until you have about 90 days.
Lumpy sellers. A SKU that sells 0 most days and 40 on a few is not a bell curve. Lean on max-minus-average and check it by hand. A few large orders can use up a buffer sized on average daily demand in one afternoon.
Check any buffer against history before you order on it. Replay past receipt dates and count how many units you would have had left if you had ordered at the proposed reorder point. For a new item, start from a comparable SKU and compare the first few receipts and sales against the plan.
Recalculate when sales or lead time move. A buffer we set last spring is sized for last spring.