Safety stock: how do you define and calculate it?
Too much stock ties up cash, too little triggers stockouts. Safety stock is the dial that arbitrates between those two risks. Here is the definition, the most widely used calculation formula, a worked example from start to finish, and the mistakes that distort the result in practice.

TL;DR, the essentials
- Safety stock is a buffer quantity held at all times to absorb swings in demand and lead time, and to avoid a stockout.
- The most common formula is: Safety stock = service factor (Z) × standard deviation of demand × square root of the lead time.
- The Z factor reflects the target service level: about 1.65 for 95%, 2.05 for 98%, 2.33 for 99% (normal distribution).
- It is a trade-off: the higher the target service level, the higher the safety stock, and therefore the holding cost.
You want to know how much to keep “just in case” so you do not run out, without freezing your cash in dead stock. That is exactly what safety stock settles. It is not a finger-in-the-air number: it is calculated, from the variability of your demand and lead times, and from the service level you set yourself. Here is the definition, the formula, a worked example, and the mistakes to avoid.
What is safety stock, exactly?
Safety stock is the minimum quantity of an item you hold permanently to guard against two uncertainties: demand higher than expected during the replenishment lead time, and a supplier lead time longer than expected. It is a shock absorber. Without it, the slightest variation puts you out of stock; with a well-sized safety stock, you absorb the jolts without breaking the chain.
Do not confuse it with the reorder point (the stock level that triggers a new order) or with average stock. Safety stock is the “untouchable” portion you should dip below only in exceptional cases. It fits within structured inventory management, alongside the reorder point and the economic order quantity.
In one sentence
Safety stock is the price you agree to pay, in tied-up inventory, so you do not suffer a stockout when demand or lead time slips.
Which calculation formula should you use?
There are several formulas, from the simplest to the finest. The one most taught and most used when demand varies but lead time is stable is the following:
Let us break down each term:
- Z, the service factor: a number drawn from the normal distribution, which depends on the service level you target (see below).
- σ (sigma), the standard deviation of demand: the measure of how much your sales vary around their mean, computed from history. The steadier the demand, the lower σ, and the less safety stock you need.
- The square root of the lead time: the replenishment lead time, expressed in the same unit of time as demand (days, weeks). You take the square root because uncertainty does not grow in proportion to the lead time, but more slowly.
When the lead time itself is variable, a more complete formula combines both sources of uncertainty (variance of demand and variance of lead time). It is more accurate but requires good data on supplier reliability, which few companies measure properly. An ERP or an inventory module computes these values automatically from history, which avoids manual calculations and spreadsheets that contradict each other.
Mind your units
The classic mistake: mixing units of time. If your demand is expressed per week, the lead time must be too. A daily demand paired with a lead time in weeks throws the whole calculation off by a large factor.
The service factor: which value should you pick?
The Z factor reflects your target service level, that is, the probability of not running out during the replenishment lead time. Here are the reference values, taken from the normal distribution table:
| Target service level | Z factor |
|---|---|
| 90% | 1.28 |
| 95% | 1.65 |
| 98% | 2.05 |
| 99% | 2.33 |
| 99.9% | 3.09 |
The higher you aim, the higher Z climbs, and the more the safety stock grows. And the progression is not linear: going from 95% to 99% service can require doubling the safety stock for those last points of reliability. That is why you do not aim for 99% on everything: you reserve the highest levels for critical items and scale down on secondary SKUs. This is exactly the logic of ABC analysis, which ranks items by importance.
Good reflex
Do not set the same service level everywhere. A strategic item whose stockout halts production deserves 98 or 99%. An easily replaced consumable is fine at 90%. Segmenting saves stock without hurting perceived service.
Want to automate this calculation?
Our comparison ranks the best ERP software of 2026, which compute safety stocks and reorder points from your history.
A worked example, from start to finish
Take an item whose supply you want to secure. The starting data, drawn from your history:
- Standard deviation of demand (σ): 100 units per day.
- Replenishment lead time: 10 days.
- Target service level: 95%, giving a Z factor of 1.65.
Apply the formula: Safety stock = 1.65 × 100 × √10. The square root of 10 is about 3.16. So the calculation gives 1.65 × 100 × 3.16 ≈ 521 units.
Interpretation: by holding roughly 521 units of safety stock at all times, you cover 95% of the demand-variation scenarios over the 10-day lead time. If you raised the service level to 99% (Z = 2.33), the same calculation would give 2.33 × 100 × 3.16 ≈ 736 units, that is over 200 extra units of stock to gain those 4 points of reliability. This math makes the cost-versus-service trade-off visible.
Worth remembering
Safety stock is added on top of the stock needed to cover average demand during the lead time. It does not replace the reorder point, it is part of it: reorder point = average demand during the lead time + safety stock.
Which pitfalls distort the calculation in practice?
The formula is simple, but its result is only as good as its data. Here are the most common mistakes:
- A history that is too short or atypical: computing σ over a period marked by a promotion or a stockout gives a misleading standard deviation. You need a representative base.
- Ignoring seasonality: demand that doubles at year end must be handled by period, not with a single annual standard deviation that flattens the peaks.
- Forgetting lead-time variability: an unreliable supplier adds uncertainty that the simple formula does not capture. In that case, the complete formula (variance of demand and of lead time) is the right tool.
- Set and forget: demand, lead times and suppliers change. A safety stock is recalculated regularly, ideally continuously through an ERP.
- Confusing theoretical and physical stock: if your counts are wrong, the whole control is wrong. Reliable stock is a prerequisite, as we stress in our guide on inventory management.
Ready to move to the shortlist?
We compared the main ERPs on price, inventory modules (safety-stock calculation included) and support.
The next step
To go further, read our comparison of the best ERP software 2026, our guide to inventory management, or our overview of ABC analysis to prioritize your items before you set safety stocks.
Frequently asked questions
What is the safety stock formula?
The most common formula, when demand varies but lead time is stable, is: safety stock = service factor (Z) × standard deviation of demand × square root of the replenishment lead time. The Z factor reflects the target service level, the standard deviation measures demand variability, and the lead time must be expressed in the same unit of time as demand.
Which factor for which service level?
The reference values from the normal distribution are: about 1.28 for a 90% service level, 1.65 for 95%, 2.05 for 98%, 2.33 for 99% and 3.09 for 99.9%. The higher the target level, the higher the factor and therefore the safety stock, and it grows faster on the final points of reliability.
What is the difference between safety stock and reorder point?
Safety stock is the buffer quantity held permanently against uncertainty. The reorder point is the stock level that triggers a new order. The two are linked: the reorder point equals the average demand expected during the replenishment lead time plus the safety stock.
Should every item have the same safety stock?
No. You segment by the importance of the item, typically with ABC analysis. Critical items, whose stockout is costly, get a high service level (98 to 99%) and therefore more safety stock. Secondary SKUs get by with a lower level, which saves tied-up inventory.
Does an ERP calculate safety stock automatically?
Yes, most ERPs and inventory modules compute the standard deviation of demand from history, apply the chosen service factor and recalculate safety stock continuously. This avoids manual spreadsheets and lets the system account for real changes in demand and lead times.




