EN
Insight

Safety stock calculation: less inventory, same availability

Less capital tied up in inventory, yet still able to deliver: safety stock is where to look first. It is often set by a blanket rule, such as two weeks of supply for all parts, which puts protection in the wrong places. If you calculate it per material, you see what each percentage point of service level costs and decide where inventory prevents shortages.

Martin Hörnig13 min read

In brief
  • A blanket rule such as “two weeks of supply” follows the level of demand, not its variability. Steady parts get too much buffer, volatile ones too little.
  • The service level is a decision about capital, not a setting for materials planning. Going from 95% to 99% raises safety stock by just over 40%, and 99.9% nearly doubles it.
  • Calculate with the forecast error, not with the variability of consumption. A forecast model that fits trend or seasonality lowers safety stock at the same service level.
  • A fluctuating replenishment lead time drives safety stock up. In the worked example, a standard deviation of one week raises it from 99 to 192 units.
  • In SAP, you set a fixed safety stock, have it calculated from service level and forecast error, or tie it to a range of coverage. Which option fits depends on demand and on how the material is planned. You can check your own values with the calculator.

Why blanket rules tie up capital and still cause shortages

Many safety stocks follow a simple rule, often a fixed number of days of supply for all materials. Such a blanket rule follows the level of demand. It does not know how much demand fluctuates.

An example with assumed values: three materials each have demand of 100 units per week and a replenishment lead time of four weeks. The blanket rule of two weeks gives each of them 200 units of safety stock.

MaterialVariability per week (standard deviation)Service level with 200 unitsSafety stock for 97.5%
Steady demand10 unitsover 99.9%40 units
Moderate variability30 unitsover 99.9%118 units
High variability80 units89%314 units

The service level here is the share of order cycles in which nothing runs out before the next delivery. The blanket rule protects two materials far more than necessary. The third runs out in just over one cycle in ten.

Sized for 97.5%, the three materials together need 472 units instead of 600, and each is equally well protected. Capital moves to where the variability is.

Common rules of thumb, such as one third of demand during the replenishment lead time, have the same weakness. Sizing the buffer from peak consumption and the longest lead time depends on single outliers and does not tell you what service level it buys.

Service level α or β: what “able to deliver” should mean

Before anyone calculates, you need to settle what “able to deliver” means in your company. There are two common measures.

  • α service level (cycle service level): the share of order cycles in which demand is met in full from stock. That is the probability that nothing runs out before the next delivery.
  • β service level (fill rate): the share of the demanded quantity that is delivered immediately from stock.

At the same percentage, α usually requires more safety stock than β. If a single unit is missing in a cycle, the whole cycle counts as a miss under α; under β, only that unit is missing.

Which measure applies is not a question of formulas. If your customers measure what share of their order quantity arrives immediately, that is a β target. If a line must not stop because a part is missing, every cycle counts, so α applies.

The formula and the calculator below use α. For a β target, their values are usually too high. β depends on the expected shortage per cycle relative to the order quantity, so that calculation also needs your order quantities.

Safety stock by service level, compared with a 95% service level Horizontal bars: 90% needs 22% less; 95% is the baseline; 97.5% needs 19% more; 98% needs 25% more; 99% needs 41% more; 99.5% needs 57% more; 99.9% needs 88% more.
The last few percentage points of service level cost the most safety stock. From 95% to 99%, it rises by just over 40%; at 99.9%, it almost doubles, assuming the same variability and lead time.

Full availability cannot be bought with inventory alone. Every additional percentage point means more tied-up capital, so set the service level per material segment, not one value for everything.

The safety stock formula

The formula contains your levers: the service level you set, the forecast error, and the replenishment lead time. If demand fluctuates and the replenishment lead time is fixed, the formula is:

Safety stock = z × σ × √LT

SymbolMeaningIn the example
zSafety factor for the α service level, from the standard normal distribution1.645 for 95%
σStandard deviation of the forecast error per period, in units30 units per week
LTReplenishment lead time in the same period4 weeks

The formula assumes normally distributed deviations that are independent from period to period. With regular demand, this assumption usually holds; with intermittent demand, it does not. If σ is per week, the lead time goes into the formula in weeks, so 4 and not 28.

