AI demand forecasting: how machine learning predicts demand from your own orders
AI demand forecasting uses machine learning to predict how much of each item customers will order in each coming week or month, from your own order history and from outside signals such as prices, promotions, weather or building permits. It replaces last year plus a percentage with models that learn from every item at once and report how uncertain each forecast is. This guide explains how demand forecasting works, what machine learning changes, how to measure accuracy, the main tools, the data it needs and how to start with a small test.

What demand forecasting is
Demand forecasting estimates how much of each product customers will want in each future period. Demand is what customers would have ordered, which is not always what you shipped: an item that was out of stock records its lost sales as zero. Every forecast has a level of detail and a horizon. The level of detail is the item, location and time bucket, such as item by warehouse by week. The horizon is how far ahead it looks, and it must reach at least as far as the time it takes to buy or make the item.
The forecast feeds most operating decisions: what to buy, what to make, how many people to schedule and how much cash the inventory will tie up. AI financial modeling covers carrying it into the financial model. MIT’s Center for Transportation and Logistics teaches three rules of thumb in its supply chain key concepts:
- Forecasts are always wrong, so track the error.
- Aggregated forecasts are more accurate than detailed ones.
- Shorter-horizon forecasts are more accurate than longer ones.
Forecasting textbooks start with simple methods. In Forecasting: Principles and Practice, Rob Hyndman and George Athanasopoulos describe two of them. The naive method sets every forecast to the last observed value, and the seasonal naive method uses the last value from the same season. The authors note that these methods usually “serve as benchmarks rather than the method of choice,” so compare any new method against them. Exponential smoothing and ARIMA models add trend and seasonality. Machine learning models add the other information the data holds.
How demand forecasting is done by hand
In a smaller company, the forecast is usually a spreadsheet, the buyer’s judgment, or both:
- Last year’s sales for the same month, plus a growth percentage.
- A moving average of the last three or six months.
- A call with the sales team about the large customers.
- A min/max level in the ERP that nobody has changed in years.
The weak points are predictable. One method is applied to every item, whether it sells every day or twice a year. Promotions and one-time orders stay in the history and inflate next year. Months when an item was out of stock count as zero demand. Nobody records how wrong last month’s forecast was, so nobody knows whether it is improving.
What machine learning changes
Machine learning demand forecasting differs from the spreadsheet in five ways.
It learns across items at once
Classic methods fit one model per item. Machine learning models such as gradient-boosted trees can learn one model across thousands of items, so a new or slow item borrows patterns from similar ones. The strongest public evidence comes from the M5 competition, in which teams forecast 42,840 time series of Walmart unit sales. The organizers reported that the top-performing methods were machine learning models, most of them built on LightGBM, a gradient-boosted tree library. Essentially all of the top 50 learned across many series at once. Walmart is a retailer, but the setup matches a distributor’s: many related items, many locations, and prices and calendar events that move demand.
It uses outside signals
A model can also take inputs that are not in the sales history. In M5, prices, promotions and special events were part of the data, and the organizers found that all the winning submissions used this outside information. In ERP software, Microsoft’s Dynamics 365 Demand planning has a Forecast with signals step, a preview feature. It combines historical sales with up to five signal inputs “such as inflation or weather data.” Which signals help depends on the business:
- A building-supply chain can use construction activity. Statistics Canada publishes building permits every month by province and census metropolitan area. Permits across Canada totalled $12.2 billion in July 2026.
- A food or beverage producer can use weather. Environment and Climate Change Canada publishes historical weather data by station.
- A manufacturer can use its open quotes and its customers’ project schedules.
- A distributor can use each customer’s ordering rhythm. A customer who orders every two weeks and is now four days late is a signal in itself.
It can start from a pretrained model
Since 2024, Google and Amazon have released forecasting models pretrained on large collections of time series. They can forecast a new series without being trained on it, which is called zero-shot forecasting. Google Research described TimesFM in February 2024 as a 200-million-parameter model trained on 100 billion real-world time points. On August 31, 2026, it released TimesFM-3, which forecasts several related series together and accepts outside signals. Amazon released Chronos-2 in October 2025, with support for known future inputs such as scheduled promotions and weather forecasts. Both are published as open models, so they can run on servers you control. They make a fast baseline, and they need the same backtest as any other method.
It forecasts a range
A single number hides the risk. A probabilistic forecast gives a range, for example a 90% chance that next week’s demand falls between 40 and 75 units. TimesFM-3 predicts nine quantiles, points spread across that range. The range is what sets safety stock, and inventory optimization covers how.
It reads what customers write
Some demand signals arrive as text: a customer email about a new contract, a sales rep’s note that a plant is closing a line, a large quote that is likely to convert. A language model can read them and propose a change to the forecast, with the source attached, for a planner to accept or reject. The textbook advice on judgmental adjustments applies. Adjust when there is “significant additional information at hand,” and require people to document and justify each change, which “will guard against unnecessary adjustments.”
Four businesses, four forecasts
The method is the same in every industry. The level of detail, the signals and the decisions the forecast drives are what change.
| Business | What it forecasts | Signals that help | What the forecast drives |
|---|---|---|---|
| Equipment manufacturer | Finished products and service parts by month | Open quotes, customer projects, dealer stock | The production plan and, through the bills of materials, purchases of parts |
| Industrial distributor | Each item by branch by week | Customer order cycles, contract volumes, price changes | Purchase orders and transfers between branches |
| Food producer | Each pack size by customer by week | Holidays, weather, retailer promotions | Production runs, raw material buying and staffing |
| Building-supply chain | Each item by store by week | Building permits, season, weather | Store replenishment and seasonal buying |
Measuring forecast accuracy
The only fair test of a forecast is on data it has not seen. Hold out the last six or twelve months, forecast them from the data before, and compare. Hyndman and Athanasopoulos describe a repeated version called time series cross-validation. Each test uses only earlier observations, so “no future observations can be used in constructing the forecast.”
Three error measures cover most needs:
- Mean absolute error (MAE) is the average miss in units.
- Mean absolute percentage error (MAPE) is the average miss as a percentage. The textbook’s section on evaluating forecast accuracy warns that it is “infinite or undefined” when actual demand is zero, which rules it out for slow movers.
- Mean absolute scaled error (MASE) compares the error with the naive method’s error. A scaled error is “less than one if it arises from a better forecast than the average one-step naïve forecast.”
Track bias as well. A forecast that runs 10% high on average fills the warehouse even when its error looks small. Compare every model with the seasonal naive benchmark and with your current method, one item group at a time, because a model can win on fast movers and lose on slow ones.
Demand forecasting tools
Demand forecasting tools fall into four groups. The descriptions are the vendors’ own, and this guide does not rank them.
| Kind of tool | Examples | Worth knowing |
|---|---|---|
| Forecasting inside the ERP | Microsoft Dynamics 365 Demand planning, Business Central Sales and Inventory Forecast, Oracle NetSuite Demand Planning | It uses data already in the ERP. Methods differ: Demand planning offers auto-ARIMA, ETS, Prophet and XGBoost, and Business Central’s forecast is aggregated across all locations |
| Planning software that connects to the ERP | Inventory planning and supply chain planning products | It adds replenishment, scenarios and approval screens on top of the forecast |
| Open-source libraries and pretrained models | LightGBM, XGBoost, Prophet, TimesFM, Chronos-2 | The code is published openly. Someone has to build, test and run it on your data |
| A model built on your own data | A forecast built for your items, customers and signals | It gives the most control and takes the most work. It can run on servers you control |
AI for inventory management compares three forecasting products in more detail. Whatever you choose, ask how it charges, how you can see its error on your own items, and whether it keeps a copy of your sales history.
Test a forecast on your own history
Tell Derik which ERP holds your order history and which items are hardest to plan. He will tell you what a backtest on your data would take.
Start a conversationThe data AI demand forecasting needs
| Data | Why it matters |
|---|---|
| Order lines with order date, requested date, item, customer, ship-to and quantity | Demand as customers asked for it, before stock limited what shipped |
| Shipments, backorders and stockout periods | Separates true demand from what stock allowed |
| Prices, discounts and promotions by date | Explains spikes that will not repeat |
| Item master: unit of measure, product family, replacements and new items | Lets the model borrow history from similar items |
| Customer master: segment, region and contract status | Groups customers that behave alike |
| Bills of materials | Turns a forecast of finished products into demand for parts |
| Outside signals: weather, permits, holidays, economic data | Explains movement that the sales history alone cannot |
Two to three years of history is a practical minimum for items with a season. The most common problems are changing units of measure, duplicate item numbers and stockouts that look like zero demand. AI for inventory management covers how to fix them, and AI for ERP covers getting the history out of the ERP.
How to start small
- Choose 200 to 500 items that matter: the top sellers plus every item that ran out last year.
- Build the benchmark first: a seasonal naive forecast and the method you use today.
- Backtest a machine learning model, or a pretrained one, on the last 12 months, one month at a time.
- Compare the error by item group, not only in total.
- Run the new forecast beside the current process for two or three months, with a planner approving every change.
- Add outside signals one at a time, and keep each one only if the backtest error falls.
Risks and limits
- New items have no history. Borrow the history of similar items, or use a planner’s estimate, until real orders arrive. AI market research covers sizing demand before a launch.
- Breaks in the pattern mislead every model. A tariff change, a lost customer or a plant closure makes past data a poor guide. Watch the error closely after any big change, and override when you know something the model does not.
- A forecast can feed itself. If you stock less because the forecast is low, you sell less, and the next forecast falls further. Record stockouts so the model sees the lost demand.
- Leakage flatters a backtest. Training on information that would not have been known on the forecast date, such as the final quantities of orders that were still open, makes a model look better than it is. Test the forecast the way it will run.
- Use each kind of model for its job. Language models read text and explain results well. Leave the numbers to forecasting models that you have backtested.
- Order history is commercially sensitive. Check where any tool processes and stores it. Private AI for business lists the questions to ask.
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 demand, that means reading the order history in your ERP, cleaning it so each item means the same thing everywhere, and drafting item-level forecasts that a planner reviews and approves before anything changes in 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.