Purchasing

Safety stock formula: 4 ways to calculate it, with examples

Ivan de Ramon5 min read

Safety stock formula: z times the standard deviation of daily demand times the square root of lead time
On this page

The safety stock formula most distributors should use is: safety stock = z × standard deviation of daily demand × √lead time in days. This guide shows that formula and 3 others, with one worked example each, and a calculator you can use right here.

Safety stock is the extra stock you hold for the days when demand is higher than normal or a delivery is late. Too little and you run out. Too much and cash sits on the shelf.

Safety stock calculator

Enter how much your daily demand swings, your lead time and the service level you want.

Your numbers

Use the same unit and the same kind of day for demand and lead time. Numbers only, up to 6 decimal places, no commas. The standard deviation is how far daily demand usually moves away from its average.

Safety stock: 24.62 units

Rounded up: 25 units.

Add this to your lead-time demand to get the reorder point. It is a buffer, not an order quantity.

The calculator uses formula 2 below.

The 4 safety stock formulas

#FormulaUse it when
1(max daily sales × max lead time) − (average daily sales × average lead time)You have no statistics and want a fast first number
2z × σ of daily demand × √lead timeDemand changes from day to day, the supplier is reliable
3z × average daily demand × σ of lead timeDemand is steady, the supplier is often late
4z × √(lead time × σ of demand² + average demand² × σ of lead time²)Both demand and lead time change

σ means standard deviation: how far the numbers usually are from their average. In Excel or Google Sheets, use STDEV.S on your daily sales.

Formula 1: average and maximum

Safety stock = (maximum daily sales × maximum lead time) − (average daily sales × average lead time)

Example. You sell 10 units on an average day and 15 on your best day. Your supplier takes 14 days on average and 20 days at worst.

(15 × 20) − (10 × 14) = 300 − 140 = 160 units

This formula is easy, but it protects you against the worst day and the worst delivery at the same time. That rarely happens, so the result is usually too high. One unusual day in your history can also double it.

Formula 2: demand changes

Safety stock = z × σ of daily demand × √lead time in days

Example. Daily demand has a standard deviation of 4 units. Lead time is 14 days. You want a 95% service level, so z = 1.6449.

1.6449 × 4 × √14 = 1.6449 × 4 × 3.742 = 24.62, so 25 units

This is the formula in the calculator above. It fits most stocked items at a distributor: the supplier delivers on time, and demand is what moves.

Formula 3: lead time changes

Safety stock = z × average daily demand × σ of lead time in days

Example. You sell 10 units a day, almost the same every day. Lead time is 14 days on average, with a standard deviation of 2 days. Service level 95%.

1.6449 × 10 × 2 = 32.9, so 33 units

Use it for imports and for suppliers that often ship late.

Formula 4: demand and lead time both change

Safety stock = z × √(lead time × σ of demand² + average demand² × σ of lead time²)

Example. Same item: lead time 14 days, σ of demand 4 units, average demand 10 units a day, σ of lead time 2 days.

√(14 × 16 + 100 × 4) = √624 = 24.98

1.6449 × 24.98 = 41.09, so 42 units

This formula assumes that demand and lead time do not depend on each other. That is true for most items.

Z-scores for common service levels

Service levelz
90%1.2816
95%1.6449
97.5%1.96
99%2.3263

Service level here means the chance that you do not run out during one order cycle. Going from 95% to 99% raises safety stock by about 41%, so do not pick 99% for every item. Give your best sellers a high level and slow items a lower one. Our guide on how to determine service levels shows how to choose.

Common mistakes

  • Mixed time units. If demand is per day, lead time must be in days. If your data is weekly, use lead time in weeks.
  • Using a different lead time than the reorder point. Count the days from placing the order until the stock is ready to sell, including receiving.
  • One service level for the whole catalog. It puts the same protection on an item that sells twice a year and on your best seller.
  • Counting stockout days as zero demand. Days when you had no stock show no sales. They make demand look lower and steadier than it is.
  • Never updating it. Demand and suppliers change. Recalculate at least every quarter.

When these formulas are wrong

  • Slow or lumpy items. If an item sells a few times a year, the standard deviation says little. Order it when a customer asks, or hold a fixed small quantity.
  • Seasonal items. One number for the whole year is too high in the low season and too low in the high season. Calculate per season.
  • New items. There is no history yet. Start from a similar item.

What to do with the result

Safety stock is one part of the reorder point: reorder point = average daily demand × lead time + safety stock. With 10 units a day, 14 days and 25 units of safety stock, you reorder at 165 units. See the reorder point formula for the next step, and the EOQ formula for how much to order.

For a full catalog, inventory optimization software runs the same math for every item from your own sales history and updates it as demand changes.

Frequently asked questions

What is the safety stock formula?

The most used formula is safety stock = z × standard deviation of daily demand × √lead time in days. z comes from the service level you want: 1.6449 for 95%.

What is the simplest safety stock formula?

(Maximum daily sales × maximum lead time) − (average daily sales × average lead time). It needs no statistics, but it usually gives more stock than you need.

How do I calculate safety stock in Excel?

Put daily sales in one column. Use STDEV.S on that column for the standard deviation, SQRT for the root of the lead time and NORM.S.INV(0.95) for the z-score of a 95% service level. Multiply the three.

What service level should I use?

It depends on your margin and on what a stockout costs you. Give your best sellers a higher level and slow items a lower one, instead of one level for the whole catalog.

Is safety stock the same as the reorder point?

No. Safety stock is the buffer. The reorder point is the stock level at which you order: expected demand during the lead time plus safety stock.