Skip to content
Calcrivo

Mean Absolute Percentage Error (MAPE) Calculator

Calculate Mean Absolute Percentage Error (MAPE) between actual and predicted values.

Inputs

Comma-separated actual (true) non-zero values.

Comma-separated predicted values, same order and count as actual.

MAPE

7.29%

Valid Samples (y ≠ 0)

4

Step by step

  1. Sum of absolute percentage errors: Σ|(y_i − ŷ_i)/y_i|

    |(100 − 110) / 100| + |(200 − 190) / 200| + |(300 − 320) / 300| + |(400 − 370) / 400|

    = 0.2917

  2. MAPE: (100 / n) × sum of absolute percentage errors

    (100 ÷ 4) × 0.2917

    = 7.29%

How it works

Mean Absolute Percentage Error (MAPE) expresses prediction error as a percentage of the actual value: MAPE = (100/n) × Σ|(y_i − ŷ_i)/y_i|. Because it's scale-independent, MAPE is popular for comparing forecast accuracy across series with very different magnitudes (e.g. comparing demand forecasts for a $10 product and a $10,000 product on the same scale). Its major limitation is that it's undefined when actual values are zero and becomes extremely large (and asymmetric) for actual values near zero, so it should be avoided when the target can be zero or close to it.

Formula

MAPE = (100 / n) * sum(|(y_i - y_hat_i) / y_i|)

n
Number of valid samples (y ≠ 0)
y_i
Actual value for sample i
\hat{y}_i
Predicted value for sample i

Frequently Asked Questions

Why is MAPE undefined when actual values are zero?

MAPE divides by the actual value for each term, so a zero actual value causes division by zero; this calculator skips those data points and computes MAPE only over the remaining valid samples.

Why is MAPE considered asymmetric?

MAPE penalizes over-predictions and under-predictions differently in percentage terms — since the percentage error is capped at 100% for under-predictions (predicting 0 when actual is 100) but unbounded for over-predictions (predicting 1000 when actual is 100), it can bias model selection toward under-forecasting.

When should I use sMAPE instead of MAPE?

sMAPE (symmetric MAPE) is preferred when you want a percentage-based error metric that treats over- and under-predictions symmetrically, and it's better behaved when actual values are close to zero.

You might also need