July 3, 2026
By 
Mike Le

The Safety Stock Formula: A Worked Example

The Safety Stock Formula: A Worked Example

Learn the safety stock formula and follow a full worked example, step by step, with service level, Z-score, and lead time variability explained for planners.

You know you need a buffer. What you probably do not have is a defensible reason for the specific number sitting in your system, which is usually a round figure somebody picked in a hurry two years ago. The formula turns that guess into arithmetic you can show a finance director.

The standard safety stock formula is SS = Z x sigma x the square root of lead time. The Z-score encodes the service level you have chosen, sigma is how much your daily demand varies, and the lead time is how long replenishment takes. The result is how many buffer units to carry for that product.

Key takeaways

  • The formula is three inputs, not four: a service level you choose, a variability you measure, and a lead time you verify.
  • Z is a policy decision wearing a statistical costume: it is you deciding how often you are willing to run out.
  • The square root matters: doubling lead time does not double the buffer, it multiplies it by about 1.41.
  • A buffer is only as honest as its sigma: measured on clean, stockout-corrected history, or the number is decorative.

What is the safety stock formula?

The standard form is short enough to write on a napkin:

Safety stock = Z x sigma(demand) x the square root of lead time

Three inputs, one output, and every one of them has a plain-English meaning:

  • Z. what it is: Service factor for your chosen service level; where it comes from: A statistical table, once you decide the service level
  • sigma(demand). what it is: Standard deviation of daily demand; where it comes from: Measured from your own sales history
  • Lead time. what it is: Days from placing an order to stock being sellable; where it comes from: Measured from your own purchase order history
  • SS. what it is: Safety stock, in units; where it comes from: The output

The shape of it is worth understanding before the arithmetic. You are multiplying how much protection you want (Z) by how unpredictable the product is (sigma) by how long you are exposed while waiting (the square root of lead time). Increase any one and the buffer grows. What the concept of safety stock is for, and why you hold one at all, is covered separately in what safety stock is; this page owns the calculation.

What does each part of the formula mean?

Each input fails in its own way when someone fills it in carelessly, so it is worth taking them one at a time. The most common error is not in the arithmetic. It is in feeding the formula numbers that were never measured.

Service level: the decision you are actually making

Service level is the share of replenishment cycles in which you expect not to stock out. Set it at 95% and you are stating, in advance, that you accept running out roughly one cycle in twenty for that product. Nothing about that number is technical. It is a business judgment about what a stockout costs you against what carrying the extra units costs, and it should differ by product: a hero SKU with high margin and heavy ad spend behind it earns a higher target than a low-value accessory. Setting one blanket service level across the catalog is the most common way brands end up simultaneously over-invested and under-protected.

The Z-score: turning that decision into a multiplier

The Z-score is the arithmetic translation of your service level. It comes from the normal distribution, and for planning purposes you simply look it up:

  • 90%. z-score: 1.28
  • 95%. z-score: 1.65
  • 97.5%. z-score: 1.96
  • 98%. z-score: 2.05
  • 99%. z-score: 2.33
  • 99.9%. z-score: 3.09

Read down that column and the economics of service level become visible. Moving from 90% to 95% costs you about 29% more buffer. Moving from 95% to 99% costs about 41% more on top of that. Moving from 99% to 99.9% costs another 33%. Each additional slice of certainty is more expensive than the one before, which is why chasing very high service levels across a whole catalog quietly consumes working capital for very little additional protection.

Sigma: how much your demand actually moves

Sigma is the standard deviation of daily demand for that product, and it is the input most often fudged. It has to be measured, not estimated, and it has to be measured on history that has been cleaned first. Two corrections matter more than any others. Remove or flag the weeks when the product was out of stock, because those record artificially low demand and will understate your variability, which produces a buffer too small on exactly the products that already proved they can run out. Handle promotional spikes deliberately rather than letting them inflate sigma as if they were random noise, since a planned promotion is not uncertainty, it is a known event. Use at least several months of daily data where you have it; a sigma computed from three weeks is describing three weeks.

Lead time: door to shelf, not the quoted number

Lead time in this formula means the full elapsed time from placing the order to the stock being sellable: production, shipping, customs, receiving, and put-away. Not the number on the supplier's website. Most brands who measure this honestly discover their real lead time is meaningfully longer than the quoted one, and since lead time sits under a square root here, understating it understates the buffer. Pull your last ten to twenty purchase orders for the supplier, measure the actual elapsed days, and use that. If those numbers vary widely, the basic formula is not the right tool and the variable-lead-time version further down is.

How do you calculate safety stock step by step?

Work through a real product. This example is the one the rest of the series references, so the figures here are the canonical ones.

