Inventory optimization: setting safety stock and reorder points for every item with AI

Inventory optimization sets three numbers for each item: the safety stock, the reorder point and the order quantity. The goal is to reach the service level you choose with the least money tied up in stock. The settings come from data most businesses never measure item by item: how much demand varies, how much supplier lead times vary, and how often you can afford to run out. This guide gives the formulas, a calculator and what AI changes.

A long, clean aisle between blue and yellow pallet racks loaded with boxed stock in a distribution warehouse

What inventory optimization is

Static rules give every item the same treatment, such as a month of cover. Inventory optimization sets each item from its own data and resets it when the data changes. The Business Development Bank of Canada (BDC) calls this a dynamic system in its guide to optimizing inventory management. In such a system, “reordering quantities and timing vary for each product based on its sales volume, lead time and safety stock level.”

The money involved is large. US businesses held $2,764.7 billion of inventory at the end of July 2026, according to the Census Bureau’s Manufacturing and Trade Inventories and Sales report, an inventories-to-sales ratio of 1.30.

Inventory forecasting, the demand forecast for each item, is the input to all of this. AI demand forecasting covers how to build it, and AI for inventory management covers the other inventory jobs, such as cycle counts and slow-moving stock. This guide covers what to do with the forecast.

How it is done by hand

Most smaller companies set stock levels with rules of thumb:

The result is too much of some items and too little of others. Two weeks of cover protects a steady seller well and an erratic one poorly. AI for inventory management shows how a reorder point built on a quoted lead time of 10 days runs out before the order lands when orders really take 14.

The inventory optimization formulas

The standard method comes from operations research. MIT’s Center for Transportation and Logistics sets out each piece in its supply chain key concepts, and the steps below follow it.

Service level

Choose the measure first. Cycle service level is “the probability that there will not be a stock out within a replenishment cycle.” Item fill rate is “the fraction of demand that is met with the inventory on hand out of cycle stock.” They differ, and MIT notes that fill rate “is always higher than CSL for the same safety stock level.” The cycle service level sets the safety factor k. With the normal distribution, k is about 1.645 for 95% and about 2.326 for 99%, values you can check in NIST’s table of the standard normal distribution.

Safety stock and reorder point

Safety stock is k times the standard deviation of demand over the lead time. The reorder point adds the expected demand over the lead time. When both demand and lead time vary, MIT combines the two sources of variation:

QuantityFormula
Demand over the lead timeAverage daily demand × average lead time in days
Variation of demand over the lead timeσDL = √(average lead time × σD² + average daily demand² × σL²)
Safety stockk × σDL
Reorder pointDemand over the lead time + safety stock

Here σD is the standard deviation of daily demand and σL is the standard deviation of the lead time in days. Use the same time unit throughout.

Take an item that sells 8 units a day on average, with a standard deviation of 3 units a day and an average lead time of 14 days. The table compares a supplier that always takes 14 days with one whose lead time varies with a standard deviation of 3 days.

Lead time never variesLead time varies by 3 days
Demand over the lead time112 units112 units
Variation over the lead time (standard deviation)11.2 units26.5 units
Safety stock at 95% (k = 1.645)18.5 units43.6 units
Reorder point at 95%130.5 units155.6 units
Safety stock at 99% (k = 2.326)26.1 units61.6 units

The supplier’s variation more than doubles the safety stock. Moving from 95% to 99% raises it by another 41%. MIT’s notes warn that “as k increases, it gets difficult to improve CSL and it will require enormous amount of inventory to cover the extreme limits.”

Order quantity

The order quantity sets how often you reorder. The economic order quantity (EOQ) balances the cost of placing an order against the cost of holding stock: EOQ = √(2 × cost per order × annual demand ÷ holding cost per unit per year). MIT calls it “exceptionally robust,” because ordering 50% more than the optimal quantity raises the relevant cost by only about 8%. It assumes steady demand, so treat it as a starting point and round it to the supplier’s pack sizes and minimums. AI in procurement covers turning the resulting suggestions into purchase orders.

