# Forecasting

> Forecasting is the use of historical data and statistical or machine learning models to estimate future values, such as next month's sales, call volumes or stock needs, usually with a range that shows how uncertain the estimate is.

Also called: demand forecasting, sales forecasting, time series forecasting, AI forecasting. Category: Data and retrieval. Source: https://aibuildindex.com/glossary/forecasting

## In the index

- Forecasting and prediction model: median $2,000, middle half $300 to $7,200, 109 priced briefs (https://aibuildindex.com/cost/forecasting-prediction)
- Predictive analytics: median $4,290, middle half $880 to $10,860, 32 priced briefs (https://aibuildindex.com/skills/predictive-analytics)
- Data science: median $4,000, middle half $500 to $12,400, 1,181 priced briefs (https://aibuildindex.com/skills/data-science)

Every business plans on guesses about the future: how much stock to order, how many staff to roster, how much cash will come in. Forecasting turns those guesses into estimates grounded in past data. AI and machine learning can improve forecasts by picking up patterns across many products or locations and by using extra signals such as promotions, weather or holidays. For buyers the real question is not whether a model can forecast, but whether it forecasts better than the spreadsheet already in use.

## How it works

A forecast starts with a time series: values recorded at regular intervals, such as daily sales per product. Classical statistical methods, such as exponential smoothing and ARIMA, model trend and seasonality and remain strong baselines. Machine learning methods, such as gradient-boosted trees and neural networks, can add external drivers like price changes, marketing spend or local events, and learn shared patterns across thousands of related series. Several foundation models for time series have also appeared that can forecast without much training.

A good forecast gives a range rather than a single number, for example a likely value with low and high bounds, because decisions such as safety stock depend on how uncertain the estimate is. Models are tested by backtesting: pretending to stand at past dates, forecasting forward and comparing against what actually happened.

An example: a bakery chain forecasts next week's demand per item per shop using two years of sales, the weather forecast and the calendar of school holidays, then sets production quantities from the upper range for fast-selling items.

## What it means for cost

Most of the effort goes into data rather than models. History must be long and clean enough, with stock-outs, promotions and one-off events identified, because a week with no sales due to an empty shelf is not a week of no demand; see [data cleaning](https://aibuildindex.com/glossary/data-cleaning). Connecting sources into a [data warehouse](https://aibuildindex.com/glossary/data-warehouse) and delivering forecasts back into the tools planners use adds integration work.

Ongoing cost comes from retraining and monitoring, since patterns change and models drift; see [model drift](https://aibuildindex.com/glossary/model-drift). Ask a builder what baseline they will beat, how accuracy will be measured on held-out periods, and how planners will see and override forecasts. Live figures are on the [forecasting and prediction cost page](https://aibuildindex.com/cost/forecasting-prediction).

## Common questions

### How much history is needed for a forecast?

Enough to see the patterns that matter. Capturing yearly seasonality generally needs at least a couple of years of data; short-term operational forecasts can work with less. New products with no history are usually forecast from similar items.

### Is AI forecasting always better than traditional methods?

No. On short or simple series, classical methods often match or beat complex models and are easier to explain. Machine learning tends to help when there are many related series and useful external drivers. A fair comparison on backtests should decide.

## Related terms

- [Predictive analytics](https://aibuildindex.com/glossary/predictive-analytics): Predictive analytics is the use of historical data and statistical or machine learning models to estimate the likelihood of future outcomes for individual cases, such as which customers will churn, which leads will convert or which invoices will be paid late.
- [Machine learning](https://aibuildindex.com/glossary/machine-learning): Machine learning is a branch of AI in which software learns patterns from examples rather than following hand-written rules, then uses those patterns to make predictions or decisions about new data.
- [Data warehouse](https://aibuildindex.com/glossary/data-warehouse): A data warehouse is a central database designed for analysis, where cleaned data from many business systems is stored together so teams can run reports, dashboards and AI queries across all of it.
- [Data cleaning](https://aibuildindex.com/glossary/data-cleaning): Data cleaning is the work of finding and fixing errors, duplicates, gaps and inconsistencies in a dataset, such as mismatched formats or misspelt names, so that reports, automations and AI models built on it give reliable results.
- [Anomaly detection](https://aibuildindex.com/glossary/anomaly-detection): Anomaly detection is the automated identification of data points, transactions or behaviour that differ markedly from the normal pattern, such as a suspicious payment, a sudden drop in sales or a failing machine, so they can be investigated.
- [Model drift](https://aibuildindex.com/glossary/model-drift): Model drift is the gradual decline in an AI system's accuracy after launch, caused by real-world data, user behaviour or the underlying model changing away from the conditions the system was built and tested on.
