Safety Stock Formula and Calculator
Safety stock = Z × √(LT × σD² + D² × σLT²). At 95% service (Z ≈ 1.645), 120 ± 35 units a day and a 21 ± 6 day lead time need 1,214 units.
Basic-method, review period and cost inputs
The holding rate is an example. Replace it with your own cost of capital, storage and risk.
Formula with your numbers1.645 × √(21 × 35² + 120² × 6²) = 1,213.3 → 1,214 units
Every method on your numbers
| Method | Safety stock | Days of cover | Reads as |
|---|---|---|---|
| Basic (max minus average) | 3,940 units | 32.8 | Worst case, no service level |
| Demand variability | 264 units | 2.2 | At your service level |
| Lead-time variability | 1,185 units | 9.9 | At your service level |
| Combined (independent) | 1,214 units | 10.1 | At your service level |
| Combined (added terms) | 1,449 units | 12.1 | Upper bound if the two move together |
| Percentage of lead-time demand | 1,260 units | 10.5 | Rule of thumb |
The calculation runs in your browser. Results round up to whole units, because a fraction of a unit cannot cover demand.
How to Calculate Safety Stock in 5 Steps
- Pull daily demand per SKU. Use units sold per day from order history, with stockout days removed.
- Measure the spread of demand. The standard deviation of those daily figures is σD.
- Measure real lead times. Take purchase order date to goods received for past receipts. The average is LT and the standard deviation is σLT.
- Turn a service level into Z. Read it from the table below, or use =NORM.S.INV(level) in Excel.
- Apply the formula and round up. Z × √(LT × σD² + D² × σLT²), rounded up to the next whole unit.
| Method | Formula | Use it when | Where it fails |
|---|---|---|---|
| Basic | (Dmax × LTmax) − (D × LT) | History is too short for a standard deviation. | No service level. One freak week sets the buffer for good. |
| Demand variability | Z × σD × √LT | The supplier is reliable and lead time barely moves. | Ignores late deliveries entirely. |
| Lead-time variability | Z × D × σLT | Demand is steady but arrivals swing. | Ignores demand spikes. |
| Combined (independent) | Z × √(LT × σD² + D² × σLT²) | Both demand and lead time vary. The default for imported stock. | Needs real receipt history to be honest. |
| Combined (added terms) | Z × σD × √LT + Z × D × σLT | Late deliveries and demand spikes tend to arrive together. | Overstates the buffer when they are independent. |
| Percentage | % × D × LT | A quick first number for a new SKU. | Not linked to variability or service. |
Service Level Z Score Table
Z is the inverse of the standard normal distribution at your cycle service level. Values are computed to three decimals; the last column applies each one to the example inputs.
| Service level | Z score | Stockout cycles per 100 | Safety stock on the example | Typical use |
|---|---|---|---|---|
| 50% | 0.000 | 50 | 0 units | No buffer. Average demand over lead time is covered and half of cycles run short. |
| 80% | ≈ 0.842 | 20 | 621 units | Cheap, easily substituted items. |
| 85% | ≈ 1.036 | 15 | 765 units | Long-tail SKUs you stock but do not protect heavily. |
| 90% | ≈ 1.282 | 10 | 946 units | Steady B items with a supplier who can expedite. |
| 92% | ≈ 1.405 | 8 | 1,037 units | A step between B and A protection. |
| 95% | ≈ 1.645 | 5 | 1,214 units | A common default for A items. |
| 97% | ≈ 1.881 | 3 | 1,388 units | Fast movers where a stockout loses the listing or the sale. |
| 98% | ≈ 2.054 | 2 | 1,515 units | Top revenue SKUs. |
| 99% | ≈ 2.326 | 1 | 1,717 units | Items where a stockout carries a penalty. |
| 99.5% | ≈ 2.576 | 0.5 | 1,901 units | Critical parts or contract lines. |
| 99.9% | ≈ 3.090 | 0.1 | 2,280 units | Rarely worth it. Fix the lane first. |
1.645 or 1.65?
At 95% the exact Z is about 1.6449. Tables that round it to 1.65 return 1,218 units on the example instead of 1,214. Small per SKU, but it repeats on every SKU set to 95%.
Cycle service level is not fill rate
Cycle service level counts replenishment cycles with no stockout. Fill rate counts the share of units shipped from stock. The same buffer gives a different figure on each measure.
A Columbus, Ohio Brand Importing by Ocean
A home-goods brand ships one hero SKU from a fulfillment center in Columbus, Ohio. Stock arrives from an overseas supplier by ocean, and twelve months of history give these inputs.
| Method | Substituted | Raw result | Safety stock | Days of cover |
|---|---|---|---|---|
| Basic (max minus average) | (190 × 34) − (120 × 21) | 3,940.0 | 3,940 units | 32.8 |
| Demand variability | 1.645 × 35 × √21 | 263.8 | 264 units | 2.2 |
| Lead-time variability | 1.645 × 120 × 6 | 1,184.3 | 1,185 units | 9.9 |
| Combined (independent) | 1.645 × √(21 × 35² + 120² × 6²) | 1,213.3 | 1,214 units | 10.1 |
| Combined (added terms) | 1.645 × 35 × √21 + 1.645 × 120 × 6 | 1,448.1 | 1,449 units | 12.1 |
| Percentage of lead-time demand | 50% × 120 × 21 | 1,260.0 | 1,260 units | 10.5 |
- The combined formula gives 1,214 units, about 10.1 days of cover, worth $16,996 at $14 a unit.
- The reorder point is 2,520 units of lead-time demand plus 1,214 of safety stock: 3,734 units.
- Lead-time variability is 95% of the variance under the square root, so the demand-only formula returns just 264 units.
- The basic method's 3,940 units protects against the worst observed case, not a stated service level.
What Each Extra Point of Service Costs
Z rises faster near the top of the range, so the last points of service are the expensive ones. This table follows the calculator inputs above.
| Service level | Z | Safety stock | Step from previous | Stock value |
|---|---|---|---|---|
| 80% | ≈ 0.842 | 621 | — | $8,694 |
| 85% | ≈ 1.036 | 765 | +144 | $10,710 |
| 90% | ≈ 1.282 | 946 | +181 | $13,244 |
| 95% | ≈ 1.645 | 1,214 | +268 | $16,996 |
| 97% | ≈ 1.881 | 1,388 | +174 | $19,432 |
| 98% | ≈ 2.054 | 1,515 | +127 | $21,210 |
| 99% | ≈ 2.326 | 1,717 | +202 | $24,038 |
| 99.5% | ≈ 2.576 | 1,901 | +184 | $26,614 |
| 99.9% | ≈ 3.090 | 2,280 | +379 | $31,920 |
Combined formula on the example inputs, rounded up to whole units.
90% to 95%
Five points of service for 28% more buffer on the example.
95% to 99%
Four points for 41% more. Worth it on hero SKUs, hard to justify catalog-wide.
99% to 99.9%
Under one point for 33% more again. Check the lead-time lever below first.
Choosing a Service Level by ABC Class
One service level for every SKU over-protects the long tail and under-protects the sellers that matter. Rank SKUs by revenue, then give each class its own target.
| Class | Typical SKUs | Starting level | Z | If the example SKU were this class |
|---|---|---|---|---|
| A | Top sellers that drive most revenue | 97% | ≈ 1.881 | 1,388 units ($19,432) |
| B | Steady middle of the catalog | 95% | ≈ 1.645 | 1,214 units ($16,996) |
| C | Long tail, easy to substitute or backorder | 90% | ≈ 1.282 | 946 units ($13,244) |
The starting levels are examples to adjust, not industry rules. Raise a class when a stockout costs more than holding the extra stock.
Price the stockout
Lost margin, a lost marketplace listing, expedited freight and a retailer chargeback all count. The higher that cost, the higher the level.
Price the buffer
Multiply the extra units by unit cost and your holding rate. The calculator shows the annual holding cost for the level you enter.
Review by class
Re-rank SKUs when sales mix changes. A product that slips from A to B can release stock without touching its formula.
Where the Numbers Come From
Average daily demand
Units sold per selling day, per SKU, across every channel that draws on the same stock.
Demand deviation
STDEV.S over the same daily column. Strip promotions and stockout days first.
Lead time
Order date to goods received and available to sell, not the supplier's quoted lead time.
Lead-time deviation
STDEV.S over those receipt times. More receipts give a steadier estimate.
| Cell | Holds | Excel formula |
|---|---|---|
| B1 | Z at 95% | =NORM.S.INV(0.95) |
| B2 | Average daily demand | =AVERAGE(Sales!B:B) |
| B3 | Demand deviation | =STDEV.S(Sales!B:B) |
| B4 | Average lead time | =AVERAGE(Receipts!D:D) |
| B5 | Lead-time deviation | =STDEV.S(Receipts!D:D) |
| B6 | Safety stock | =ROUNDUP(B1*SQRT(B4*B3^2+B2^2*B5^2),0) |
Safety Stock vs Reorder Point vs Cycle Stock
| Term | What it is | Formula | On the example |
|---|---|---|---|
| Safety stock | The buffer against variability | Z × √(LT × σD² + D² × σLT²) | 1,214 units |
| Lead-time demand | Expected sales while an order is in transit | D × LT | 2,520 units |
| Reorder point | The level that triggers the next order | D × LT + safety stock | 3,734 units |
| Cycle stock | Stock drawn down between orders | Order quantity ÷ 2 (average) | 1,800 units on a 3,600-unit order (example) |
| Average inventory | What you carry on average | Q ÷ 2 + safety stock | 3,014 units |
Reliable domestic supplier
σLT is near zero, so the demand-only formula is enough. Combined collapses to it when σLT = 0.
Imported by ocean
Use the combined formula. Customs and sailings move the arrival date, and that term often outweighs demand.
New SKU, little history
Start with the basic or percentage method, then switch to a statistical one once real history exists.
Six Safety Stock Mistakes
Trusting the quoted lead time
Treating 21 days as fixed returns 264 units on the example. Real receipts with σLT = 6 need 1,214.
Adding the two terms
Adding the demand and lead-time terms gives 1,449 units instead of 1,214. Add them only if late deliveries and spikes really coincide.
Mixing time units
Weekly demand deviation with lead time in days breaks the answer. Convert everything to days first.
Counting stockout days as zero demand
Days with nothing to sell drag the average down, so the buffer shrinks each time it fails.
One buffer per category
Averaging a fast mover with a slow one suits neither. Calculate per SKU and per stocking location.
Setting it once
Re-run after a supplier, lane or price change, and on a regular review cycle.
When the Formulas Stop Working
All the statistical methods assume demand over lead time is roughly normal and stable. Three situations break that.
Intermittent demand
Slow movers with many zero-sale days are not normal. Use an intermittent-demand method such as Croston's, or set the buffer from order-fill targets.
Strong seasonality
A year-long deviation blends peak and trough. Calculate per season, or apply Z to forecast error instead of raw demand.
Launches and promotions
A deliberate spike is not random variation. Plan that cover from the demand plan, then start the formula once a baseline exists.
Related Inventory Planning Tools
See all free logistics tools, or read how Locad handles warehousing and ecommerce fulfillment for the stock you hold.
Safety Stock Formula Questions
Need Somewhere to Hold the Buffer?
Talk to Locad about warehousing and fulfillment for the stock you just sized.