Worked example

The assumed values are demand of 100 units per week and a standard deviation of 30 units per week. The replenishment lead time is four weeks without variation, and the service level is 95%. Safety stock is then 1.645 × 30 × √4 = 98.7, rounded up to 99 units, just under one week of demand.

At 99%, the factor rises to 2.326 and safety stock to 140 units. Excel returns the factor for any service level, for example =NORM.S.INV(0.99).

At an assumed price of €50 per unit, 99 units tie up €4,950 and 140 units €7,000. The €2,050 difference buys four percentage points of service level for a single material. Across all your materials, these differences add up.

When the replenishment lead time varies

If goods arrive after three weeks one time and after six the next, the simple formula is not enough. If demand and replenishment lead time are independent of each other:

Safety stock = z × √(LT × σ² + demand² × σLT²)

Here, demand is the average demand per period, and σLT is the standard deviation of the replenishment lead time in the same period. Silver and Peterson’s formula appears, for example, in a working paper from the Kellogg School of Management (page 8).

If the lead time in the example has a standard deviation of one week, safety stock at 95% rises from 99 to 192 units. That is almost double; with half a week, it is 129 units.

Supplier delivery reliability is therefore a capital issue. With one week of variability, a 90% service level instead of 95% saves only 42 of the 192 units; a reliable lead time saves 93. Measure actual delivery times from your purchase orders and compare them with the planned delivery time in the material master.

From safety stock to reorder point

The reorder point triggers the order. It covers demand during the replenishment lead time plus the safety stock:

Reorder point = demand per period × LT + safety stock

In the example, that is 100 × 4 + 99 = 499 units. On average, the full safety stock is still in the warehouse when the goods arrive. In about half of all cycles, part of it is used; at a 95% service level, it runs out in one cycle in twenty.

Forecast error instead of consumption variability

The standard deviation in the formula should measure what your planning does not foresee. Often, the variability of consumption is used instead. With trend or seasonality, it is larger than the error of a suitable forecast, and safety stock then buffers movements that can be predicted.

This applies when materials planning follows the forecast, for example because SAP recalculates the reorder point and safety stock in the forecast run. A reorder point that stays the same for a year has to absorb the seasonality itself.

SAP measures the forecast error as the mean absolute deviation (MAD). If the deviations are normally distributed, the standard deviation is about 1.25 times the MAD.

Why the right forecast model saves safety stock

How small the forecast error gets depends on the model, especially with seasonal consumption.

Constant model Forecast error σ = 34.3 units

Constant model: consumption and forecast over twelve months Consumption from January to December in units per month: 67, 52, 112, 110, 147, 125, 158, 126, 89, 97, 61, and 56. Forecast constant at 100. Deviations up to 58 units.

Seasonal model Forecast error σ = 13.5 units

Seasonal model: consumption and forecast over twelve months Consumption as for the constant model. Forecast from January to December: 64, 70, 90, 116, 138, 150, 144, 124, 100, 80, 66, and 58. Deviations up to 25 units.
When the forecast model fits the consumption pattern, the forecast error shrinks, and so does the safety stock. Assumed values: seasonal consumption averaging 100 units per month. With a 95% service level and one month of lead time, the constant model needs 57 units of safety stock, the seasonal model 23.

In practice, even a suitable model is never exact, and a seasonal model needs a sufficiently long consumption history. The traditional material forecast in SAP offers models for the typical patterns.

Consumption patternHow to recognize itForecast model in SAP
ConstantFluctuates around a stable meanConstant model or moving average
TrendRises or falls over many periodsTrend model or second-order exponential smoothing
SeasonalPeaks that recur every yearSeasonal model
Trend and seasonalRecurring peaks on a rising or falling levelSeasonal trend model
IntermittentMany periods without demand, with occasional demands in betweenNone of the traditional models

Automatic model selection tests for trend and seasonality. If it finds no pattern, it selects the constant model; if it misses a seasonal pattern, MAD and safety stock rise. So for your A materials, check whether the selected model fits the pattern.

For spare parts and other intermittent demand, none of these models fits; there are forecasting methods for intermittent demand such as Croston’s method.