If you order on a fixed day, such as every Monday, the stock must also cover the time until the next order. MIT notes that periodic review policies are popular “because they fit the regular pattern of work where ordering might occur only once a week or once every two weeks.” In the formulas above, replace the lead time with the lead time plus the review period.

Safety stock calculator

Enter your own numbers. The calculator runs in this browser tab, and nothing you type is sent anywhere or recorded. It uses the formulas above with the cycle service level you choose.

Safety stock and reorder point calculator
Demand over the lead time112.0 units
Variation over the lead time (σDL)26.5 units
Safety factor k1.645
Safety stock43.6 units
Reorder point155.6 units
Safety stock if the lead time never varied18.5 units
Round up to whole units when you enter these in the ERP. To turn a weekly standard deviation into a daily one, divide it by the square root of the number of selling days in a week.

The calculator assumes demand is roughly normal, which suits items that sell on most days. For items that sell a few units a month, it overstates the precision, and the section on risks covers what to use instead.

What AI changes

The formulas stay the same. AI changes the quality and the freshness of the numbers that go into them, item by item.

It measures variation for every item

The formulas need the variation of demand and of lead time for each item, which is exactly what nobody measures by hand. Software computes both from order and receipt history, by item and by supplier, and refreshes them every month. MIT adds that σDL “is more technically the root mean square error (RMSE) of the forecast over the lead time.” A better forecast therefore lowers the safety stock you need.

It handles the items the formula fits badly

The normal formula fits items that sell on most days. For slow and lumpy items, software can replay your own history, order by order, to see how much demand arrives during a typical lead time. It can also use a probabilistic forecast that predicts the range directly. Google’s TimesFM-3, for example, predicts nine quantiles. The reorder point then becomes a percentile of demand over the lead time, such as the 95th.

It sets the service level by class

Not every item deserves 99%. A common approach groups items by value and by how steady their demand is, then sets a service level for each group. MIT measures steadiness with the coefficient of variation, “the standard deviation over the mean.” BDC describes its top class as “items you can’t afford to be out of stock ever.” Software keeps each item in the right group as its sales change. For items at the bottom of every ranking, SKU rationalization covers whether to stock them at all.

It pools stock across locations

A company with several warehouses can hold less total safety stock by keeping part of it in one place, because variation across locations partly cancels out. MIT’s forecasting principles include that “aggregated forecasts are more accurate than dis-aggregated forecasts.” Multi-location models decide where each item’s buffer should sit and when to move stock between sites.

It tests settings before they go live

Before new settings reach the ERP, software replays the last year of demand and receipts against them and reports the stockouts and the average inventory value they would have produced. The buyer reviews the items where the new setting differs most from today’s, and only approved changes are written back. Human in the loop covers that approval step.

Find out what your stock settings should be

Tell Derik which ERP you run, how many active items you carry and where stockouts or excess hurt most. He will tell you what your data can support.

Start a conversation

Inventory optimization software

Most ERPs already store the settings that inventory optimization produces. In Microsoft Dynamics 365 Business Central, for example, the planning parameters on each item include a safety stock quantity, a reorder point, a reordering policy such as Fixed Reorder Qty. or Maximum Qty., and order modifiers such as a minimum order quantity and an order multiple. Microsoft explains that reorder proposals are typically released only “when the projected available quantity is equal to or below a given quantity. The reorder point defines the quantity.” Someone still has to choose those values item by item and keep them current.

Inventory optimization software does that job. It reads the history from the ERP, computes the settings and writes approved values back. It comes as features inside some ERPs and planning suites, as standalone planning products that connect to the ERP, or as a model built on your own data. Whichever form you consider, ask these questions:

The data inventory optimization needs

