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 , all nonzero, and corresponding forecasts , the MAPE is the arithmetic mean of the absolute relative errors , multiplied by 100%. It is undefined if any . It is scale-free, so you can compare it across data sets measured in different units.
Key Formula
Where:
- = Number of periods or observations being forecast
- = Actual (observed) value in period t; must be nonzero
- = Forecast (predicted) value for period 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.
Step 2: Add the four absolute relative errors.
Step 3: Divide by the number of weeks. Then multiply by 100% to get a percentage.
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.
