Sales forecast with moving averages
A moving average forecasts next Saturday with the average of the last 3 or 4 Saturdays; every week the group shifts one place. Apply it weekday by weekday and product by product, not to the whole week, because a bakery does not sell the same on Tuesday as on Saturday.
Updated: 2026-11-27
The steps
- 1. Pick a product and a weekday, for example the conchas of Saturdays.
- 2. Note the pieces sold each Saturday, from the oldest to the most recent.
- 3. Choose N: how many Saturdays you will average (3 or 4).
- 4. Simple moving average: add the last N Saturdays and divide by N.
- 5. Weighted moving average: multiply each Saturday by a weight (a number that gives it more or less importance), bigger for the most recent and with weights that add up to 1, and add the results.
- 6. When a new Saturday passes, the oldest drops out and the new one comes in: that is why it is called “moving”.
An example (invented numbers)
| Saturday | Sold | Average of 3 | Average of 4 | Weighted of 3 | Copy the previous |
|---|---|---|---|---|---|
| 1 | 180 | — | — | — | — |
| 2 | 190 | — | — | — | — |
| 3 | 175 | — | — | — | — |
| 4 | 200 | — | — | — | — |
| 5 | 210 | 188 | 186 | 191 | 200 |
| 6 | 195 | 195 | 194 | 200 | 210 |
| 7 | 220 | 202 | 195 | 201 | 195 |
| 8 | 204 | 208 | 206 | 211 | 220 |
| 9 (to be sold) | ? | 206 | 207 | 207 | 204 |
These are invented pieces. The weighted one uses the weights 0.2, 0.3 and 0.5 (the largest is for the most recent Saturday). For Saturday 9: the average of 3 is (195 + 220 + 204) over 3 = 619 over 3 = 206.3, which is 206 pieces; the one of 4 is (210 + 195 + 220 + 204) over 4 = 829 over 4 = 207.25, which is 207; the weighted one is 0.2 × 195 + 0.3 × 220 + 0.5 × 204 = 39 + 66 + 102 = 207.
| Method | How much it missed on Saturdays 5 to 8 | Average per Saturday |
|---|---|---|
| Average of 3 | 22 + 0 + 18 + 4 = 44 | 11 |
| Average of 4 | 24 + 1 + 25 + 2 = 52 | 13 |
| Weighted of 3 | 19 + 5 + 19 + 7 = 50 | 12.5 |
| Copy the previous Saturday | 10 + 15 + 25 + 16 = 66 | 16.5 |
Each error is the difference between the forecast and what sold, whether over or under. In these invented numbers copying the previous Saturday missed most and the average of 3 least, but they are only 4 Saturdays and the example's sales rise little by little: with your data it may come out differently, which is why you should do the same calculation with your history.
What N does and what to watch
- Small N (2 or 3): reacts quickly to a change, but an odd Saturday moves it a lot.
- Large N (5 or more): smooths the jumps, but is slow to notice that sales really changed.
- If sales rise little by little, the moving average stays a bit low; if they fall, it stays high.
- A Saturday on which the product ran out shows what you sold, not what you would have sold: note it or set it aside.
- Set the special dates (10 May, Day of the Dead) apart from your series of normal Saturdays.
How Hornada does it
Hornada forecasts each product for each day from the same weekday of recent weeks, with more weight on the recent ones, and learns the special dates from your own history (it needs at least a year of sales for that). The moving averages in this guide are what you can build yourself in a sheet. Hornada also shows how accurate the forecast has been, week by week.
Frequently asked questions
How many Saturdays do I need?
At least N, for the first average. To compare methods as in the example it pays to have 6 to 8, and even so it is few.
Moving average or copy last week?
Try both with your history: work out how much each missed in the last weeks and keep the one that missed least.
Can I average all the days together?
It does not pay: mixing days erases the pattern of the week. Average Mondays with Mondays, Saturdays with Saturdays.