Skip to content
Manufacturing
Romania

Logistics & Supply ChainPractical guide

Safety stock without guesswork

How to calculate safety stock by ABC/XYZ segment from real demand and lead-time variation, and when to fix the cause of the variation instead of adding stock.

The rule “two weeks of everything” is easy to explain and hard to defend. On a part with steady consumption and a punctual supplier, two weeks is cash sitting on a shelf. On a part whose consumption jumps from month to month and whose supplier is often late, the same two weeks is not enough, and the line stops on exactly the part that “had safety stock”. The warehouse is full and there are shortages at the same time, because the rule treats parts that have nothing in common as if they were the same.

Segment before you calculate

ABC classification splits parts by annual consumption value. A few A parts make up most of the value, and many C parts make up a small share. XYZ classification splits them by how stable demand is, measured with the coefficient of variation: the standard deviation of consumption divided by its mean, over weekly or monthly periods. A common starting point is X below 0.5, Y between 0.5 and 1, Z above 1. Move the thresholds once you see how your own parts are distributed.

The nine-cell matrix shows where effort pays off. AX parts are expensive and predictable: low stock, calculated carefully, reviewed often. CX and CY parts are cheap, so a high service level costs little. Z parts, especially AZ, have intermittent demand, where the formula below gives poor results. For those, talk to sales about make-to-order, lead times agreed with the customer, or stock set explicitly for a named customer.

What safety stock covers

It covers two things. The first is demand variation during the replenishment lead time: you order for average consumption, but actual consumption comes out higher. The second is lead-time variation: the supplier promises 10 days and sometimes delivers in 7, sometimes in 15.

It does not cover stock errors in the system, unreported scrap or wrong BOMs. If ERP stock often differs from what is on the shelf, safety stock ends up absorbing inventory errors, and the formula gives you a number unrelated to reality. Fix stock accuracy first.

The formula in plain terms

The version that accounts for both sources of variation looks like this:

SS = z × √(LT × σd² + d² × σLT²)

Here d is average daily demand, σd the standard deviation of daily demand, LT the average lead time in days, σLT the standard deviation of lead time, and z comes from the chosen service level. Units must match: if you have demand per week, express lead time in weeks too. The formula assumes demand that is roughly normal and independent from one period to the next, which is why it does not suit Z parts.

An example, with numbers chosen only for the calculation. Say a part has average demand of 40 pieces a day, with a standard deviation of 12. The measured average lead time is 10 days, with a standard deviation of 3 days. You want a 95% service level, so z = 1.65.

  • variation from demand: 10 × 12² = 1,440
  • variation from lead time: 40² × 3² = 14,400
  • square root of the sum (15,840): about 126
  • safety stock: 1.65 × 126 ≈ 208 pieces, a little over 5 days of demand

The “two weeks” rule would have given 560 pieces. Note also where the number comes from: almost all of it is lead-time variation. With a perfectly punctual supplier, the same calculation gives about 63 pieces.

Service level by segment

The z values for the most common levels are 1.28 for 90%, 1.65 for 95%, 2.05 for 98% and 2.33 for 99%. The increase is not linear. Going from 95% to 99% raises safety stock by about 40% for four percentage points.

Be careful about what the percentage means. In this formula, the service level is the probability of not running out of stock in one replenishment cycle. It is not the percentage of order lines served in full, although many people read it that way. If you report a different measure from the one you used in the calculation, the formula will seem not to work.

Choosing the level is a business decision, not a logistics one. A shortage that stops an assembly line costs something different from one you can cover with an alternative part. Set levels by segment together with production and sales, write them down, and apply them the same way everywhere.

Data matters more than the formula

The most common mistake is a lead time taken from the supplier’s quote or from the ERP material master, where it was entered once and forgotten. Real lead time is measured from the date the order is placed to the date the material is available for production. If goods receipt and quality inspection add two days, they are part of the lead time.

From your order history, pull the actual lead time of each delivery, for every part or at least for every supplier. Calculate the mean and standard deviation. Remove only obvious data errors, not real delays, even if they look like exceptions: those are exactly what the stock is there to cover.

For demand, use actual consumption, not planned requirements. If you plan from a forecast, the relevant variation is the forecast error, the difference between what you forecast and what was consumed, not the variation of consumption itself. You need enough history to capture seasonality, usually at least a year.

How often to recalculate

For A parts, monthly or quarterly. For the rest, quarterly or twice a year is usually enough. Recalculate straight away after events that change the data: a new supplier, a product launch or phase-out, production moving to another line. Weekly recalculation only chases noise and makes planners stop trusting the parameters.

Track actual shortages and days of stock by segment. If a segment has more shortages than the chosen level implies, check the input data first and raise z only after that.

When to fix the cause, not the stock

The example above shows where the problem usually sits. When lead-time variation dominates the calculation, adding stock means paying every month for the supplier’s lack of punctuality. Measure on-time delivery with your own data, discuss it with the supplier with the figures in front of you, and put it into the supplier evaluation.

The minimum order quantity (MOQ) already creates cycle stock. If the MOQ covers two months of consumption, the safety stock calculated on top of it deserves a second look. Sometimes it is cheaper to negotiate a smaller MOQ, even at a slightly higher unit price.

Some demand variation is produced inside the plant. If the production plan changes often within the lead time of the components, consumption looks unstable and the formula asks for more stock. A frozen planning zone at least as long as the lead time of the critical components reduces the variation at its source.

The last lever is the lead time itself. A closer supplier, consignment stock or a framework contract with staggered deliveries shortens LT and σLT, and both go into the formula. Often the effect on stock is larger than any adjustment to z.

If you want to compare how others set their parameters, the discussion continues in the WhatsApp group “Logistics & Supply Chain”.

The discussion continues in the community

Ask, compare, tell others how you solved it.

← All articles