Mathwords logoMathwords

Mean Absolute Percentage Error — Definition, Formula & Example

Mean absolute percentage error (MAPE) is the average size of a model's forecast errors, with each error measured as a percentage of the actual value. A MAPE of 10% means that, on average, your forecasts miss by 10% of what actually happened.

For actual values A1,…,AnA_1, \dots, A_n, all nonzero, and corresponding forecasts F1,…,FnF_1, \dots, F_n, the MAPE is the arithmetic mean of the absolute relative errors ∣At−FtAt∣\left|\frac{A_t - F_t}{A_t}\right|, multiplied by 100%. It is undefined if any At=0A_t = 0. It is scale-free, so you can compare it across data sets measured in different units.

Key Formula

MAPE=100%n∑t=1n∣At−FtAt∣\text{MAPE} = \frac{100\%}{n} \sum_{t=1}^{n} \left| \frac{A_t - F_t}{A_t} \right|
Where:
  • nn = Number of periods or observations being forecast
  • AtA_t = Actual (observed) value in period t; must be nonzero
  • FtF_t = Forecast (predicted) value for period t
  • At−FtA_t - F_t = Forecast error, or residual, for period t

Worked Example

Problem: An ice cream shop forecasts its weekly sales. Over 4 weeks, actual sales were 100, 200, 250, and 400 gallons. The forecasts were 90, 210, 200, and 420 gallons. Find the MAPE.
Step 1: Find each week's absolute error as a fraction of the actual value. Weeks 1 and 2 both miss by 10 gallons, but that miss counts twice as much in week 1 because actual sales were smaller.
∣100−90∣100=0.10,∣200−210∣200=0.05,∣250−200∣250=0.20,∣400−420∣400=0.05\frac{|100-90|}{100} = 0.10, \quad \frac{|200-210|}{200} = 0.05, \quad \frac{|250-200|}{250} = 0.20, \quad \frac{|400-420|}{400} = 0.05
Step 2: Add the four absolute relative errors.
0.10+0.05+0.20+0.05=0.400.10 + 0.05 + 0.20 + 0.05 = 0.40
Step 3: Divide by the number of weeks. Then multiply by 100% to get a percentage.
MAPE=0.404×100%=0.10×100%=10%\text{MAPE} = \frac{0.40}{4} \times 100\% = 0.10 \times 100\% = 10\%
Answer: The MAPE is 10%. On average, the shop's weekly forecasts missed actual sales by 10% of the actual amount.

Why It Matters

MAPE is a standard accuracy measure in business forecasting and supply-chain demand planning. Because it is unit-free, a planner can compare forecast quality for a product selling 50 units a week and one selling 50,000. It has limits. It breaks down when actual values are zero or near zero. Also, for nonnegative forecasts, an under-forecast can never miss by more than 100%, but an over-forecast has no such cap.

Common Mistakes

Mistake: Averaging the signed percentage errors instead of the absolute ones. In the example, this gives (0.10 − 0.05 + 0.20 − 0.05) / 4 = 5%.
Correction: Over-forecasts and under-forecasts cancel when you keep the signs, so the forecast looks better than it is. Take the absolute value of every error before averaging. The signed version is a different measure, the mean percentage error, which shows bias rather than accuracy.

Related Terms