← Commerce courseCOMMERCE FROM ZERO · MODULE 4 · 18 min READ · FULL COURSE

Forecasting

Guessing what customers will buy, and how to know if your guess was any good

About access

Buyers receive the course-start link after checkout. This lesson link is unlisted, not account-based access control; anyone with the direct link can open it.

1. The story: a store that remembered last spring

In spring 2021, people had cash, stayed home, and spent on patio furniture, home-office gear and things for kids learning from home. Big retailers placed orders months ahead for the summer of 2022 on the assumption that demand would stick. University of Maryland retail professor Jie Zhang put it this way about Target: "They made their predictions around this time last year when there was surging demand. They thought that demand would stick. Unfortunately for them, it didn't." By summer, spending had shifted from goods to services and travel, and shoppers were buying dressier clothes for the office instead of leisure wear. Target ended up cutting prices to clear patio furniture and household appliances. [Sourced: Univ. of Maryland Smith School; Supply Chain Dive]

Target was not alone. Bloomberg reported on May 28, 2022 that inventories at large consumer companies in the S&P indexes (market value of at least $1 billion, among those that had just reported earnings) had risen $44.8 billion, up 26% from a year earlier. Walmart paid more for storage, and Target and Gap cut prices on key goods. [Sourced: Bloomberg, May 28 2022]

Nothing in those stores was broken. The forecast was a good guess about a world that had already changed.

2. The one idea

A forecast is a best guess with a number on it. It is never right. It is useful when you know how wrong it usually is, and in which direction.

A forecast answers one question: "How many of this item will we sell, in this place, in this period?" The plan, the order, the truck and the cash all follow from that number. [General]

3. The kitchen-table version

You are hosting a party and you guess the number of guests.

  • You count the invitations and the yeses (the data).
  • You remember that last time half the "maybes" came (the pattern).
  • It is also your cousin's birthday weekend, so more may drop in (an outside event).
  • You buy food for about 22 people and a little extra for surprises (the buffer).

If 30 come, you ran out. If 12 come, you eat leftovers for a week. Either way you can ask, "Did I guess too high or too low, and by how much?" That is forecast accuracy.

4. What goes into a forecast

Most retail forecasts combine the same ingredients. [General; the factor list also appears in your planning deck, reworded]

IngredientPlain meaningExample for our $12 water bottle
TrendIs it going up or down over time?Reusable bottles keep gaining ground
SeasonalityDoes it repeat each year?Summer sells more than winter
PromotionsDid we run a sale?A two-week 20% off event
PriceDid the price change?Competitor drops to $10
Outside eventsWeather, holidays, newsA heatwave, a marathon, back to school
New or ending itemsNo history, or history that stopsLaunching a new colour

Where do the numbers live? Planners forecast at a chosen level of detail, such as one SKU in one store for one week, or a whole category for a whole region. Finer detail is harder because each number is small and noisy. [General; this "SKU, store, week" level is in your planning deck, reworded]

5. How wrong is wrong? Measuring a forecast

Five weeks of bottle sales at one store. [Illustrative]

WeekActual soldForecastError (forecast minus actual)
1100110+10
2120110-10
390100+10
4110100-10
580100+20
Total500+20

Three simple scores:

  • MAE (average miss in units): add the sizes of the misses ignoring plus or minus: 10 + 10 + 10 + 10 + 20 = 60, divided by 5 weeks = 12 bottles.
  • WAPE (total miss as a share of sales): 60 / 500 = 12%. Practitioners often prefer it for groups of items because big sellers count for more. [Sourced: Inventory Controller]
  • Bias (do we lean one way?): net error = +20, which is +20 / 500 = +4%. Positive means we over-forecast. Four of five weeks were over or equal, and the pattern of leaning high is what leads to a pile of unsold stock.

One more you will hear, MAPE, is the average of each week's percentage miss. Here it is about 12.7%, a bit higher than WAPE because week 5 was a small month. MAPE breaks down when actual sales are zero. [Sourced: Inventory Controller on WAPE and MAPE; computed ourselves]

The rule of thumb: pair a size-of-error score (WAPE or MAE) with bias. One tells you how big the misses are, the other tells you whether they lean one way. [Sourced: Inventory Controller]

6. Why forecasts go wrong (and the famous example)

  1. The world changes (Target, above).
  2. Everyone reacts and the swings grow. In the years before a 1997 study, logistics executives at P&G looked at Pampers. Babies used diapers at a steady rate and store sales varied only a little, but distributors' orders swung more, and P&G's own orders for materials from suppliers swung even more. The researchers who studied this named it the bullwhip effect: small wobbles at the shelf become big swings upstream. [Sourced: MIT Sloan Management Review, Lee, Padmanabhan, Whang; Management Science 1997]
  3. Too little history. New items have no past to learn from.
  4. Noise. One store selling 3 units a week can show 0 or 7 by luck.

The cure for the bullwhip is better information shared along the chain, which is why Module 3 on how data flows comes before this one in a sensible reading order.

Watch out: slow sellers. If a store sells 0, 0, 3, 0, 1 units a week, percentage-error scores like MAPE break (you cannot divide by zero) and averaging methods mislead. Specialists use methods built for "intermittent" demand, such as Croston's method, and error measures designed for it. [Sourced: Hyndman on Croston; Lancaster paper excerpt]

7. A short history of forecasting

Each era shortened the time between "customer did something" and "business knew."

