How to Do Demand Forecasting in E-Commerce?
Demand forecasting is the effort to predict how much of which product can be sold in the coming period, based on past sales and market movements. Its purpose is not to find an exact figure, but to make inventory, cash and advertising decisions with less risk.
Why is forecasting necessary?
There are two costly mistakes in e-commerce: running out of stock and being left with unsold goods. The first costs you sales and ranking; the second locks up cash and forces you to erode it with discounts at the end of the season.
The job of demand forecasting is to find the middle ground between these two mistakes. There is no such thing as a perfect forecast; the goal is to keep the cost of error at a manageable level.
Which data is used?
The core input is your own historical sales data: weekly unit counts by product, campaign periods, and the days you were out of stock. Out-of-stock days must always be marked; otherwise you will measure demand lower than it is.
The second layer is the market side: movement in category ranking, competitor price changes and rises in search interest. Your own data shows what has happened; market data shows where it is heading.
How to do it step by step?
1. Clean up the history
Mark days out of stock, one-off bulk orders and unusual campaign days. Uncleaned data produces a wrong baseline.
2. Separate out seasonality
Pull out annually recurring periods as a separate layer; place the trend on top of it.
3. Account for lead time
Your forecast horizon cannot be shorter than your lead time. For a product that arrives in three weeks, a one-week forecast is useless.
4. Set safety stock
Forecasts carry an error margin. For critical products, holding safety stock equal to a certain percentage of demand is cheaper than running out of stock.
5. Compare the forecast with actuals
Measure the deviation at the end of every period. A forecast that is not measured does not improve over time.
Forecast inputs and what they tell you
| Input | What it shows | Caution |
|---|---|---|
| Historical unit sales | Baseline demand level | Out-of-stock days hide demand |
| Seasonality | Recurring periods | At least two years of data is required |
| Category ranking | Direction of the market | Affected by personalization |
| Competitor price movement | Competitive pressure | Tell apart whether it is lasting or a campaign |
| Advertising spend | Artificial demand increase | The baseline drops when advertising stops |
Common mistakes
1. Not clearing out days with no stock. If you measure demand lower than it really is, you will run out of stock again.
2. Treating campaign sales as normal. Sales on a campaign day are not baseline demand.
3. Skipping supplier lead time. An accurate forecast becomes useless if the order arrives late.
4. Producing only one scenario. Without optimistic and pessimistic scenarios, risk cannot be managed.
Limitations: what does it not cover?
Applying these with awareness lets you set realistic expectations:
A forecast is not a guarantee. It is a probability generated from past data, and it changes with off-season events and algorithm updates.
A new product has no baseline. For a product with no sales history, the forecast relies on comparison with similar products, and the margin of error is high.
Competitors' plans cannot be known. A rival's campaign or stock decisions are not visible from outside; they can change the picture with a single move.
Ad impact must be separated out. Demand that rises with ads falls back once the ads are stopped; do not mistake it for baseline demand.
Frequently asked questions
What is demand forecasting in e-commerce?
It is the effort to predict how much of which product can be sold in the coming period, based on past sales and market movements.
How much historical data is needed?
Ideally, at least two years of data are needed to see seasonality. With shorter data, only a short-term trend can be read.
What should I do with the days I was out of stock?
Be sure to mark them and remove them from the forecast base. Otherwise you will measure demand lower than it is.
Can a forecast be made for a new product?
To a limited extent. The history of similar products and category movement are used; since the margin of error is high, it makes sense to keep the first order small.
What should I do if the forecast is wrong?
Measure the deviation and record its cause. A forecast is a process that improves as its errors are measured.
Doing it with the tool
Hermes's Category-Based Demand Forecast feature produces a category-level probability indicator from accumulated price and ranking data. This is not a guarantee; it is an input for decisions.
You can check the profitability side of your forecast with ProfitPulse; the best-selling product is not always the most profitable one.
Last updated: September 10, 2026