DataWhere it usually livesUsed for
Demand history by item and location, with order datesERP sales and inventory transactionsAverage and variation of demand
Purchase orders and receipts with datesERP purchasingReal lead times and their variation, by supplier
Current settings: safety stock, reorder point, min/max, order quantityERP item or planning recordsComparing today’s settings with computed ones
Unit cost, ordering cost and holding cost rateERP, accounting systemOrder quantity and the cost of each service level
Supplier minimums, pack sizes and price breaksSupplier recordsRounding order quantities
Stockouts and backordersERP, sales recordsTrue demand during shortages

AI for ERP covers getting this data out of the ERP, and warehouse AI covers the location data a warehouse management system holds.

How to start small

  1. Pick 100 to 300 items: the most valuable and the ones that ran out most often.
  2. Measure real lead times and their variation for each supplier from 12 to 24 months of receipts.
  3. Measure the variation of demand for each item, or better, the error of its forecast.
  4. Choose a service level for each class, write it down, and compute new safety stock and reorder points.
  5. Replay last year with the new settings and compare stockouts and inventory value with what happened.
  6. Change the ERP settings for approved items only, and review the result every month.

Track the result with a few measures: stockouts, fill rate, inventory value, excess stock and inventory turnover. BDC’s inventory turnover ratio page defines turnover as “Cost of goods sold (COGS) / Average inventory.”

Risks and limits

How ThriveAI helps

ThriveAI is an AI engineering company in Ottawa that builds private AI systems on a company’s own data, for businesses that make, move or sell physical goods. For inventory, that means computing safety stock and reorder points for each item from your own demand and lead-time history, and drafting new settings for a named buyer to approve before they reach the ERP. Every answer shows where it came from.

ThriveAI’s systems read your ERP and accounting system as they are, and every connection only reads data. They are designed to keep each client’s data on its own server in Canada. You choose a model on that server or a hosted model under a written zero data retention agreement, and a hosted model may process requests outside Canada. Derik Lawlis, the founder, leads every project and stays close to the build. About ThriveAI covers the company.

Questions people ask

What is inventory optimization?
Inventory optimization sets the safety stock, reorder point and order quantity for each item from its own demand and lead-time data, to meet a chosen service level with the least inventory. The settings are recalculated as demand, suppliers and costs change.
What is inventory optimization software?
It is software that reads demand and receipt history from the ERP, measures how much demand and lead time vary for each item, calculates safety stock, reorder points and order quantities, and proposes changes for a buyer to approve. Some ERPs include parts of it, and planning tools add it on top.
How do you calculate safety stock?
Multiply the safety factor for your service level by the standard deviation of demand over the lead time. For a 95% cycle service level the factor is about 1.645. When the lead time varies too, that standard deviation is the square root of the average lead time times the variance of daily demand, plus the average daily demand squared times the variance of the lead time.
What is the 80/20 rule in inventory?
It describes the common pattern in which a small share of items brings most of the sales. BDC notes that 80% of a company's sales are typically generated by 20% of its products. Inventory optimization uses the pattern to give the top items a higher service level than the tail.
What is the difference between cycle service level and fill rate?
Cycle service level is the probability of not running out during a replenishment cycle. Fill rate is the share of demand met from stock on hand. For the same safety stock, fill rate is always the higher of the two, so state which one a target refers to.
Which KPIs show whether inventory optimization is working?
Track fill rate or cycle service level, stockouts, inventory value, days of supply, excess and obsolete stock, and inventory turnover, which BDC defines as cost of goods sold divided by average inventory. Measure them before and after each change.
What is inventory forecasting?
Inventory forecasting predicts the demand for each item over the coming weeks or months. The forecast sets the expected demand inside each reorder point, and its error sets how much safety stock you need.

Contact

Start with the stock that ties up your cash

Tell Derik which items cause the most stockouts or excess and which ERP holds their history. He will tell you whether your demand and lead-time history can set their stock levels.

Prefer to talk? Book a meeting.

Your message goes to Derik Lawlis, the founder.