If an item runs short, you lose orders; if you hold too much, cash sits on the shelf. Safety stock and the reorder point are the two calculations that turn the balance between those risks into a number for a single item. In this guide we work through one example item from start to finish: we compute the standard deviation by hand from 20 days of sales, measure the supplier lead time, choose a service level, calculate safety stock and the reorder point, find the order quantity, and finally work out the payback of the whole exercise. All figures are representative examples; use your own data for your own items.
What Is Safety Stock?
Safety stock is the extra quantity you hold above average needs so that you do not run out when demand comes in higher than expected or a delivery arrives late. Without a calculation, teams usually fall back on a rule of thumb such as "keep one extra week", which leaves some items overstocked and others short again and again.
We covered general inventory control in our inventory tracking guide; here we focus on one question: at what quantity should you reorder, and how much should you order?
We recommend reading: Our ERP development service
What Data Do You Need Before You Start?
You need three inputs: actual daily (or weekly) sales, the actual lead times of past supplier orders, and the service level you are aiming for. Our example item is a consumable held by a distributor; its unit cost is ₺150 and it sells over 300 working days a year.
The 20-day sales series below is representative. On days when the item was out of stock, recorded sales would understate real demand; in this example there are no such days.
| Days | Daily sales (units) | Total | Sum of squared deviations |
|---|---|---|---|
| 1–5 | 38, 45, 41, 52, 36 | 212 | 174 |
| 6–10 | 47, 40, 44, 55, 39 | 225 | 171 |
| 11–15 | 42, 48, 35, 50, 43 | 218 | 138 |
| 16–20 | 46, 37, 51, 41, 50 | 225 | 147 |
| 20 days | 880 | 630 |
Average daily demand is 880 ÷ 20 = 44 units. Each day's deviation is that day's sales minus 44 (day 1: 38 − 44 = −6, day 2: +1, day 3: −3, and so on). Squaring and adding the deviations gives the 630 that appears in the table by groups of five days. The sample standard deviation divides the sum of squares by (n − 1) and takes the square root: 630 ÷ 19 = 33.16 and √33.16 = 5.76 units per day. It tells you how far daily demand typically strays from the average; here that is about 13% of the mean.
How Do You Measure Lead Time and Its Variability?
Lead time is the number of working days between placing an order and receiving the goods into stock, measured from actual receipts rather than the supplier's promise. Suppose the last eight orders took 7, 9, 11, 8, 10, 9, 6 and 12 days.
The average is 72 ÷ 8 = 9 days. The squared deviations add up to 4 + 0 + 4 + 1 + 1 + 0 + 9 + 9 = 28, so the standard deviation is √(28 ÷ 7) = √4 = 2 days. Use the goods-receipt date, not the shipping or invoice date. This record comes straight from purchasing and goods-receipt transactions; see our procurement software guide for how to track supplier performance.
How Do You Choose a Service Level and z Value?
The service level is the probability of not running out during one replenishment cycle, and the z value is the factor that converts that probability through the standard normal distribution. Common values are z = 1.28 for roughly 90%, z = 1.65 for roughly 95% and z = 2.33 for roughly 99%. With z = 0, meaning no safety stock at all, the service level is only 50%.
Do not set the same service level for every item. Critical, high-volume items deserve a higher target and easily substituted items a lower one; our ABC analysis guide shows how to classify them. In this example the target is 95% (z = 1.65).
What Is the Safety Stock Formula When Demand Varies and Lead Time Is Fixed?
When lead time is treated as fixed, the formula is Safety stock = z × σ_d × √L, where σ_d is the standard deviation of daily demand and L is the lead time in days. The square root assumes that daily deviations are independent of one another, so nine days of uncertainty add up to three days' worth rather than nine.
In the example σ_d = 5.76 and L = 9, so √L = 3 and σ_d × √L = 17.28. The results by service level are 22.12 for z = 1.28, 28.51 for z = 1.65 and 40.26 for z = 2.33. Because units are whole numbers, we round up: 23, 29 and 41. If lead time were fixed, 29 units would look sufficient for a 95% target.
How Does the Formula Change When Lead Time Also Varies?
When lead time varies as well, the formula becomes Safety stock = z × √(L × σ_d² + d² × σ_L²), where d is average daily demand and σ_L is the standard deviation of lead time. The first term inside the root is the contribution of demand, the second that of lead time.
In the example, L × σ_d² = 9 × 5.76² = 9 × 33.18 = 298.6 and d² × σ_L² = 44² × 2² = 1,936 × 4 = 7,744. The total is 8,042.6 and its root is 89.68. With z = 1.65, safety stock is 1.65 × 89.68 = 147.97, or 148 units. That is more than five times the 29 units from the fixed-lead-time assumption: lead time contributes 7,744 ÷ 8,042.6 = 96.3% of the total variance.
How Do You Calculate the Reorder Point?
The reorder point (ROP) is the threshold at which you place a new order when inventory position falls to it: ROP = d × L + safety stock. The first term is the average quantity sold during the lead time.
In the example d × L = 44 × 9 = 396, and with variable lead time ROP = 396 + 148 = 544 units. The stock compared with this threshold is not what sits on the shelf but the inventory position: on hand + on order − allocated to customers. A system that ignores open orders will raise a second alert for an order that has already been placed.
| Service level (z) | Safety stock, fixed lead time | Safety stock, variable lead time | ROP, variable lead time |
|---|---|---|---|
| 90% (1.28) | 23 | 115 | 511 |
| 95% (1.65) | 29 | 148 | 544 |
| 99% (2.33) | 41 | 209 | 605 |
If stock is only reviewed at intervals, say weekly, the protection period is L + R, where R is the review period. For R = 7 days the protection period is 16 days, and with variable lead time the variance becomes (L + R) × σ_d² + d² × σ_L²: 16 × 33.18 + 7,744 = 8,274.8, whose root is 90.97, giving safety stock of 1.65 × 90.97 = 150.1, or 151 units. The order-up-to level is then 44 × 16 + 151 = 855 units.
How Do You Find the Order Quantity (EOQ)?
The economic order quantity (EOQ) is the batch size that minimizes the sum of ordering cost and holding cost: EOQ = √(2 × D × S ÷ H). D is annual demand, S is the fixed cost per order, and H is the annual holding cost per unit. Safety stock tells you when to order; EOQ tells you how much.
In the example D = 44 × 300 = 13,200 units; S = ₺600 (representative, covering order preparation, goods receipt and invoicing effort); H = ₺150 × 20% = ₺30. EOQ = √(2 × 13,200 × 600 ÷ 30) = √528,000 = 726.6, or about 727 units. That means about 13,200 ÷ 727 = 18.2 order cycles a year. If the supplier sells in case or pallet multiples, pick the nearest multiple; the cost curve is flat around the EOQ, so small deviations cost little.
Two limits are enough for the system (a min-max rule): minimum = ROP (544) and maximum = ROP + EOQ (544 + 727 = 1,271). When inventory position falls below the minimum, order enough to bring it up to the maximum. With 380 on hand, 200 on order and 60 allocated, the position is 380 + 200 − 60 = 520; it is below 544, so the order quantity is 1,271 − 520 = 751 units.
How Does Inventory Cost Change as the Service Level Rises?
Safety stock grows at an accelerating rate: moving from 90% to 95% takes 33 more units, and moving from 95% to 99% takes 61 more. The price is working capital and holding cost, but the number of stockouts falls quickly in return.
In the variable lead-time scenario, assume that each stockout event costs the business ₺15,000 (representative: lost sales, expedited freight, customer attrition). The expected number of events is annual cycles × (1 − service level).
| Service level | Safety stock | Tied-up capital (₺150) | Annual holding (₺30) | Expected stockouts | Stockout cost | Total |
|---|---|---|---|---|---|---|
| 90% | 115 | ₺17,250 | ₺3,450 | 1.82 events | ₺27,240 | ₺30,690 |
| 95% | 148 | ₺22,200 | ₺4,440 | 0.91 events | ₺13,620 | ₺18,060 |
| 99% | 209 | ₺31,350 | ₺6,270 | 0.18 events | ₺2,724 | ₺8,994 |
With these assumptions, 99% gives the lowest total cost. But the result depends on the cost of an event: moving from 95% to 99% adds ₺6,270 − ₺4,440 = ₺1,830 of holding cost and avoids 18.16 × 0.04 = 0.73 events, so the move pays for itself when an event costs more than roughly ₺2,520. For a low-value, easily substituted item that threshold is not reached, and 90% or 95% makes more sense.
When Does the Formula Mislead You?
The formula rests on a normal distribution and steady demand; in three situations the result breaks down.
- Intermittent demand: If 12 of 20 days have no sales (60%) and the other days sell 1–4 units, the mean is 0.9 and the standard deviation 1.29, which is 1.4 times the mean. A normal distribution does not describe this pattern. Work with weekly or monthly totals, read the historical percentile of total demand over the lead time directly, or manage the item by hand.
- Campaign effects: If three high-sales campaign days (120, 118, 125) are added to the 20-day example, the mean rises to 54.04 and the standard deviation to 27.07. With fixed lead time, safety stock becomes 1.65 × 27.07 × 3 = 134 units, about 4.6 times the 29 units from clean data. Remove campaign days and plan them separately.
- Seasonality and trend: An annual average misleads when demand rises and falls; calculate for the season in question, and see our demand forecasting guide for adjustments.
When Should You Refresh the Calculation, and How Do You Measure the Service Level You Actually Get?
Refresh the calculation at least twice a year, and immediately if average demand moves by more than 10% or the lead-time deviation by more than 25%. These thresholds are representative; tune them to your items. If average demand rises from 44 to 50, for example, the d × L term goes from 396 to 450 and safety stock grows as well.
Track two measures to see whether the target is being met. The first is the cycle service level: if stock ran out in 2 of the last year's 24 order cycles, it is 22 ÷ 24 = 91.7%, below a 95% target. But 24 cycles is a small sample and one event shifts the figure by 4.2 points, so do not change the calculation on a single year. The second is the fill rate: if 85 of 13,200 units of annual demand could not be met, the rate is 1 − 85 ÷ 13,200 = 99.4%. Fill rate is always higher than cycle service level because most demand is still served in a cycle that runs out; do not confuse the two.
Record stockout days together with their cause: count differences, late deliveries and poor forecasts each call for a different fix; see our inventory counting guide.
How Do You Work Out the Payback?
Payback is the investment divided by the annual gain. Suppose the old rule was "reorder when stock falls to ten days of sales (440 units)", so safety stock is 44 units. With variable lead time z = 44 ÷ 89.68 = 0.49, a service level of about 68.8%, and 18.16 × 0.312 = about 5.66 stockouts a year. The cost is 5.66 × ₺15,000 + 44 × ₺30 = ₺84,900 + ₺1,320 = ₺86,220.
With the new calculation (95%, 148 units) the cost is ₺18,060, so the annual gain per item is ₺86,220 − ₺18,060 = ₺68,160. Entering the parameters into the ERP and preparing the data takes 25 person-days × ₺9,000 = ₺225,000. If 20 similar items each deliver half of that gain, the annual benefit is 20 × ₺34,080 = ₺681,600, or ₺56,800 a month, and payback is 225,000 ÷ 56,800 ≈ 4.0 months. If the gain per item is only a quarter of ₺68,160, you earn ₺28,400 a month and payback stretches to about 7.9 months. The figures illustrate the method only.
What Steps Take You From Data to a Working Setting?
- Pick the item: start with class A and B items from an ABC analysis.
- Collect demand data: at least 20–30 observations, with stockout and campaign days corrected.
- Measure lead time: the mean and deviation of the last 6–10 orders.
- Choose the service level: set z by looking at the cost of an event.
- Calculate: safety stock, ROP, EOQ and the min-max limits.
- Monitor: measure the service level you actually achieve and refresh twice a year.
What Mistakes Are Common in Safety Stock Calculations?
- Treating the average as safety stock: holding only the average quantity over the lead time means running out in about half of the cycles.
- Ignoring lead-time variability: in the example, looking only at demand gave 29 units while the real need was 148.
- Watching the shelf instead of inventory position: if open orders and allocations are not counted, orders are placed twice or too late.
For distribution across several warehouses see multi-warehouse inventory management, for supplier dependency see supplier risk management, and for the whole chain see supply chain management.
We recommend reading: How to Set Up Lot and Serial Number Traceability: Lot Records, FEFO, Quarantine and Recall Drills
We recommend reading: What Is Vendor-Managed Inventory (VMI)? Min–Max Levels, Replenishment Proposals and Payback Guide
We recommend reading: Make to Order vs Make to Stock: How to Choose (Decoupling Point, Hybrid Strategy and Cost Guide)
We recommend reading: How to Manage Backorders: Line Status, Priority, Split Shipments and Fill Rate Guide
We recommend reading: How to Manage Spare Parts Inventory: Intermittent Demand, Critical Parts and Stock Levels Guide
We recommend reading: How to Manage Slow-Moving and Dead Stock: Aging, Classification, Clearance and Decision Guide
Stock and Order Processes with İnovabil
At İnovabil our focus is bespoke software built from scratch for your company: custom software, ERP, CRM, e-commerce, web, mobile and integrations. For businesses with stock and order flows, we recommend writing down during requirements analysis which data the calculation draws on and who is allowed to change the parameters.
We have built a warehouse management system for Sleepy, logistics and shipment planning with wholesale order management for Karyak, a procurement system for İZBAN, and CRM, procurement and mobile solutions for Avcılar İnşaat. Send us a short summary of your process and data, and we will assess it together.
We recommend reading: Our software development process: from analysis to release
Frequently Asked Questions
How is safety stock calculated?
With z × σ_d × √L when lead time is fixed, or z × √(L × σ_d² + d² × σ_L²) when it varies too. In the example, d = 44, σ_d = 5.76, L = 9, σ_L = 2 and z = 1.65 give safety stock of 148 units.
How do you find the reorder point?
With d × L + safety stock. In the example 44 × 9 = 396 and 396 + 148 = 544 units; you order when inventory position (on hand + on order − allocated) falls to 544.
What is the z value for a 95% service level?
About 1.65. Common values: 1.28 for 90%, 1.65 for 95% and 2.33 for 99%.
How often should safety stock be recalculated?
At least twice a year, and immediately when average demand or lead-time deviation changes noticeably (for example by 10% in demand or 25% in lead-time deviation).
Does the same formula work for every item?
For items with steady demand, yes. For intermittent, campaign-driven or strongly seasonal items the formula can mislead; they need aggregated data, a percentile approach or manual management.