Mean Percentage Error (MPE) Calculator
Calculate the accuracy of your forecasts in Excel with this interactive tool
Calculation Results
The Mean Percentage Error of your forecast
Interpretation
Your MPE will appear here after calculation.
Excel Formula
To calculate MPE in Excel, use:
=AVERAGE((Actual-Forecast)/ABS(Actual))*100
Complete Guide: How to Calculate Mean Percentage Error (MPE) in Excel
The Mean Percentage Error (MPE) is a critical metric for evaluating forecast accuracy, particularly in business forecasting, economics, and data science. Unlike other error metrics, MPE provides insight into the direction of forecast errors (over-forecasting vs. under-forecasting) while maintaining a percentage scale that’s easy to interpret.
What is Mean Percentage Error?
Mean Percentage Error measures the average percentage difference between actual values and forecasted values. The formula is:
MPE Formula:
MPE = (1/n) × Σ[(Actual – Forecast)/|Actual|] × 100%
Where:
n = number of observations
Σ = summation symbol
|Actual| = absolute value of actual observation
Why Use MPE Instead of Other Error Metrics?
While metrics like Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE) are popular, MPE offers unique advantages:
- Directional Insight: Positive MPE indicates systematic under-forecasting; negative MPE indicates over-forecasting
- Scale Independence: Percentage errors are unit-less, allowing comparison across different scales
- Business Relevance: Percentages are intuitively understandable for stakeholders
- Sensitivity Analysis: Helps identify whether errors are consistent across different magnitude values
Step-by-Step: Calculating MPE in Excel
- Organize Your Data:
Create two columns in Excel: one for Actual Values and one for Forecast Values. Ensure they’re aligned row-by-row.
A B Actual Forecast 100 105 120 118 - Calculate Percentage Errors:
In column C, create a formula to calculate the percentage error for each pair:
= (A2-B2)/ABS(A2)Drag this formula down for all rows.
- Compute the Average:
Use Excel’s AVERAGE function to calculate the mean of your percentage errors:
=AVERAGE(C2:C100)*100Multiply by 100 to convert to percentage format.
- Format the Result:
Right-click the result cell → Format Cells → Percentage with 2 decimal places.
Advanced MPE Applications in Excel
Conditional Formatting
Apply color scales to visualize error distribution:
- Select your percentage error column
- Home → Conditional Formatting → Color Scales
- Choose a red-yellow-green scale
This helps quickly identify periods with extreme errors.
Error Analysis Dashboard
Create a dynamic dashboard with:
- Sparkline charts for error trends
- Slicers to filter by time periods
- Pivot tables summarizing errors by category
MPE vs. Other Forecast Accuracy Metrics
| Metric | Formula | Pros | Cons | Best For |
|---|---|---|---|---|
| Mean Percentage Error (MPE) | (1/n) × Σ[(A-F)/|A|] × 100% |
|
|
Bias analysis, business reporting |
| Mean Absolute Error (MAE) | (1/n) × Σ|A-F| |
|
|
General accuracy assessment |
| Root Mean Squared Error (RMSE) | √[(1/n) × Σ(A-F)²] |
|
|
Model comparison, statistical analysis |
| Mean Absolute Percentage Error (MAPE) | (1/n) × Σ|(A-F)/A| × 100% |
|
|
Percentage accuracy reporting |
Common Pitfalls and How to Avoid Them
- Division by Zero:
MPE becomes undefined when any actual value is zero. Solutions:
- Use
=IF(A2=0,0,(A2-B2)/ABS(A2))to handle zeros - Consider Mean Absolute Scaled Error (MASE) as alternative
- Use
- Asymmetric Error Treatment:
MPE treats over- and under-forecasts differently due to the absolute value in the denominator. For symmetric treatment, consider:
=AVERAGE((Actual-Forecast)/Actual)*100 - Small Value Dominance:
When actual values vary greatly in magnitude, small values can dominate the MPE. Mitigation strategies:
- Segment analysis by value ranges
- Use weighted MPE where weights reflect value importance
Real-World Applications of MPE
Supply Chain Forecasting
A major retailer used MPE to evaluate their demand forecasting system across 500 SKUs. By analyzing MPE by product category, they identified that:
- Perishable goods had MPE of +8.3% (consistent under-forecasting)
- Electronics had MPE of -3.1% (slight over-forecasting)
This led to category-specific safety stock adjustments, reducing stockouts by 22% while maintaining 98% service levels.
Financial Projections
A Fortune 500 company compared three forecasting methods for quarterly revenue:
| Method | MPE | MAE ($M) |
|---|---|---|
| Time Series (ARIMA) | -2.4% | $12.3 |
| Machine Learning (XGBoost) | +1.8% | $9.7 |
| Judgmental Forecasts | +5.2% | $15.1 |
The MPE revealed that judgmental forecasts consistently under-estimated revenue, while ARIMA slightly over-estimated. The company implemented a hybrid approach combining XGBoost with ARIMA residuals.
Academic Research on Forecast Error Metrics
The selection and interpretation of forecast error metrics has been extensively studied in academic literature. Key findings include:
- Hyndman & Koehler (2006) demonstrated that percentage errors can be misleading when actual values vary greatly in scale. They recommend scale-dependent metrics like MASE for such cases.
Another look at measures of forecast accuracy (Monash University)
- The M4 Competition (2018) analyzed 100,000 time series and found that error metric choice significantly impacts method ranking. MPE was particularly useful for identifying biased forecasts in economic data.
M4 Competition results (International Journal of Forecasting)
- The U.S. Census Bureau uses MPE variants to evaluate their economic indicators. Their research shows that MPE is particularly valuable for:
- Seasonally adjusted series
- High-frequency economic data
- Comparing forecast performance across different economic sectors
Excel Automation with VBA
For frequent MPE calculations, create a custom VBA function:
VBA Function for MPE:
Function MPE(actualRange As Range, forecastRange As Range) As Double
Dim i As Long
Dim sumPE As Double
Dim count As Long
Dim pe As Double
count = 0
sumPE = 0
For i = 1 To actualRange.Rows.Count
If actualRange.Cells(i, 1).Value <> 0 Then
pe = (actualRange.Cells(i, 1).Value - forecastRange.Cells(i, 1).Value) / Abs(actualRange.Cells(i, 1).Value)
sumPE = sumPE + pe
count = count + 1
End If
Next i
If count > 0 Then
MPE = (sumPE / count) * 100
Else
MPE = CVErr(xlErrDiv0)
End If
End Function
Usage: =MPE(A2:A100, B2:B100)
Note: This function automatically handles zero values in the actual series.
Alternative Implementations
Python Implementation
import numpy as np
def mean_percentage_error(actual, forecast):
"""
Calculate Mean Percentage Error
Parameters:
actual (array-like): Array of actual values
forecast (array-like): Array of forecast values
Returns:
float: MPE value in percentage
"""
actual = np.asarray(actual)
forecast = np.asarray(forecast)
# Handle division by zero
non_zero = actual != 0
if not np.any(non_zero):
return np.nan
pe = (actual[non_zero] - forecast[non_zero]) / np.abs(actual[non_zero])
return np.mean(pe) * 100
R Implementation
mean_percentage_error <- function(actual, forecast) {
# Calculate Mean Percentage Error
# actual: vector of actual values
# forecast: vector of forecast values
# Remove cases where actual is zero
valid <- actual != 0
if (sum(valid) == 0) {
return(NA)
}
pe <- (actual[valid] - forecast[valid]) / abs(actual[valid])
return(mean(pe) * 100)
}
Frequently Asked Questions
Q: Can MPE exceed 100%?
A: Yes, MPE can theoretically exceed 100%. This occurs when the average percentage error across all observations is greater than 100%. For example, if you consistently forecast 50 when the actual value is 100, your percentage error for each observation would be (100-50)/100 = 50%, but if you have some observations where you forecast 0 when actual is 100, those would contribute -100% errors, potentially driving the average beyond ±100%.
Q: How does MPE differ from MAPE?
A: The key differences are:
| Aspect | MPE | MAPE |
|---|---|---|
| Error Direction | Preserved (shows bias) | Always positive |
| Interpretation | Average percentage error with direction | Average absolute percentage error |
| Use Case | Identifying forecast bias | Measuring absolute accuracy |
Q: What's a good MPE value?
A: "Good" MPE values are domain-specific, but general guidelines:
- |MPE| < 5%: Excellent forecast with minimal bias
- 5% ≤ |MPE| < 10%: Good forecast with some bias
- 10% ≤ |MPE| < 20%: Acceptable but may need improvement
- |MPE| ≥ 20%: Significant bias - investigate forecast method
Note that industry standards vary. For example:
- Retail demand forecasting often targets |MPE| < 10%
- Financial projections may accept |MPE| up to 15% due to volatility
- Weather forecasting aims for |MPE| < 5% for temperature predictions
Conclusion and Best Practices
Mean Percentage Error is a powerful tool for forecast evaluation when used appropriately. Remember these best practices:
- Combine with Other Metrics: Always use MPE alongside scale-dependent metrics like MAE or RMSE for complete analysis
- Segment Your Analysis: Calculate MPE separately for different product categories, time periods, or value ranges
- Visualize Errors: Create control charts of percentage errors over time to identify patterns
- Document Assumptions: Clearly state how you handled zero values, outliers, and data transformations
- Benchmark Continuously: Track MPE over time to monitor forecast performance improvements
For advanced forecasting applications, consider implementing forecast value added (FVA) analysis which decomposes MPE by forecasting process stage, or probabilistic forecasting which evaluates entire prediction distributions rather than point forecasts.
Ready to calculate your MPE?
Use our interactive calculator at the top of this page, or implement the Excel formulas in your own spreadsheets.
For questions about advanced forecasting techniques, consult the Forecasting Principles resource from leading forecasting researchers.