AI Glossary / Statistics and probability / Intermediate

Mean absolute percentage error

Definition

Mean absolute percentage error, or MAPE, averages the absolute prediction error relative to each observation's actual value. In its usual percentage form, MAPE = (100/n)*sum |(y[i]-y-hat[i])/y[i]|, provided every actual value is nonzero. It is a scale-free error summary most naturally interpreted for positive quantities with a meaningful zero.

What it means

MAPE expresses each miss as a fraction of the corresponding observed amount before averaging. A ten-unit error is ten percent of an actual value of 100, but one hundred percent of an actual value of 10.
That can make results easy to communicate, yet it also gives small actual values substantial influence. A low-volume item can dominate the score even when its absolute error is modest. The percentage format does not automatically make the metric suitable for every forecasting problem.

How it works

Match predictions with actual values for the intended cases and forecast horizons. Compute the absolute error for each case, divide by the absolute actual value, and average. Multiply by 100 if reporting percentages.
Check the reporting convention. Some libraries return the relative fraction rather than the percentage: a result of 0.25 then means 25%. Scikit-learn uses this fractional convention. A result above one is possible and corresponds to an error above 100%.
Inspect actual values before calculation. If an actual value is zero, the ordinary ratio is undefined, including the zero-over-zero case. Near-zero actuals can produce very large values even for small absolute errors.
Software may replace a zero denominator with a small numerical constant. That avoids an infinite computer result but changes the calculation and can produce an enormous finite number. It does not resolve whether a percentage error is meaningful for the application.
Do not silently remove zero cases or add an arbitrary constant. Removing them changes the evaluation population; adding a constant changes the relative weighting and can change model rankings. If a modified metric is used, name and justify it explicitly.
MAPE requires a meaningful ratio scale for its usual interpretation. Temperature measured in Celsius has an arbitrary zero, so changing to Fahrenheit would change percentage errors without changing the physical predictions. A unit-free formula is not necessarily independent of the measurement scale's origin.
For strictly positive actuals, minimizing MAPE is equivalent on a fixed dataset to minimizing absolute errors weighted by the inverse actual values. This differs from minimizing unweighted MAE and helps explain why models selected by the two criteria can behave differently.
The metric is symmetric for equal-sized overprediction and underprediction around a fixed nonzero actual value. However, it is not symmetric when actual and predicted values are exchanged. With nonnegative predictions and positive actuals, underprediction is bounded at 100%, while overprediction is unbounded.
Compare it with other error summaries. The average of individual percentage errors is not generally the ratio of total absolute error to total actual volume. These aggregations answer different questions and emphasize different cases.
Finally, evaluate on suitable held-out data and report the prevalence of zero or very small actuals. For intermittent demand, arbitrary-zero scales, or outcomes crossing zero, an original-unit or appropriately scaled alternative may better represent forecast performance.

Three practical examples

  • A team evaluates forecasts of consistently positive sales volumes and reports the percentage convention used.
  • An analyst investigates whether low-volume items dominate a portfolio's average percentage error.
  • An AI forecasting project compares MAPE with MAE and a suitable scaled baseline metric before choosing an evaluation criterion.

Think of it this way

Think of measuring every error with a ruler whose length equals that case's actual amount. The same physical miss looks much larger when the ruler is short. If the ruler has zero length, the ordinary percentage comparison cannot be made.

Worked example

An original example has actual values 100 and 10, with predictions 110 and 20. Both absolute errors are 10 units.
Their absolute percentage errors are 100*10/100 = 10% and 100*10/10 = 100%. MAPE is therefore (10%+100%)/2 = 55%. A library returning fractions would report 0.55.
The ratio of total absolute error to total actual volume is instead 100*(10+10)/(100+10), approximately 18.18%. This is a different aggregation, not another way to obtain the same MAPE.
For a near-zero illustration, an actual value of 0.1 and prediction of 1 gives 100*0.9/0.1 = 900%. If the actual value were exactly zero, the ordinary MAPE term would be undefined.
Finally, predicting 20 when the actual is 10 gives 100% error, whereas predicting 10 when the actual is 20 gives 50%. Exchanging prediction and actual changes the denominator and therefore changes the score.

Illustrative case study

In a fictional case, Birch Forecasting reports a sharp deterioration in MAPE after adding rarely purchased products. Managers initially assume the model has become much worse everywhere.
Analysts inspect the item-level errors and find that many new products have zero or near-zero observed demand. They document those cases, retain absolute-error summaries, and select a separate scaled evaluation appropriate to the forecast task. The case illustrates a metric-domain problem; it does not imply that removing difficult products or changing metrics automatically improves the forecasts.

Common misconceptions and mistakes

Do not assume MAPE is bounded by 100%, that 0.2 always means 0.2%, or that software handling of zero values makes the ordinary formula valid.
Do not confuse MAPE with mean percentage error, which retains signs and can cancel errors. Do not equate it with a total-volume-weighted percentage measure or assume the word symmetric in another metric's name resolves every denominator problem.

Business use

MAPE can communicate relative forecast error when the outcomes are positive, sufficiently far from zero, and measured on a meaningful ratio scale. Its weighting may be unsuitable when high-volume errors carry most operational cost. Report enough context to show whether the metric matches the business objective rather than choosing it solely because percentages look familiar.

People also ask

Can MAPE exceed 100%?

Yes; overpredictions can produce arbitrarily large relative errors.

What if an actual value is zero?

The ordinary term is undefined. Any exclusion or denominator adjustment needs an explicit alternative definition and interpretation.

Check your understanding

Why is MAPE 55% when both example errors are ten units?

Answer: Each error is divided by its own actual value. The ten-unit miss on the smaller actual receives much greater relative weight.

Related terms

  • Mean Absolute Error
  • Mean Percentage Error
  • Ratio scale
  • Weighted absolute percentage error
  • Mean absolute scaled error
  • Forecast evaluation

Learn next

Next, compare percentage, original-unit, and scaled errors on data with low volumes and zeros. Decide which aggregation reflects the operational costs and document that choice before comparing models.

More in Statistics and probability

  • MCA - MCA means measurement capability assessment, also called measurement capability analysis, in the supplied NIST statistical glossary.
  • Mean - The mean, usually meaning the arithmetic mean, is the sum of a set of numerical values divided by the number of values.
  • Mean absolute deviation (m.a.d.) - Mean absolute deviation is the average absolute distance of observations from a specified center.
  • Mean average precision - Mean average precision, often written MAP or mAP, is an average of average-precision scores over evaluation units such as search queries or object categories.
  • Mean directional accuracy - Mean directional accuracy, or MDA, is the proportion of evaluated forecasts that correctly predict the direction of a specified change.
  • Mean opinion score - A mean opinion score, or MOS, is an average of ratings assigned on a predefined opinion scale in a quality-evaluation study.

Sources

Scikit-learn, mean_absolute_percentage_error: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.mean_absolute_percentage_error.html Scikit-learn, model evaluation, MAPE: https://scikit-learn.org/stable/modules/model_evaluation.html#mean-absolute-percentage-error Hyndman and Athanasopoulos, Forecasting: Principles and Practice, percentage errors: https://otexts.com/fpp3/toolbox.html

Previous: Mean Absolute Error Next: Mean average precision

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer