Perimattic
Warehouse inventory

Free Tool

Safety Stock Calculator

Enter demand variability, lead time variability, and your target service level to calculate the optimal safety stock buffer. See the formula and working capital impact.

Book a Demo

How do you calculate safety stock?

Safety stock is calculated as Z × √(LT × σD² + D² × σLT²), where Z is the Z-score for your target service level (e.g. 1.65 for 95%), LT is average lead time, σD is demand standard deviation, D is average demand per period, and σLT is lead time standard deviation. This formula accounts for variability in both demand and supply. Demand OS computes safety stock at the SKU and location level using this formula with continuously refreshed inputs from its AI Forecasting Engine.

Calculator

Enter your demand and lead time data

Formula used

Safety Stock = Z × √(LT × σD² + D² × σLT²)

Where Z is the service-level Z-score, LT is average lead time, σD is demand standard deviation, D is average demand, and σLT is lead time standard deviation.

Results

Fill in demand and lead time data, then click “Calculate Safety Stock”.

Frequently Asked Questions

Safety stock, answered

What is safety stock and why does it matter?+
Safety stock is the buffer inventory held above expected demand to protect against stockouts caused by demand spikes or supplier delays. Without it, any period where demand exceeds forecast or lead time exceeds average results in a stockout. Too little safety stock means lost sales; too much means excess working capital tied up in inventory that isn't moving.
What Z-score should I use for safety stock?+
The Z-score maps directly to your target service level — the probability of not stocking out during a replenishment cycle. Common values: Z = 1.28 for 90% service level, Z = 1.65 for 95%, Z = 1.88 for 97%, and Z = 2.33 for 99%. Higher service levels require exponentially more safety stock. Most companies set different service levels by SKU tier — A-tier items at 97–99%, C-tier at 90%.
Why include lead time variability in the safety stock formula?+
The basic safety stock formula (Z × σD × √LT) assumes lead times are constant — which they rarely are. When supplier lead times vary, using only demand variability understates the buffer needed. The full formula (Z × √(LT × σD² + D² × σLT²)) captures both sources of variability and produces a safety stock target that actually achieves the target service level in practice.
How often should safety stock be recalculated?+
At minimum quarterly, but ideally continuously as new demand and lead time data arrives. Demand patterns shift with seasonality, promotions, and market changes; supplier performance changes with capacity utilization and logistics disruption. Safety stock calculated once a year using last year's numbers carries the wrong buffer for most of the current year.
How does Demand OS automate safety stock calculation?+
Demand OS calculates safety stock at the SKU and location level using demand variance from its AI Forecasting Engine and lead time variance from historical supplier performance. Service-level targets can be set per SKU tier, category, or customer segment. Every recommendation shows working capital impact before commitment, and targets refresh continuously as new data arrives.

Get Started

Ready to automate safety stock at scale?

Demand OS calculates safety stock at the SKU and location level using live demand and lead time data — refreshed continuously, not once a quarter.