Calculate safety stock: formula, calculator and the limits of the textbook method

Knowledge · Safety stock

Safety stock is the buffer that absorbs demand and supply variability up to the desired service level. The standard formula is SS = z × σ × √LT – with the service factor z, the demand spread σ per period and the replenishment lead time LT. It answers "how much buffer for which service level" in one line. Below we explain each term step by step, show the z-value table – and where the formula fails in practice. First, the calculator:

Safety-stock calculator

Formula SS = z × σ × √LT – calculated live

units / week
units / week
weeks
€ – optional
98.0 %
90 %99,5 %
160 units
Safety stock
520 units
Reorder point
€6,723
Capital tied up
€538
Cost of capital p.a. (8 %)
Safety stock vs. service levelz = 2.05
90959899.5

Going from 98 % to 99.5 % costs almost as much safety stock as the whole way from 90 % to 98 %.

At this safety stock, the calculated no-stockout probability over the lead time is 98.0 %.

The formula step by step

SB = z × σ × √WBZ

SS = z × σ × √LT. Three quantities determine the safety stock:

1

z – the service factor

z translates the desired service level into a safety factor from the standard normal distribution. The higher the target, the larger z – and disproportionately so. From 90 % (z ≈ 1.28) to 98 % (z ≈ 2.05) the step is moderate; from 98 % to 99.5 % (z ≈ 2.58) it gets expensive.

2

σ – the demand spread

σ is the standard deviation of demand per period. Crucially, σ should be the spread of the forecast errors, not just the raw historical variation – a good forecast lowers σ and thus the required safety stock.

3

√LT – the lead time

Risk accumulates over the lead time. Because spreads of independent periods add via the square root rather than linearly, safety stock grows with √LT: a four-times-longer lead time doubles (not quadruples) the safety stock.

z-values for common service levels
Service levelz-factor
90 %1.28
95 %1.64
97 %1.88
98 %2.05
99 %2.33
99.5 %2.58

Where the formula fails

The textbook formula assumes normally distributed, stable demand. For steadily selling items that is a good approximation. For much of the range the assumption does not hold – and then the formula returns systematically wrong values.

Sporadic demand: irregularly demanded items are not normally distributed. The formula often overstates safety stock here, assuming a smooth bell curve where reality has many zero periods and occasional spikes.

Trends and seasonality: if demand rises or falls systematically, the historical mean is already outdated, and the formula buffers around a wrong expected value.

Short history: new items provide too little data for a reliable σ – the safety stock becomes guesswork.

Flat vs. actually required safety stock – four example items
flat rule (4 weeks)distribution-based
A item, steady
100
58
B item, mildly variable
100
82
C item, sporadic
100
145
Seasonal item
100
70

Normalised to 100: a flat coverage over-buffers some items and under-buffers others. Only the distribution-based calculation hits the actual need.

Why flat safety stocks are almost always too high

Flat stocks suffer a ratchet effect: after every shortage the buffer is raised – but after calm periods it is rarely lowered again. Increases stick, reductions don't happen. Over the years stock only moves in one direction: up. Because nobody is held accountable for excess stock while a shortage is noticed immediately, the safe choice is always "a bit more". The result is a range whose safety stocks sit well above what the target service level actually requires.

The distribution-based approach per item

Instead of a formula with a normal-distribution assumption, safety stock can be derived directly from the estimated demand distribution per item. Demand over the lead time is modelled as a probability distribution – for sporadic items also as a skewed, non-normal one – and the stock is set as the quantile that just reaches the target service level.

This treats each item according to its actual pattern: steady items get less buffer, sporadic ones get more where needed. For a single item the calculator above suffices. For thousands of items you need automated, forecast-based replenishment – methodically identical, just scaled.

Optimising inventory: the overview

Frequently asked questions about safety stock

Which service level is the right one?

The right service level is where the cost of a shortage just justifies the cost of the extra stock. For critical A items, typical targets are 97–99 %; for uncritical C items often lower. Mind the disproportionate behaviour: above 98 % every further percentage point gets disproportionately expensive as the z-factor climbs steeply. A blanket 99 %+ for all items is almost always too costly.

How do you calculate safety stock with variable lead time?

If the lead time also varies, σ of demand alone is not enough. The extended formula combines the demand spread over the mean lead time with the spread of the lead time itself (times the mean demand); both sources are added in quadrature. In practice the lead-time spread is often the bigger driver – which is why more reliable suppliers translate directly into lower stock.

How does the safety-stock formula work with seasonality?

With seasonal demand, do not use the annual mean. Expected value and spread must be determined for the relevant season – ideally from a forecast that models the seasonal curve. The safety stock then buffers only the forecast error around the curve, not the seasonal swing itself, so the buffer stays small even though absolute demand varies strongly.

For one item this calculator is enough. For 5,000 items there are two paths:

Do it yourself

Seminar AI replenishment & forecasting

Your team learns to calculate safety stock in a distribution-based way and bring the forecast into replenishment themselves – on your own example.

See the seminars
Have it done

Proof of Value in 5 days

We recompute on your historical data how much stock forecast-based replenishment frees up – at a fixed price, with an honest recommendation.

See the Proof of Value