# Demand forecasting basics for distributors

> Moving averages, weighted averages and exponential smoothing by item and location, plus seasonal and lumpy demand and how to measure forecast error.

Source: https://docs.lumina-erp.com/distribution/demand-forecasting-basics/

**In short.** Distributors forecast each item at each stocking location because that is where the buying decision is made, and simple methods such as moving averages and exponential smoothing do most of the work. Measure every forecast with error and bias, and treat MAPE with suspicion on slow movers, where it breaks down.

A forecast is an estimate of how much of an item customers will take from one location over the coming periods. It drives reorder points, safety stock and purchase suggestions, so a biased forecast turns straight into too much or too little stock.

## At a glance

| Method | Best for | Weakness |
|---|---|---|
| Moving average | Steady items with no trend | Lags any change, weights old and new equally |
| Weighted moving average | Steady items where recent months matter more | Weights are a judgment call |
| Simple exponential smoothing | Steady items, one tunable setting | Lags a trend, ignores seasons |
| Seasonal methods | Items with a repeating yearly pattern | Need two or more years of clean history |
| Croston's method | Intermittent, lumpy demand | Biased, gives no natural range |

## Why forecast by item and location

Buying and stocking decisions are made for one item at one warehouse. A company-wide forecast of 10,000 units a month says nothing about whether the north branch will run out next week. Forecasting at item-location level lets each branch carry stock for its own customers and lead times, and lets you add the pieces up for purchasing from a supplier.

The cost is noise. Demand for one item at one branch is small and erratic, so errors are larger in percentage terms than at the total. Use item-location forecasts for replenishment and aggregated forecasts for budgets and capacity.

:::tip
Forecast demand, not sales. If you were out of stock for two weeks, sales understate what customers wanted. Many systems let you record lost sales or flag stockout periods. Use them, or those months will drag the forecast down and cause the next stockout.
:::

## Moving average

### How a moving average works

A moving average forecasts next period as the average of the last n periods. Each new month drops the oldest month and adds the newest. The NIST e-Handbook notes that an ordinary average weights all past observations equally, which is the method's main weakness. A spike three months ago counts as much as last month.

**n-period moving average:** `Forecast for next period = sum of the last n actuals ÷ n`

A short window (three months) reacts quickly and chases noise. A long window (12 months) is stable but slow to react to a real change.

### Weighted moving average

A weighted moving average gives recent periods more weight. With weights of 3, 2 and 1 on the last three months, the most recent month counts three times as much as the oldest. The weights must be divided by their total (6 here) so the forecast stays in the right units.

## Simple exponential smoothing

### How smoothing updates the level

Exponential smoothing keeps one running estimate, the level, and updates it every period by moving part of the way toward the latest actual. Older periods never drop out, but their weight shrinks geometrically. Hyndman and Athanasopoulos present it in component form in FPP3 section 8.1.

**Simple exponential smoothing:** `New level = α × latest actual + (1 − α) × previous level; forecast = new level`

Where:

- **α (alpha)** is the smoothing constant, between 0 and 1. A high alpha (0.5) reacts quickly. A low alpha (0.1) smooths heavily.
- **The starting level** has to come from somewhere. The NIST e-Handbook lists setting it to the first actual or averaging the first few actuals. FPP3 estimates it along with alpha by minimizing squared errors. The lower the alpha, the longer a poor starting value lingers.

Simple exponential smoothing produces a flat forecast, with the same number for every future period. It does not project trend or seasons.

## Worked example

With invented numbers, one item at one branch sold the following over six months. We compare a three-month moving average with simple exponential smoothing at α = 0.3, starting the level at January's actual of 120.

| Month | Actual | 3-month moving average forecast | Smoothing forecast (α = 0.3) |
|---|---|---|---|
| Jan | 120 | | |
| Feb | 100 | | 120.00 |
| Mar | 140 | | 114.00 |
| Apr | 110 | 120.00 | 121.80 |
| May | 130 | 116.67 | 118.26 |
| Jun | 150 | 126.67 | 121.78 |
| Jul (next) | | **130.00** | **130.25** |

How the numbers are built:

- Moving average for April: (120 + 100 + 140) ÷ 3 = 120.00. For July: (110 + 130 + 150) ÷ 3 = 130.00.
- Smoothing for March: 0.3 × 100 + 0.7 × 120 = 114.00. For April: 0.3 × 140 + 0.7 × 114.00 = 121.80. For May: 0.3 × 110 + 0.7 × 121.80 = 118.26. For June: 0.3 × 130 + 0.7 × 118.26 = 121.78. For July: 0.3 × 150 + 0.7 × 121.78 = 130.25.
- A 3, 2, 1 weighted moving average for July: (3 × 150 + 2 × 130 + 1 × 110) ÷ 6 = 820 ÷ 6 = 136.67. It sits higher than the plain average because it leans on the strong June.

We score both methods on April to June, the three months where both have a forecast, below.

## Seasonality in brief

Many distribution items have a yearly pattern: heating parts in the fall, irrigation in the spring, school supplies in late summer. A moving average or simple smoothing will always be late on these, under-forecasting the ramp and over-forecasting the fall-off.

