Safety stock calculator
Safety stock = z × σ × √(lead time + days between orders). Enter your sales and supplier lead time, or paste a column of daily sales, and get the safety stock and reorder point for one product.
How far a normal day is from the average. Paste your sales below to get it.
7 if you order weekly, 30 if monthly, 0 if you check stock every day.
0 if the supplier is always on time.
Share of order cycles you want to get through without running out.
Don’t know σ? Paste your daily sales
Include days with zero sales, but leave out days the product was out of stock: they hide real demand.
Safety stock
25 units
- z for 95%
- 1.645
- Days the stock must cover
- 14 (lead time + days between orders)
- Average sales over those days
- 140 units
- Reorder point
- 165 units
- Safety stock in days of sales
- 2.5 days
Formula: 1.645 × √(14 × 4² + 10² × 0²) = 24.6, rounded up. Check the order timing in the reorder point calculator.
The safety stock formula
Safety stock = z × σ × √(lead time + days between orders)
- σ is the standard deviation of daily sales: how far a normal day lands from the average. A product that sells 10 every day has σ 0 and needs no safety stock. One that sells 0 on some days and 25 on others needs a lot.
- Lead time + days between orders is how long the stock on the shelf has to last. Variation adds up over those days, but not in a straight line, which is why the formula takes the square root.
- z turns the service level you choose into a number of standard deviations. 95% gives 1.645: in 95 order cycles out of 100, sales stay below what you planned for.
If the supplier is not always on time, the calculator adds a second term for that: z × √(days × σ² + daily sales² × σ of lead time²). With a punctual supplier the second part is zero and you get the short formula above.
| Service level | z | Safety stock for the example below |
|---|---|---|
| 90% | 1.28 | 20 units |
| 95% | 1.645 | 25 units |
| 98% | 2.05 | 31 units |
| 99% | 2.33 | 35 units |
The last few percent cost the most: going from 95% to 99% adds 40% more safety stock to cut stockouts from 1 cycle in 20 to 1 in 100.
A worked example
A product sells 10 a day on average with σ 4. The supplier delivers 7 days after you order, and you place orders every Monday, so a product that is fine today waits up to 7 days for the next order.
- Days to cover: 7 + 7 = 14, and √14 = 3.74
- Safety stock at 95%: 1.645 × 4 × 3.74 = 24.6, so 25 units
- Reorder point: 10 × 14 + 25 = 165 units
Order monthly instead and the stock has to last 7 + 30 = 37 days: safety stock rises to 41 and the reorder point to 411. Check stock every day and order the moment it drops (days between orders 0) and safety stock falls to 18. How often you order matters as much as how wildly the product sells.
If the same supplier is sometimes two days late (σ of lead time 2 days), safety stock jumps from 25 to 42. An unreliable supplier costs more stock than an unpredictable customer.
Where to get each number
- Daily sales and σ: export units sold per day for the last 8 to 12 weeks, one row per day, zero days included. In a spreadsheet, =AVERAGE(range) gives daily sales and =STDEV.P(range) gives σ. Or paste the column into the calculator above.
- Leave out stockout days. A day with zero sales because the shelf was empty is not low demand. Counting it lowers the average and inflates σ.
- Lead time: from the day you place the order to the day the stock can be sold, including the time to receive and count it, not the supplier’s promised shipping time.
- Days between orders: how often you actually order from this supplier. Weekly is 7, every other week 14.
- Service level: 95% is a sensible default. Use 98–99% for best sellers where a stockout loses customers, and 90% for slow, expensive or perishable products where extra stock hurts more.
Service level or max − average?
The other common formula needs no statistics: safety stock = (highest daily sales × longest lead time) − (average daily sales × average lead time). With a best day of 18, an average of 10, a slowest delivery of 10 days and a normal one of 7, that is 180 − 70 = 110 units.
It is easy to explain, but it plans for your best day and the supplier’s worst delivery happening together on every order. For the same product the service level method gives 25. Use max − average when you have too little history for σ, and switch once you have a couple of months of sales.
When the formula gives the wrong answer
- New products. Three weeks of sales is too little for a reliable σ. Start from a similar product and check it by hand.
- Slow movers. A product that sells once or twice a month has mostly zero days, and the formula assumes sales spread around an average. Think in “how many weeks can I wait” instead.
- Seasons and promotions. σ measured in a quiet month is too small for December, and a sale day inflates it for weeks after. Measure the period you are planning for.
- It goes stale. Sales, suppliers and lead times change. A safety stock worked out once and left in a spreadsheet is wrong within a season.
The reorder point formula guide applies the same numbers to eight real products and shows where the textbook version comes out too low.
Safety stock for every product, kept current
A calculator works for one product at a time. Stokis connects to PrestaShop, WooCommerce or OpenCart, works out σ, safety stock and the reorder point for every product and combination from its own sales, and drafts the supplier order with the reasoning on each line. You review and send it. Start free or see how a draft order explains each quantity.
Questions
Safety stock = z × σ × √(lead time + days between orders), where σ is the standard deviation of daily sales and z comes from the service level (1.645 for 95%). If the supplier's lead time varies, add it inside the root: z × √(days × σ² + daily sales² × σ of lead time²).
95% is the usual starting point. Use 98–99% for best sellers where running out loses customers, and around 90% for slow, expensive or perishable products. Each extra percent near the top costs much more stock than the one before.
Put units sold per day for the last 8 to 12 weeks in one spreadsheet column, including days with zero sales but not days the product was out of stock, and use =STDEV.P(range). You can also paste the column into the calculator on this page.
If you order weekly, a product checked today waits up to a week for the next order, and stock has to last that week plus the lead time. The textbook formula uses lead time alone, which only fits a store that checks stock and orders every day.
No. Safety stock is the extra on top of normal sales. The reorder point is the level at which you order: daily sales × (lead time + days between orders) + safety stock.
More free calculators
- Reorder point calculator: The stock level at which to order, counting the days until your next ordering day, not just the lead time.
- EOQ calculator: The order size that keeps ordering and storage costs lowest, rounded to the supplier's minimum order and pack size.