
Safety stock: a simple formula
Safety stock = z × the standard deviation of demand × the square root of lead time: it guards against demand swings.
If a supplier is late or demand turns out higher than expected, the shelf goes empty. For such days a warehouse keeps an extra cushion: safety stock. Setting it "by eye" risks two kinds of loss: too little and sales fall, too much and cash sits on the shelf. A simple formula gives a numerical answer.
The formula
Safety stock = z × σ × √L.
- z — the coefficient matching the service level. The service level is the probability of not running out during a replenishment cycle.
- σ — the standard deviation of demand (per day or per week).
- L — the lead time in the same units: if σ is daily, L is in days too.
Common z values: 1.28 for 90 percent, 1.65 for 95, 1.96 for 97.5 and 2.33 for 99.
A worked example
An item sells 40 pieces a day on average, and the standard deviation of daily demand is 12 pieces. From placing an order to the goods reaching the shelf takes 9 days on average. Let the service level be 95 percent, so z = 1.65.
Safety stock = 1.65 × 12 × √9 = 1.65 × 12 × 3 = 59.4 ≈ 60 pieces.
If the item costs 25,000 so'm, the safety stock ties up 60 × 25,000 = 1.5 million so'm. The reorder point is demand during the lead time plus the safety stock: 40 × 9 + 60 = 420 pieces. When the balance falls to 420, an order is placed.
σ = 12 means that on about two days out of three, sales are 40 ± 12, that is, between 28 and 52 pieces. Without safety stock the reorder point would be 40 × 9 = 360 pieces, and in roughly every second cycle demand would exceed the average and the item would run short. Safety stock reduces the chance of that.
Why a square root, and why a high service level is expensive
The root reflects the natural offsetting between days: on some days demand is above average, on others below, and they partly balance each other. So uncertainty over 9 days grows not 9 times but 3 times. If the lead time quadruples (to 36 days), the root becomes 6 and the stock only doubles: 1.65 × 12 × 6 ≈ 119 pieces.
Raising the service level gets ever more expensive. In our example 90 percent needs 1.28 × 12 × 3 ≈ 46 pieces, 95 percent needs 60 and 99 percent needs 2.33 × 12 × 3 ≈ 84. Going from 95 to 99 percent is only four points, but the stock rises by 24 pieces, about 40 percent. So the level should not be the same for every item: it is sensible to set it higher for group A (say 98-99 percent) and lower for group C (around 90 percent).
Step-by-step calculation
- Collect daily sales for the last 3-6 months. Clean or mark days when the item was out of stock and promotion days, because they distort demand.
- Calculate σ in Excel: STDEV.S(range of daily sales).
- Take the lead time from real documents: the gap between the order date and the day the goods reached the shelf. What matters is not the supplier's promise but what happened in practice.
- Choose the service level and find z.
- Put the numbers into the formula, calculate the stock and round up to a whole number.
- Recalculate every quarter: demand and lead times change.
Limits and mistakes
- If the lead time fluctuates (for example, an imported shipment is held up at the border), the simple formula is not enough. For such items take a cautious lead time that allows for delays, not the average.
- The formula suits regularly selling items with demand close to a normal distribution. For items that sell once or twice a week, or have very erratic demand (group Z in XYZ), it works badly; they are better handled to order.
- If balances are inaccurate, safety stock hides the error. When the records show 100 pieces and the shelf holds 70, even the best formula will not help.
- Mixing units: if σ is daily, L must be in days too.
Conclusion
Safety stock is insurance priced by probability: more cover costs more cash, so allocate it according to how much each item matters. The formula needs reliable balances and cleaned sales data. CountLab verifies balances through stock counts and, together with ABC/XYZ analysis, helps determine how much stock each item needs.