Calculator for safety stock and reorder point

Use the calculator to check individual materials before you change parameters, and see what each service level costs in inventory.

Calculator

Safety stock and reorder point

Prefilled with the worked example (assumed values). Your entries stay in your browser; nothing is stored.

Your values

All inputs refer to this period.

units per week

units per week

Without a forecast, use the standard deviation of demand. From the mean absolute deviation (MAD): σ ≈ 1.25 × MAD.

weeks

weeks

0 if the lead time does not vary.

Share of order cycles without a stockout (α service level).

Result
Safety stock
99 units
Reorder point
499 units
Safety stock coverage
0.99 weeks

Safety stock = z × √(LT × σ² + demand² × σLT²) = 1.645 × √(4 × 30² + 100² × 0²) = 98.7; rounded up to 99

Reorder point = demand × LT + safety stock = 100 × 4 + 99 = 499

Same material, different service level
Service levelSafety stock in unitsDifference in units
90%77−22
95%99Your choice
97.5%118+19
98%124+25
99%140+41
99.5%155+56
99.9%186+87

Assumptions: the forecast error is normally distributed, and demand and lead time vary independently. The safety factor z corresponds to the selected service level.

In the analysis of inventory and MRP parameters, we run this calculation on your data for your whole range of materials, segment by segment.

ABC/XYZ analysis: which service level for which material

A single service level for all materials is the second blanket rule that ties up capital. So segment your materials by consumption value and regularity of demand, and decide for each segment what service level it needs. Management, sales, and production make this decision; materials planning puts it into practice.

SegmentService levelWhy
A materials with regular demand (AX, AY)Weighed against capital, often lower than for CEvery percentage point ties up a lot of capital; more accurate forecasts and reliable lead times lower inventory without costing service level
B materials with regular demand (BX, BY)Between A and CDepending on whether tied-up capital or the consequences of a shortage weigh more
C materials with regular demand (CX, CY)HighThe buffer ties up little capital, and a shortage still holds up production or shipping
Z materials with intermittent demandBased on the consequences of a shortageThe normal distribution does not fit; stocking follows criticality

Besides value and demand pattern, it matters what a shortage triggers. A cheap part without which a line stops needs more protection than an expensive one with a workaround. So for each segment, you weigh the cost of a shortage against the cost of the buffer; the worked example puts the buffer’s cost in euros.

A part with strong seasonality can show up as Y or Z in the XYZ analysis, even though a seasonal model forecasts it well. For its safety stock, the small forecast error is what counts, not the class.

Safety stock in SAP: fixed value, service level, or range of coverage

In SAP ECC and SAP S/4HANA alike, there are several ways to set safety stock. They differ in who calculates it and how often it is recalculated.

Option in SAPWho calculatesGood fit forWatch out for
Fixed safety stock in the material masterYou, outside SAP, for example with the formula aboveMaterials whose values you recalculate regularly and load via mass maintenanceWithout a fixed schedule, the value becomes outdated when demand or lead time changes
Automatic reorder point planning (VM)SAP in the forecast run, from service level, replenishment lead time, and MADMaterials with regular consumption and a suitable forecast modelThe forecast model determines the MAD and thus the safety stock
Dynamic safety stock with a range of coverage profileSAP in the MRP run, from average daily requirements and range of coverageMaterials planned with deterministic MRP that have maintained planned independent requirements or sales ordersThe range of coverage reflects the level of demand, not its variability
Safety timeNo stock value; receipts are scheduled a few days earlierUncertain dates rather than uncertain quantitiesNot in addition to safety stock for the same uncertainty

Double buffers from safety stock and safety time belong at the top of the list in every review.

Automatic reorder point planning with service level and MAD

In automatic reorder point planning, SAP calculates the reorder point and safety stock in the forecast run. SAP derives the reorder point as above, from daily requirements, replenishment lead time, and safety stock. In SAP S/4HANA, VM is one of the standard MRP types.

The values are recalculated with the forecast run, individually or periodically, for example with transactions MP30 or MP38. Whether SAP calculates automatically is set in Customizing for the MRP type.

