How to calculate MAPE in Excel
Formula (Excel and Google Sheets)
=SUMPRODUCT(ABS((B2:B6-C2:C6)/B2:B6))/COUNT(B2:B6)Average the absolute errors as a share of the actuals: =SUMPRODUCT(ABS((B2:B6-C2:C6)/B2:B6))/COUNT(B2:B6).
- Result on the example
- 4.8% in
F1 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in F1. Change any input and the result updates, or edit the formula to experiment.
How it works
For each week, the error is divided by the actual: 28 units off on 480 is 5.8%. ABS makes over- and under-forecasts count the same, SUMPRODUCT adds the five percentages, and dividing by the count gives the average: the forecast is off by about 4.8% in a typical week.
=SUMPRODUCT(ABS((B2:B6-C2:C6)/B2:B6))/COUNT(B2:B6)Result0.04794974562
B2:B65 rows × 1 col: 480, 515, 390, 620, …A range: 5 cells in one column.
C2:C65 rows × 1 col: 452, 540, 410, 575, …A range: 5 cells in one column.
B2:B6-C2:C6{5 rows × 1 col} 28, -25, -20, 45, …The - operator subtracts.
B2:B6-C2:C6)/B2:B6{5 rows × 1 col} 0.05833333333, -0.04854368932, -0.05128205128, 0.07258064516, …The / operator divides.
ABS((B2:B6-C2:C6)/B2:B6){5 rows × 1 col} 0.05833333333, 0.04854368932, 0.05128205128, 0.07258064516, …ABS: Absolute value.- number
B2:B6-C2:C6)/B2:B6{5 rows × 1 col} 0.05833333333, -0.04854368932, -0.05128205128, 0.07258064516, …
- number
SUMPRODUCT(ABS((B2:B6-C2:C6)/B2:B6))0.2397487281SUMPRODUCT: Multiplies arrays row by row and adds the results.- array1
ABS((B2:B6-C2:C6)/B2:B6){5 rows × 1 col} 0.05833333333, 0.04854368932, 0.05128205128, 0.07258064516, …
- array1
COUNT(B2:B6)5COUNT: Counts cells that contain numbers.- value1
B2:B65 rows × 1 col: 480, 515, 390, 620, …
- value1
SUMPRODUCT(ABS((B2:B6-C2:C6)/B2:B6))/COUNT(B2:B6)0.04794974562The / operator divides.
In Google Sheets
The same formula works in Google Sheets: =SUMPRODUCT(ABS((B2:B6-C2:C6)/B2:B6))/COUNT(B2:B6). We ran it in Google Sheets mode on the same data and it returns 4.8%.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =AVERAGE(ABS((B2:B6-C2:C6)/B2:B6))Excel only | 4.8% | Excel 365 averages the array directly. Older versions need Ctrl+Shift+Enter; Google Sheets needs ARRAYFORMULA. |
Common mistakes
- A week with 0 actual units makes the whole formula #DIV/0!. MAPE doesn't work with zeros; leave those weeks out or use weighted MAPE.
- Divide by the actual, not the forecast. Dividing by the forecast gives a different, less standard number.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Calculate MAPE
F1, calculate the mean absolute percentage error of the forecasts against the actual units.Questions
How do I calculate weighted MAPE (WAPE)?
Divide the total absolute error by the total actual: =SUMPRODUCT(ABS(B2:B6-C2:C6))/SUM(B2:B6).
How do I show forecast accuracy instead?
Use =1-MAPE, here about 95.2%.
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.