The product: a steady-selling accessory. Average demand is 50 units per day. Measured standard deviation of daily demand is 15 units. The supplier's real door-to-shelf lead time is 9 days. You have decided this product deserves a 95% service level.

  • Convert the service level to a Z-score. 95% gives Z = 1.65 from the table above.
  • Confirm sigma. Measured from cleaned daily sales history: 15 units.
  • Take the square root of the lead time. The square root of 9 is 3.
  • Multiply. 1.65 x 15 x 3 = 74.25 units.
  • Round up to a whole unit. Safety stock = 75 units.

That is the whole calculation. Seventy-five units of buffer on top of whatever you expect to sell during the nine-day wait, which at 50 a day is 450 units. The buffer is roughly a day and a half of cover, and it exists so that a week running hot or a shipment arriving two days late does not empty the shelf.

Notice what the number is not. It is not a percentage of anything, it is not a month of stock, and it is not a round figure that felt comfortable. It is the direct consequence of three measurements and one policy choice, which means when someone asks why you are holding 75 units you can show them exactly where it came from and which input to argue with.

How does the buffer change with service level?

Running the same product at different service levels shows the cost curve better than any explanation:

  • 90%. z-score: 1.28; safety stock (units): 58; extra units versus 90%: baseline
  • 95%. z-score: 1.65; safety stock (units): 75; extra units versus 90%: +17
  • 97.5%. z-score: 1.96; safety stock (units): 89; extra units versus 90%: +31
  • 98%. z-score: 2.05; safety stock (units): 93; extra units versus 90%: +35
  • 99%. z-score: 2.33; safety stock (units): 105; extra units versus 90%: +47
  • 99.9%. z-score: 3.09; safety stock (units): 140; extra units versus 90%: +82

Going from 90% to 99% on this one product costs 47 extra units of permanently held stock. Multiply that across a few hundred SKUs and the difference between a considered service-level policy and a blanket high target becomes a working-capital decision rather than a planning detail. This is the strongest argument for setting service level per class rather than per catalog, and the classification method for doing that is ABC analysis.

What if your lead time varies too?

The basic formula assumes lead time is fixed and only demand moves. For plenty of brands that assumption is generous, particularly with overseas suppliers where nine days sometimes becomes fourteen. When lead time varies meaningfully, the extended form accounts for both sources of uncertainty:

Safety stock = Z x the square root of ( lead time x sigma(demand) squared + average demand squared x sigma(lead time) squared )

It looks heavier and it is the same idea: you are now combining two variabilities rather than one. The practical guidance is simpler than the equation. If your lead time is consistent within a day or so, use the basic version and spend your effort measuring sigma properly. If your lead time swings by several days, the basic version will understate your buffer, sometimes badly, and the extended version is worth the extra input. Either way, the fix that helps most is measuring your real lead-time distribution rather than trusting a quote.

Doing this for one product is a spreadsheet exercise. Doing it for six hundred, recomputing sigma as history accumulates and re-measuring lead times as suppliers drift, is where it stops being feasible by hand and starts being work that never quite gets done. Conative AI recalculates the demand variability and lead-time inputs behind each buffer as your sales history updates, at the product level, and flags any forecast that falls outside its accuracy guardrails rather than feeding it silently into your buffers. See a demo of the buffer view on the inventory planning platform.

Frequently asked questions

Which service level should I choose?

Choose per product rather than per catalog, based on what a stockout costs against what the extra units cost. High-margin fast movers with ad spend behind them justify 97% or higher. Low-value accessories rarely justify more than 90%. A single blanket target across everything is the most common expensive mistake.

What if my lead time is not consistent?

Use the extended formula that includes lead-time variability, because the basic version assumes a fixed lead time and will understate your buffer when that assumption breaks. First measure the real distribution from your last ten to twenty purchase orders. If those cluster within a day, stay with the simple version.

Is safety stock the same as the reorder point?

No, safety stock is one ingredient of the reorder point. The reorder point is expected demand during lead time plus safety stock, so the buffer sits underneath the trigger rather than beside it. Calculate safety stock first, then use it in the reorder point formula.

How often should I recalculate safety stock?

Recalculate whenever demand variability or lead time shifts meaningfully, and at least every planning cycle. Both inputs drift quietly: a product gets more volatile, a supplier gets slower. A buffer set eighteen months ago is protecting you against eighteen-month-old conditions.

Can safety stock be zero?

For some products, sensibly yes. Make-to-order items, discontinued lines you are running down deliberately, and very low-value products where a stockout costs almost nothing can all carry no buffer. Setting it to zero should be a decision you made, not a field nobody filled in.

Why is the lead time under a square root?

Because uncertainty accumulates more slowly than time does. Demand variation over nine days is not nine times the variation over one day, since good days and bad days partly offset. The square root captures that offsetting, which is why doubling the lead time raises the buffer by about 41% rather than 100%.

Turn insights into cash

Time is money, save both.

By clicking Get Started you're confirming that you agree with our Terms and Conditions.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.