EraWhat the retailer usedWhat improved
Village shopMemory of the shopkeeperInstant but tiny
Department store and catalog eraLedgers, buyer judgmentSeason-by-season planning
1974 onwardBarcode scans [Module 1]Counted sales by item for the first time
1970s to 1990sComputers linking stores and warehouses. Walmart's SupplyChainDigest timeline: first distribution center 1970, IBM system tying store and DC inventories in 1975 [Sourced]Same-week visibility
1997Walmart's Retail Link gave suppliers store-by-store, product-by-product, day-by-day sales [Sourced: Talk Business, 1997]Suppliers see real sales, not just orders
2020 onwardMachine learning models. The M5 forecasting competition used 42,840 time series of unit sales from Walmart. A later paper in the same journal says M5 gave strong evidence that machine learning methods can outperform statistical ones [Sourced: International Journal of Forecasting; UEA paper excerpt]Models learn from thousands of series at once

8. The next few weeks: what vendors call "demand sensing"

A short story first. In 2004, Hurricane Frances was heading for Florida. At Wal-Mart's headquarters, chief information officer Linda Dillman pushed her team to forecast what stores would need using what had happened when Hurricane Charley hit weeks earlier. "We didn't know in the past that strawberry Pop-Tarts increase in sales, like seven times their normal sales rate, ahead of a hurricane," she said, and the top pre-hurricane item was beer. Trucks of both headed for stores in the storm's path, and most of what was stocked for the storm sold quickly, the company said. [Sourced: New York Times, Nov 14, 2004; the 7x is her statement, not audited data]

What the term means. Vendors such as Infor describe demand sensing as turning live signals (orders, shipments, outside data) into short-term, continuously updated forecasts, and say it adds a layer on top of forecasting rather than replacing it. SAP describes automated daily forecasts for roughly 4 to 8 weeks ahead. [Sourced: Infor, SAP]

Is it a real discipline? Our honest read [Our view, from the evidence below]. It is real as an idea and thin as a separate field.

  • The idea, using fresh sales and outside signals to correct the near-term forecast, is old. Wal-Mart was giving suppliers day-by-day store sales in 1997. [Sourced: Talk Business 1997]
  • The evidence that fresher data always helps is mixed. A Journal of Operations Management study using daily data from a large consumer-products supply chain found that point-of-sale data improved forecast accuracy for demand planning but not for order-fulfillment planning, and says its findings challenge consulting-firm claims. [Sourced: Journal of Operations Management, 2019, abstract]
  • Critics call the term vague. Lokad's founder says it lacks a clear concept and peer-reviewed novelty ([Sourced: Lokad interview summary, 2020]), and Brightwork Research argues that demand sensing is promoted by vendors as a way to improve forecasts ([Sourced: Brightwork, 2012, excerpt]). Both are commentators with their own commercial or advisory interests, so weigh them accordingly.
  • SAP's own author notes the term means different things depending on context. [Sourced: SAP community blog]

Practical rule. Treat "demand sensing" as short-horizon forecasting with fresher inputs. If a vendor uses the term, ask three questions: which signals, which horizon (days or weeks), and how much accuracy improvement was shown, against what baseline?

A simple example of the idea. Plan: 100 bottles a day. A heatwave starts and the last three days sell 130, 140, 150 (average 140). Blending half plan and half recent average gives 0.5 x 100 + 0.5 x 140 = 120 a day. Lean toward fresh evidence, but not all the way. [Illustrative; the 50/50 rule is a teaching device of ours]

Where the idea matters most: items with promotions, weather swings and short shelf lives. It matters least for steady staples. [Our view]

9. What AI changes, and what it does not

[Mostly Sourced, with our view labelled]

  • McKinsey reports that AI-driven forecasting can reduce errors by 20 to 50 percent and cut lost sales from unavailable products by up to 65 percent. These are best cases. [Sourced: McKinsey]
  • Gartner (Sept 24, 2026) predicts that by 2030 only 5 percent of organisations using planning automation will make at least 10 percent of their planning decisions autonomously. [Sourced: Gartner] So expect AI as an assistant in this decade more than an autopilot.
  • AI helps with scale (millions of SKU-store-week numbers) and with signals people cannot read at that volume. It does not fix a changed world. Someone still has to ask, "Is demand still like last year?" [Our view]
  • Good practice is to let people override a forecast and record why. McKinsey's own forecasting article recommends interactive tools where users can set new scenarios. [Sourced: McKinsey, paraphrased]

10. Try it yourself (no code, 20 minutes)

  1. Pick something you buy weekly. Write down what you used each of the last 5 weeks.
  2. Make a "forecast" using last week's number. Then make one using the average of the 5 weeks.
  3. Compute the miss for each week and the average miss (MAE). Which method was closer?
  4. Compute bias: did you lean high or low?
  5. Name one outside event that would break your forecast next week.

11. Self-check

  1. What does bias tell you that average miss does not? Whether forecasts lean consistently high or low.
  2. Forecast 110, actual 100, then forecast 90, actual 100. Net bias? Zero, since +10 and -10 cancel. The misses still average 10.
  3. What is the bullwhip effect? Small changes in shelf demand turn into larger swings in orders as you go up the supply chain.
  4. Why did Target end up with too much patio furniture in 2022? It ordered months ahead on 2021 demand, and demand shifted.
  5. What is a fair way to describe "demand sensing"? Short-horizon forecasting with fresher inputs; ask which signals, which horizon, and what accuracy gain against what baseline.
  6. Why does Gartner's 5% prediction matter for your plans? Expect AI to assist planners this decade rather than replace them.

Sources

Added sources (sensing section)

CURIOUS? TEST THE CLUES

Curiosity check

Pick an answer and see why. No scores, no pressure. All shop examples are invented practice scenarios.

01 What does bias tell you that average miss does not?
02 Forecast 110, actual 100, then forecast 90, actual 100. Net bias?