SAP describes the service level in the material master as the share of demand that stock should cover. But it takes the safety factor from the normal distribution, as for a probability. So measure in day-to-day operations what service level the value you set actually delivers, using the measure you chose.

Dynamic safety stock with a range of coverage profile

For dynamic safety stock, SAP determines an average daily requirement, usually from future make-to-stock requirements such as planned independent requirements and sales orders. Multiplied by the minimum, target, and maximum range of coverage, it gives the minimum, target, and maximum stock levels. The target stock level is the safety stock.

The MRP run recalculates it for each MRP element. This way, it follows planned demand rather than past consumption. You define the range of coverage profile in Customizing and assign it in the material master, on the MRP 2 view.

The range of coverage itself remains an assumption, and, like a blanket rule, it ignores variability. So derive the target range of coverage from the calculation; in the example, safety stock covers just under one week of demand.

Forecast-based planning (VV) works differently. It is part of the compatibility scope in S/4HANA; usage rights generally expired at the end of 2025, and the final transition period ended at the end of May 2026. MRP Live plans these materials only with the classic MRP logic.

SAP recommends transferring the forecast values as planned independent requirements and planning the materials with deterministic MRP. With a range of coverage profile, safety stock then follows these requirements.

How to proceed

These steps need no new tool, but they do need data from SAP, decisions by management, and time from materials planning and purchasing.

  • Set the measure and the target. α or β, plus a service level for each segment.
  • Segment the materials. ABC by consumption value, XYZ by regularity of demand, plus the consequences of a shortage.
  • Measure the forecast error. MAD or standard deviation per material, in the time bucket you plan in; for A materials, check the forecast model.
  • Analyze lead times. Mean and variability of the actual replenishment lead time per supplier, compared with the planned delivery time.
  • Calculate and compare. Put the calculated safety stock next to today’s, by segment and valued at the material price.
  • Choose the option in SAP. Fixed value with mass maintenance, automatic reorder point planning, or a range of coverage profile; remove double buffers.
  • Switch over segment by segment. After each wave, measure whether the service level achieved and the inventory match the target.

Frequently asked questions

What is the difference between safety stock, reorder point, and minimum stock?

Safety stock buffers deviations; the reorder point triggers the order.

Minimum stock is not a uniform term; it often means the same as safety stock or a reserve that must not be touched. In SAP’s range of coverage profile, it is the lowest of three levels, and the target stock level serves as safety stock. Make sure everyone in your company means the same thing by each term.

How much inventory do we save if we calculate per material?

You can put a number on it before any change: place the calculated safety stock next to today’s for each material, and value the difference at the material price. How much comes out depends on how your current values came about. Some materials need more than today, and you see the net effect for each segment before you change anything.

Does the formula also apply to spare parts with intermittent demand?

No, because it assumes deviations that scatter normally around a mean; with intermittent demand, most periods are zero. How much stock such a part needs depends on the consequences of a failure and on a forecast that provides probabilities. In SAP, you store the result, for example, as the reorder point in manual reorder point planning.

For spare parts, we led a project on AI-based demand forecasting.

How often should we recalculate safety stock?

Whenever demand, forecast error, or lead time changes noticeably, for example after a change of supplier, and otherwise on a fixed schedule. What SAP calculates in the forecast run is only as current as the last forecast. Fixed values in the material master, by contrast, become outdated without anyone noticing; define who checks them and when.

How we help

If your planners have no time for the steps above alongside daily business, we get things started. You decide what service level your materials need; we measure forecast errors and lead times and calculate safety stock for each material. For each segment, you then see where capital is tied up without benefit and where protection is missing.

This is the analysis of inventory and MRP parameters, with findings in order of priority and proposals for parameters by material segment. On request, we make the changes in SAP ourselves.

We have designed and implemented materials planning procedures, including a reorder point report for planners in S/4HANA operations. We are currently developing materials planning concepts for a central warehouse serving several plants; there, the question is which material is stocked where. Sizing safety stocks is part of our supply chain planning and inventory optimization service.

Initial call: 30 minutes, free of charge.

Tell us where things get stuck in materials planning and the warehouse. We will tell you where we would start and whether we are the right fit.

Initial call Call