Is it possible to reduce costs by optimizing inventory?
Every month, companies in the pharmaceutical industry need to decide how many units of each product presentation to manufacture, purchase, or keep in stock. Pharma Inventory Optimization starts precisely with these decisions: how much inventory to hold and how to adapt it to the needs of each product.
At first glance, this may seem like a routine decision that could be addressed by applying simple coverage rules: one month of inventory, two months for critical products, or slightly more when supply lead times are long. However, each of these decisions has a direct impact on the business.
If inventory is insufficient, the risk of not having the product available when needed increases. If inventory is excessive, so do tied-up capital, storage costs, and the risk of expiration.
The challenge is finding the right balance: maintaining the required service level without holding more inventory or incurring higher costs than necessary.
The challenges of balancing inventory in Pharma
According to the AEMPS Drug Supply Issues Report, 2,345 incidents were recorded in Spain in 2025. During the second half of the year, increased demand was the second most frequently reported cause of inventory imbalances by pharmaceutical companies, accounting for 20.6% of cases, behind only plant capacity issues, at 29%.
At the other end of the spectrum is excess inventory. The annual benchmark published by nVentic on major pharmaceutical companies estimates that the 28 companies analyzed held approximately $170 billion in inventory in 2025.
However, the problem is not simply determining how much inventory to hold. In the pharmaceutical industry, each product has different characteristics, constraints, and requirements, and applying the same coverage rule across the entire portfolio can create significant imbalances.
Inventory adjustments often involve shortening lead times and replenishing more frequently. In the pharmaceutical industry, however, this option is inherently limited.
Lead times are long and relatively inflexible. Several months may pass between the decision to manufacture a product and the moment it becomes available. During that time, the process involves active pharmaceutical ingredient supply, the production campaign, quality control, and batch release.
Expiration adds another constraint. A drug that reaches the warehouse after already consuming part of its shelf life leaves less room to absorb deviations in demand. And inventory that is not consumed in time cannot simply be discounted or liquidated: it must be destroyed.
The structure of the portfolio itself adds another layer of complexity. The same active pharmaceutical ingredient may be marketed in different dosages, formats, and countries, with packaging and patient information leaflets that are not interchangeable across markets. From a planning perspective, each presentation behaves as a different product, with its own demand and uncertainty.
In addition, service levels are not driven solely by commercial objectives. Supply obligations, commitments to hospitals, and tender contracts mean that a product shortage can have consequences that extend far beyond a lost sale.
A more accurate forecast is not always better
When an organization wants to improve its inventory management, one of the first steps is usually to review its demand forecast.
Forecasting is a fundamental part of the process, but it is not the only one.
Inventory management actually involves three different but interconnected decisions:
- How much demand we expect for each product presentation and planning horizon.
- How much uncertainty we want to cover, based on the committed service level and the required safety stock.
- How we act operationally: when to trigger each replenishment, in what quantity, and where in the network to hold the product.
Confusing these decisions can lead to incorrect diagnoses. When a stockout occurs, it is easy to attribute it directly to a forecasting error. However, the problem may lie in the coverage level defined for that product or in the timing of the replenishment order.
A more accurate forecast alone cannot correct a poorly calibrated inventory policy.
Forecasting also means understanding and accounting for uncertainty
A good forecast is not simply about estimating how much will be sold or consumed.
The goal of an optimal model is not to guess next quarter’s consumption, but to accurately characterize how far actual demand may deviate from the forecast and the probability of those deviations.
That distinction is what makes better decision-making possible. Knowing that a hospital product consumes around 400 units per month is of limited value if we do not also know how often demand has exceeded 1,000 units. The second figure is what determines the inventory required to maintain the committed service level.
Demand patterns are not homogeneous within the same company either. A retail pharmacy product with stable consumption and recognizable seasonality can be addressed with relatively straightforward time-series models. A low-volume hospital drug with sporadic, irregularly sized orders requires specific approaches for intermittent demand, where a common mistake is to plan around a monthly average that does not actually occur in any given month.
It is also important to incorporate the factors that explain changes in behavior but may not appear in recent historical data: epidemiological seasonality, tender schedules, the introduction of a generic or biosimilar, changes in pricing or reimbursement, and, more often than might be expected, a competitor’s supply shortage, which can shift demand toward the company’s own product from one month to the next.
One practical detail can have a significant impact on the quality of the results: whenever possible, models should use actual consumption data rather than relying solely on sales invoiced to distributors. The two series may look similar over the long term, but the latter incorporates the channel’s purchasing decisions and amplifies fluctuations that may later be interpreted as demand variability.

From forecasting to decision-making: the role of optimization
Once demand and its uncertainty have been properly characterized, the problem is no longer purely statistical. It becomes a decision problem: which inventory policy should be applied to each product?
This is where mathematical optimization comes into play.
The objective is to evaluate different alternatives and identify the one that minimizes total costs—including manufacturing, storage, expiration-related obsolescence, and expedited transportation—while accounting for the real constraints of the operation.
Approved lot sizes, plant and cold-storage capacity, supplier minimum order quantities, the remaining shelf life of each batch, and minimum service levels are all part of the problem.
The model therefore goes beyond simply answering “How much inventory should we hold?” and makes it possible to ask a more useful question from a business perspective:
Given the available capacity and the service level we need to guarantee, which combination of decisions results in the lowest cost?

What changes when decisions are supported by a Decision AI model
Another important decision is where to hold that inventory.
Concentrating inventory coverage in a central warehouse can reduce the total inventory required, as deviations across different markets may offset one another. However, this can also increase delivery lead times.
Distributing inventory across regional warehouses improves responsiveness, but it may increase both the amount of inventory required and the risk of expiration.
The right balance depends on the characteristics of each product and does not necessarily have to be the same across the entire portfolio.
In addition, before implementing a new policy, it is also possible to test how it would perform under different scenarios. Simulation can be used to evaluate proposed rules under variations in demand and supply lead times and assess their impact on stockouts, expired products, and tied-up capital.
The final decision remains in the hands of those who understand the operation. The model provides computational capabilities and an objective basis for comparing alternatives, while the planner’s judgment remains essential for interpreting the context of each product and market.
Toward a more precise inventory policy
These types of initiatives work best when they begin with diagnosis rather than with the model itself.
The first step is to segment the portfolio based on two criteria: product criticality and demand behavior. This way, the classification helps determine where analytical effort is worthwhile and where a simple rule may be sufficient.
The second step is to assess the starting point using actual consumption data: how much inventory is currently held for each product and how much would be required to maintain the committed service level. The difference between these two figures, calculated product by product, is often the best estimate of the potential for improvement—and it can be obtained before developing any model.
This highlights one of the fundamental differences between applying a general rule and supporting decisions with a model: the inventory policy can be adapted to the specific characteristics of each product.
Companies that manage inventory effectively are not necessarily those with the most accurate forecasts, but those that understand where they can afford forecasting errors and where they cannot. This distinction cannot be addressed through a single rule applied across the entire portfolio: it needs to be evaluated product by product, with an explicit measure of uncertainty.
Making these decisions requires combining operational knowledge with models capable of evaluating thousands of alternatives under real-world constraints.
At Baobab AI, we support organizations in the industrial and healthcare sectors with these types of problems, combining demand forecasting, mathematical optimization, and simulation to deliver solutions tailored to the specific characteristics of each operation and focused on continuously improving decision-making.
Want to explore how to optimize your portfolio’s inventory policy?
References
1. AEMPS · Informe de Problemas de Suministro (informes semestrales)
2. AEMPS · Nota informativa sobre la reducción interanual de los problemas de suministro





