Skip to content

The Safety Stock Formula (with a calculator)

· Leio

For ingredients and packaging with reasonably stable usage, a practical safety stock formula is:

Safety stock = Z × √(L × σd² + d² × σL²)

where Z is the service factor for your target service level, L is the average lead time in days, σd is the standard deviation of daily demand, d is average daily demand, and σL is the standard deviation of the lead time in days.

This is a baseline, not a food-specific law. It assumes demand is reasonably stationary, daily demand is independent, demand and lead time do not affect each other, and demand during lead time is approximately normally distributed. Seasonal products, promotions and short-life stock need more than this single calculation.

In plain terms: safety stock covers two different things going wrong — using more than expected, and the delivery arriving later than expected. The second term is often left out, even though supplier variability can be the larger risk.

Calculate it

units / day

units / day

days

days

What each input actually means

Average demand (d). Daily usage of the item, in the unit you buy it in. Use a forecast that reflects known weekday patterns, seasonality, promotions and production plans rather than assuming the latest few weeks represent the future.

Demand standard deviation (σd). Ideally, this measures forecast error: the difference between forecast and actual daily usage after known patterns have been removed. In a spreadsheet, use STDEV.S over those daily errors. If you do not have a forecast, STDEV.S over recent daily usage is a rough fallback for a stable item, but it treats predictable peaks as uncertainty.

Average lead time (L). The time from raising the order to goods being usable — which includes goods-in and QC release, not just transit. If QC takes two days, those are two days you cannot sell.

Lead time standard deviation (σL). How much that lead time varies in practice. Take the last 10–20 receipts for the supplier and measure order date to usable date. Almost nobody has this number to hand, and it is the single most valuable one on the list.

Service level (Z). Under the formula’s normal-distribution assumption, this sets the probability of not running out during a replenishment cycle. It is cycle service level, not fill rate — 95% here means roughly one cycle in twenty runs short, not that you ship 95% of units on time. The two get conflated constantly.

A worked example

A ready-meal producer buys a chilled sauce base.

  • Average demand: 1,200 kg a day
  • Demand standard deviation: 300 kg a day
  • Average lead time: 14 days
  • Lead time standard deviation: 3 days
  • Target service level: 95%, so Z = 1.65

Demand risk: 14 × 300² = 1,260,000 Lead-time risk: 1,200² × 3² = 12,960,000

Safety stock = 1.65 × √(1,260,000 + 12,960,000) = 1.65 × 3,771 ≈ 6,222 kg

Two things fall out of that arithmetic.

First, the lead-time term is ten times the demand term. The supplier’s unreliability, not the customer’s variability, is what this stock is really covering. Halving σL from 3 days to 1.5 by getting the supplier to confirm dates properly would cut safety stock to roughly 3,500 kg — a bigger saving than any forecasting improvement available here.

Second, 6,222 kg is a little over 5 days of cover. That is a fact worth checking against reality before you accept it, which brings us to the constraint the formula does not know about.

The constraint the formula ignores: shelf life

For food and beverage, shelf life can make the calculated stock impractical, and the formula has no idea.

Whether five days of safety stock is acceptable depends on the remaining life when each batch arrives, the age of stock already held, the order quantity and whether stock is consumed FEFO or FIFO. A 21-day-life ingredient may tolerate it; a fresh dairy input with seven days of usable life may turn the same buffer into waste.

Use the calculation as a starting point, then test the proposed reorder point and order quantity against stock by expiry date. If the target service level creates unacceptable waste, lowering the stock is a conscious service trade-off; the durable fixes are a shorter or more reliable lead time, smaller and more frequent orders, or another supplier.

Common mistakes

  • A blanket “two weeks of everything”. It over-covers stable, reliable items and under-covers the volatile ones, and it is invisible on the balance sheet as long as it is applied evenly. The whole point of the formula is that different items deserve different cover.
  • Leaving out lead-time variability. The simple version, Z × σd × √L, only covers demand risk. As the worked example shows, that is often the smaller half of the problem.
  • Using quoted lead times rather than actual ones. If the system says 14 days because that is what the supplier’s price list says, and the last ten deliveries averaged 19, every number downstream is wrong.
  • Setting it once. Demand variability and supplier reliability both drift. Recalculate quarterly, or after any supplier change.
  • Calculating against book stock. Safety stock is only real if the stock figure is real. Blocked, expired and allocated stock is not cover.

What to do with the number

Safety stock feeds the reorder point: average demand × lead time + safety stock, which is what the calculator above shows as the second line. In a continuous-review system, place the order when inventory position reaches that point. Inventory position is usable on-hand stock plus confirmed stock on order, minus committed or backordered demand. Using on-hand stock alone can trigger a duplicate order while another delivery is already due.

Keeping it right is the ongoing work: the inputs change every week, and a static number in a spreadsheet quietly stops matching the supplier you have. This is the kind of thing Leio does continuously — recalculating cover against live demand and actual supplier performance, and flagging the items whose lead times have drifted away from what the system believes.

For the wider process this sits inside, see the supply chain planning process and what is supply chain planning. If you want it applied to your own items, book a demo.

See Leio keep stock cover right without the spreadsheet — book a demo

Ready to get started!

Let's talk - we'll ask about your supply planning challenges & guide you through our solution.