acalculator

What is the MAPE?

Enter your actual values and your forecasts for the same periods to see how far off the forecasts were. The calculator gives the mean absolute percentage error (MAPE), the mean absolute error (MAE), the root mean squared error (RMSE) and the error of every period.

Your numbers

Read as: 100; 200; 150; 250
Read as: 110; 190; 165; 225
MAPE
8.75%

The forecasts have a MAPE of 8.75%, with an MAE of 15 and an RMSE of 16.201852.

MAE (mean absolute error)
15
RMSE (root mean squared error)
16.201852
Periods
4

MAPE: 8.75%. The forecasts have a MAPE of 8.75%, with an MAE of 15 and an RMSE of 16.201852.

Actual and forecast by period

Every period

How to calculate

Computes the mean absolute percentage error (MAPE) of a forecast from lists of actual and forecast values, with the mean absolute error (MAE), the root mean squared error (RMSE) and the error of each period.

Example with the default inputs (Actual values [100, 200, 150, 250], Forecast values [110, 190, 165, 225]): The forecasts have a MAPE of 8.75%, with an MAE of 15 and an RMSE of 16.201852.

Method: e = actual − forecast; p = 100 × e ÷ actual; MAPE = mean of |p|; MAE = mean of |e|; RMSE = √(mean of e²), over all periods.

  • The two lists are in the same order: the nth forecast is for the nth actual value.
  • No actual value is 0; a percentage error divides by it.
  • Every period counts equally.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Actual values 100, 200, 150, 250, Forecast values 110, 190, 165, 225 gives MAPE 8.75%, MAE (mean absolute error) 15, RMSE (root mean squared error) 16.201852, Periods 4.Source: Hyndman, R.J., & Athanasopoulos, G. (2021) Forecasting: principles and practice, 3rd edition, OTexts, §5.8 Evaluating point forecast accuracy (e = y − ŷ; p = 100e ÷ y; MAPE = mean(|p|); MAE = mean(|e|); RMSE = √mean(e²)). https://otexts.com/fpp3/accuracy.html
  2. Actual values 10, 20, 30, Forecast values 10, 20, 30 gives MAPE 0%, MAE (mean absolute error) 0, RMSE (root mean squared error) 0.Source: Hyndman, R.J., & Athanasopoulos, G. (2021) Forecasting: principles and practice, 3rd edition, OTexts, §5.8 Evaluating point forecast accuracy (e = y − ŷ; p = 100e ÷ y; MAPE = mean(|p|); MAE = mean(|e|); RMSE = √mean(e²)). https://otexts.com/fpp3/accuracy.html
  3. Actual values -50, 100, Forecast values -40, 90 gives MAPE 15%, MAE (mean absolute error) 10, RMSE (root mean squared error) 10.Source: Hyndman, R.J., & Athanasopoulos, G. (2021) Forecasting: principles and practice, 3rd edition, OTexts, §5.8 Evaluating point forecast accuracy (e = y − ŷ; p = 100e ÷ y; MAPE = mean(|p|); MAE = mean(|e|); RMSE = √mean(e²)). https://otexts.com/fpp3/accuracy.html
  4. Actual values 0.5, 0.25, Forecast values 0.4, 0.3 gives MAPE 20%, MAE (mean absolute error) 0.075, RMSE (root mean squared error) 0.079057.Source: Hyndman, R.J., & Athanasopoulos, G. (2021) Forecasting: principles and practice, 3rd edition, OTexts, §5.8 Evaluating point forecast accuracy (e = y − ŷ; p = 100e ÷ y; MAPE = mean(|p|); MAE = mean(|e|); RMSE = √mean(e²)). https://otexts.com/fpp3/accuracy.html

How it works

With an actual value y and a forecast ŷ for each of n periods:

  • Error e = y − ŷ
  • Percentage error p = 100 × e ÷ y, and the absolute percentage error is |p| = |e| ÷ |y| × 100
  • MAPE = the mean of |p| over the n periods
  • MAE = the mean of |e|
  • RMSE = √(the mean of e²)

The table shows y, ŷ, e and |p| for each period, and the chart draws the actual and forecast values by period.

Rules:

  • Enter 1 to 1,000 actual values and the same number of forecasts, in the same order. Different counts give no answer.
  • No actual value may be 0, because its percentage error would divide by 0. A negative actual value counts by its size, |y|.
  • A result too large or too small to show as a number gives no answer.
  • The arithmetic is exact on the decimals you type, except the square root in the RMSE. The MAPE and each percentage error show to 2 decimals.

Assumptions

  • Every period counts equally in the means.
  • The actual values have a true zero, as sales and demand do. For a scale with an arbitrary zero, such as temperature in °C or °F, percentage errors have no fixed meaning.

Worked examples by hand

Four periods. Actual values 100, 200, 150 and 250; forecasts 110, 190, 165 and 225. Errors e = −10, 10, −15 and 25. Absolute percentage errors = 10 ÷ 100 × 100 = 10%, 10 ÷ 200 × 100 = 5%, 15 ÷ 150 × 100 = 10% and 25 ÷ 250 × 100 = 10%. MAPE = (10 + 5 + 10 + 10) ÷ 4 = 8.75%. MAE = (10 + 10 + 15 + 25) ÷ 4 = 15. RMSE = √((100 + 100 + 225 + 625) ÷ 4) = √262.5 = 16.2018…, shown as 16.201852.

A perfect forecast. Actual 10, 20, 30 and forecasts 10, 20, 30: every error is 0, so MAPE, MAE and RMSE are all 0.

A negative actual value. Actual −50 and 100, forecasts −40 and 90. Errors −10 and 10. Absolute percentage errors = 10 ÷ 50 × 100 = 20% and 10 ÷ 100 × 100 = 10%, so MAPE = 15%. MAE = 10 and RMSE = 10.

Decimals. Actual 0.5 and 0.25, forecasts 0.4 and 0.3. Errors 0.1 and −0.05. Absolute percentage errors = 0.1 ÷ 0.5 × 100 = 20% and 0.05 ÷ 0.25 × 100 = 20%, so MAPE = 20%. MAE = 0.075, and RMSE = √((0.01 + 0.0025) ÷ 2) = √0.00625 = 0.0790569…, shown as 0.079057.

Other questions people ask

What is MAPE?

MAPE, the mean absolute percentage error, measures how far forecasts are from what actually happened, as a percent of the actual values. A MAPE of 8.75% means the forecasts missed by 8.75% of the actual value on average.

How do I calculate MAPE?

For each period, subtract the forecast from the actual value, divide by the actual value, multiply by 100 and drop the sign. Then take the mean of these percentage errors. Actual 100 against a forecast of 110 is a 10% error; actual 200 against 190 is 5%.

Why can't an actual value be 0?

MAPE divides each error by its actual value, and dividing by 0 has no answer. Actual values close to 0 also give very large percentage errors, so MAPE suits data that stays well away from 0, such as sales or demand.

Does MAPE treat over- and under-forecasts the same?

Not quite. For the same pair of numbers, a forecast that is too high gets a larger percentage error than one that is too low: actual 100 and forecast 150 is a 50% error, but actual 150 and forecast 100 is 33.33%, because the error is divided by the actual value.

What is the difference between MAPE, MAE and RMSE?

MAPE is a percent, so it compares forecasts of things measured in different units. MAE is the average size of the errors in the units of the data. RMSE squares the errors before averaging, so large misses count more; it is always at least as large as MAE.

What is a good MAPE?

Lower is better, and 0% means every forecast was exact. What counts as good depends on how hard the series is to forecast, so compare the MAPE of different forecasting methods on the same data.