Home » Knowledgebase » Here

Service level (inventory) represents the expected probability of not hitting a stock-out. This percentage is required to compute the safety stock. Intuitively, the service level represents a trade-off between the cost of inventory and the cost of stock-outs (which incur missed sales, lost opportunities and client frustration among others). In this article, we detail how to optimize the service level value. Then, the analysis is refined for the special case of

The article has been written from a *classic forecasting* viewpoint back in 2011. However, a few years later, we now realize that there are much better options available if the forecasting technology is capable of entirely removing the need to optimize the service levels as it is the case with quantile grids.

Let's introduce the following variables:

- $p$ be the service level, i.e. the probably of
*not*having a stock-out. - $H$ be the
*carrying cost*per unit for the duration of the lead time (1). - $M$ be the marginal unit cost of stock-out (2).

(1) The

(2) The stock-out cost includes

The

- $Q$ the
*amortized*inventory quantity (3), a function that depends on $p$. - $O$ the
*average*overflowing demand when a stock-out it hit.

(3) We are adopting here an Amortized Analysis viewpoint. The inventory level is varying all the time, but our goal here, in order to make the analysis practical, is to obtain a service level value that is decoupled from the demand forecast itself. Hence, we will assume $Q$ to be equal to the

For a given service level, the total cost $C(p)$ that combines both

This result can be interpreted as: if the demand is rigorously following the normal distribution, then the average quantity of missed sales

Yet, in our experience, the forecast error does not have a convergence as good as the one the normal distribution would predict. Hence, below, we will assume that $O=\sigma$ that is to say that the average amount of