Seasonal methods add a seasonal index for each month (or week) on top of the level, and sometimes a trend. The Holt-Winters family, covered in FPP3 section 8.3, does this with additive indices (the season adds a fixed amount) or multiplicative indices (the season scales with volume). You need at least two full years of history to estimate an index with any confidence, and more is better. For items with short or patchy history, borrowing the seasonal profile of the product group is a common practical workaround.

## Intermittent and lumpy demand

A large share of a distributor's item-location combinations sell zero in most months and a few units in others. Averages on these items produce fractional forecasts (0.4 per month) that are never the actual demand in any single month.

Croston's method, described in FPP3 section 13.2, splits the history in two: the size of the non-zero demands and the gap between them. It smooths each separately and divides size by gap to get a demand rate. The authors note that it is biased and has no underlying statistical model, yet it is widely used because it behaves better than plain smoothing on sparse data.

For these items the stocking question often matters more than the forecast. Deciding whether to stock at all, hold one or two units or supply from a central warehouse usually saves more than a better forecast would. See [safety stock and reorder point](/distribution/safety-stock-reorder-point-eoq/) for how a forecast becomes a stocking level.

## Measuring forecast error

Always measure a forecast against what happened, one period at a time, and keep the history of errors. We define error as actual minus forecast, so a positive error means demand beat the forecast.

### MAE

**Mean absolute error (MAE):** `Average of |actual − forecast| across the periods`

MAE is in units, so it is easy to explain ("we are off by about 16 units a month") and feeds naturally into safety stock. It cannot be compared across items with very different volumes.

### MAPE

**Mean absolute percentage error (MAPE):** `Average of |actual − forecast| ÷ actual, × 100`

MAPE is unit-free, so it lets you compare items. It breaks on low-volume items. FPP3 section 5.8 points out that percentage errors are undefined when an actual is zero and explode when an actual is near zero. An item that sells 1 unit against a forecast of 2 shows a 100% error for being off by one unit, while a 100-unit miss on an item selling 5,000 shows 2%.

Averaged across a catalog full of slow movers, MAPE says more about the slow movers than about the forecast. The authors recommend scaled errors (MASE) for comparing across series. A simpler choice is a weighted MAPE, which divides the total absolute error by total actual demand across items.

### Bias

**Bias (mean error):** `Average of (actual − forecast) across the periods`

Bias keeps the sign. Positive and negative errors should roughly cancel over time. A bias that stays on one side means the method is systematically under- or over-forecasting, which is worse than a larger but unbiased error because it pushes stock in one direction every period.

### Scoring the worked example

The table below scores April to June from the worked example.

| Measure | 3-month moving average | Smoothing, α = 0.3 |
|---|---|---|
| Errors, Apr / May / Jun | −10.00 / 13.33 / 23.33 | −11.80 / 11.74 / 28.22 |
| MAE | 15.56 | 17.25 |
| MAPE | 11.63% | 12.86% |
| Bias | +8.89 | +9.39 |

On this short series the moving average did slightly better, and both carry a positive bias because demand rose from April to June and both methods lagged it. Three periods are far too few to choose a method. A real test would score 12 months or more, and a persistent positive bias like this would be a signal to try a method that follows trend, or a higher alpha.

## Putting it into practice

1. Forecast demand at item-location level, with stockout periods and one-time orders flagged or removed.
2. Start simple: a moving average or simple smoothing for steady items, a seasonal method only where two or more years show a clear pattern.
3. Treat intermittent items as a stocking decision first and a forecasting problem second.
4. Track MAE and bias by item, and use a weighted MAPE, not plain MAPE, for summaries across items.
5. Compare any new method against a naive forecast (last period's actual), as FPP3 section 5.2 recommends. If it cannot beat that, it is not worth the complexity.

Forecast error is the main input to safety stock, so better error measurement feeds directly into [safety stock and reorder points](/distribution/safety-stock-reorder-point-eoq/).

## Sources

- [Hyndman and Athanasopoulos, Forecasting: Principles and Practice, 3rd edition (OTexts, free online)](https://otexts.com/fpp3/)
- [FPP3 section 5.2, Some simple forecasting methods](https://otexts.com/fpp3/simple-methods.html)
- [FPP3 section 5.8, Evaluating point forecast accuracy](https://otexts.com/fpp3/accuracy.html)
- [FPP3 section 8.1, Simple exponential smoothing](https://otexts.com/fpp3/ses.html)
- [FPP3 section 8.3, Methods with seasonality](https://otexts.com/fpp3/holt-winters.html)
- [FPP3 section 13.2, Time series of counts (Croston's method)](https://otexts.com/fpp3/counts.html)
- [NIST/SEMATECH e-Handbook of Statistical Methods, 6.4.2 Moving average or smoothing techniques](https://www.itl.nist.gov/div898/handbook/pmc/section4/pmc42.htm)
- [NIST/SEMATECH e-Handbook of Statistical Methods, 6.4.3.1 Single exponential smoothing](https://www.itl.nist.gov/div898/handbook/pmc/section4/pmc431.htm)

---

Epicor, Prophet 21, P21 and DynaChange are trademarks or registered trademarks of Epicor Software Corporation registered in the United States and other countries. Kinetic is a trademark of Epicor Software Corporation. Lumina ERP is an independent consultancy and is not affiliated with, sponsored by or endorsed by Epicor.