This relationship let us obtain: $$\sqrt{2\pi}e^{\frac{1}{2}\Phi^{-1}(p)^2}=\frac{M}{H}$$ $$\frac{1}{2}\Phi^{-1}(p)^2=\ln\left(\frac{1}{\sqrt{2\pi}}\frac{M}{H}\right)$$ We take the positive root solution of the equation (the negative root corresponds to a

Second, a greater inventory cost

Then, the formula is not valid for all values of $M$ and $H$. We need $\sqrt{2\pi}\frac{M}{H} > 1$ or the logarithm will produce a negative value which is not tractable considering the outer square root. This gives $M > \sqrt{2 \pi} H$, which can be approximated as $M > 2.5 H$. If this condition is not verified, then it means that the initial cost function $C(p)$ has no minimum, or rather that the minimum is $-\infty$ for $p=0$. From a practical angle, $M < 2.5 H$ could be interpreted as a pathological situation where the most profitable stock level is zero stock (i.e. 100% stock-outs).

Based on those values and on the formula for optimal service level obtained here above, we obtain $p\approx 98.5\%$ which is a typical value for

I am working on Forecasting and Supply Planning for short-life dairy products where the optimal service level is a very important subject. The most interesting and *tricky* component here is H – the *carrying cost* and the question of its proper value in practice.

For example, for**short-life dairy products** one of the important part of H should be not only pure *financial* cost of cash frozen in inventory and operational logistics storage cost but also the cost of **potential losses** due to **write-off of expired products** or sales with discounts when we are trying to sell-out more just before expiration. This happens when your sales are well below the forecast.

This tradeoff can be described as*the risk of potential over-stocks* vs. *the risk of potential stock-out* – two risks that work in opposite directions while they have the same origin by nature – i.e. interconnected with the safety stock. In case of big overforecasting, which usually causes expiry issue, forecast errors are not normally distributed. Thus I am wondering how to better express such *potential over-stocks* risks.

Back to your formula, its further development could be to try to find a relationship between H and p or to make H a function of p, i.e. H(p), before going for the minimization of the total cost C(p). What are your thoughts on this matter?

For example, for

This tradeoff can be described as

Back to your formula, its further development could be to try to find a relationship between H and p or to make H a function of p, i.e. H(p), before going for the minimization of the total cost C(p). What are your thoughts on this matter?

The service level formula given here above is indeed based on a

**Warehouse is full**, and there is a point where 1 extra unit of stock actually involve the massive overhead of getting an extra warehousing location.- Stock-outs cause incremental lost sales to reach the point where one extra stock-out causes the
**loss of the whole recurring client**.

Perishable products present another twist: if the

Indeed, $H$ represents the

In order to model the effect of the

- $\lambda$, the lead time.
- $\lambda_\infty$, the lifetime of the product before hitting terminal expiration (i.e. zero market value).
- $\lambda_½$, the duration that
**doubles the original carrying cost**of the product because of loss of its market value. - $\lambda_c(p)$, the stock cover, that is the stock expressed in days rather than product units. This duration depends on the safety stock factor, hence depends of $p$.

With those durations, we can model the carrying cost as:

$$ H(p) = H \left(1 - \frac{\lambda_\infty - \lambda_½}{\lambda_\infty - \lambda} + \frac{\lambda_\infty - \lambda_½}{\lambda_\infty - \lambda_c(p)} \right) $$ Let's detail the implicit assumption here, because we are somewhat

First, we have $H(0.5)=H$. This is obtained from the very definition here above. Indeed $\lambda_c(0.5)=\lambda$, with a service level at 50%, the stock cover equals the lead time. Hence, we are stating here that, in this model, $H$ represents the carrying cost where the write-off costs associated to a service level of 50% have already been factored into the cost $H$. It's notable to remark that zero safety stocks do not imply zero write-offs, only

Second, for the service level $p_½$ such as $\lambda_c(p_½) = \lambda_½$, then we have $H(p_½)=2H$. Again, this is only a consequence of the definition adopted for $H(p)$. Intuitively, $\lambda_½$ represents the duration that doubles the combination of carrying costs plus write-off costs, as compared to the

Finally, as $p$ gets closer from $p_\infty$ with $\lambda_c(p_\infty)=\lambda_\infty$, then $H(p)$ tends to infinity, again by definition of the adopted function for $H(p)$. At first glance, it seems odd to have a carrying cost that goes over the product unit cost, but there is no paradox here. The value $H(p)$ represents the

In summary, $\lambda_½$ is only one

$$\lambda_c(p) = \lambda \left(1 +\frac{\sigma}{Z}\Phi^{-1}(p)\right)$$ Indeed, $\lambda_c$, the stock-cover can be be seen as a ratio over the lead-time that includes the lead demand plus a

$$C^*(p) = \left(Z + \sigma \Phi^{-1}(p)\right)H\left(1 - \frac{\lambda_\infty - \lambda_½}{\lambda_\infty - \lambda} + \frac{ \lambda_\infty - \lambda_½}{\lambda_\infty - \lambda \left(1 +\frac{\sigma}{Z}\Phi^{-1}(p)\right)} \right) + (1-p)M\sigma$$ Unlike the previous cost function, this function does not seem to have a simple algebraic mimimum. However, by adopting an approach similar to the one used for the calculation of the economic order quantity, it is relatively straightforward to find an

Then, considering the nature of the analysis that has been made here above, we believe that this formula is

Get optimized sales forecasts with our inventory optimization software technology. Lokad specializes in inventory optimization through demand forecasting. Service levels - and much more - are native features of Lokad.

- ABC analysis
- Backorders
- Container shipments
- Economic drivers
- Economic order quantity
- Fill Rate
- Financial impact of accuracy
- Inventory accuracy
- Inventory control
- Inventory costs (carrying costs)
- Inventory turnover
- Lead time
- Lead demand
- Min/Max Planning
- Minimal Order Quantities (MOQ)
- Multichannel Order Management
- Optimal service level formula
- Perpetual Inventory
- Phantom Inventory
- Prioritized Ordering
- Product life-cycle
- Quantitative supply chain
- Reorder point
- Replenishment
- Safety stock
- Service level
- Stock-keeping unit (SKU)
- Stock Reward Function

- Backtesting
- Continous Ranked Probability Score
- Data preparation
- Forecasting accuracy
- Forecasting methods
- Obfuscation
- Overfitting
- Pinball loss function
- Probabilistic forecasting
- Quantile regression
- Seasonality
- Time-series

- Bundle Pricing
- Competitive Pricing
- Cost-Plus Pricing
- Decoy Pricing
- Long-term maintenance agreement pricing
- Long-term pricing strategies
- Odd Pricing
- Penetration Pricing
- Price Elasticity of Demand
- Price Skimming
- Repricing software (Repricer)
- Styling Prices for Retail