Curious Minds

Clear answers to science and history questions

Root Mean Square Percentage Error (RMSPE)

· 6 min read · Science

Root mean square percentage error (RMSPE) is a metric that tells you, on average, how far a model’s predictions are from actual values, expressed as a percentage of the actual values. You enter two lists of numbers — the observed (actual) values and the predicted values — and the calculator returns the RMSPE, along with the mean absolute percentage error (MAPE) for comparison.

in actual | Actual values (comma-separated) | - | 100, 120, 115, 130, 125 | 0 | 1000000
in pred | Predicted values (comma-separated) | - | 105, 118, 120, 128, 130 | 0 | 1000000
out rmspe | RMSPE | % | sqrt(mean(((pred - actual) / actual)^2)) * 100 | 2
out mape | MAPE | % | mean(abs((pred - actual) / actual)) * 100 | 2

Formula

The RMSPE is calculated as:

RMSPE = √( (1/n) × Σi=1n ( (Pi − Ai) / Ai )² ) × 100%

Where:

  • Ai = actual (observed) value for observation i
  • Pi = predicted (forecast) value for observation i
  • n = number of observations

The formula squares the percentage error for each point, averages those squares, takes the square root, and multiplies by 100 to express it as a percentage. The squaring gives more weight to large errors, so RMSPE is always greater than or equal to the mean absolute percentage error (MAPE) for the same data.

Worked Example

Using the default values from the calculator:

  • Actual values: 100, 120, 115, 130, 125
  • Predicted values: 105, 118, 120, 128, 130

Step 1: Compute the percentage error for each observation:

  • (105−100)/100 = 0.05 → 5%
  • (118−120)/120 = −0.01667 → −1.67%
  • (120−115)/115 = 0.04348 → 4.35%
  • (128−130)/130 = −0.01538 → −1.54%
  • (130−125)/125 = 0.04 → 4.00%

Step 2: Square each percentage error (as a decimal):

  • 0.05² = 0.0025
  • (−0.01667)² = 0.000278
  • 0.04348² = 0.001891
  • (−0.01538)² = 0.000237
  • 0.04² = 0.0016

Step 3: Average the squared errors: (0.0025 + 0.000278 + 0.001891 + 0.000237 + 0.0016) / 5 = 0.006506 / 5 = 0.0013012

Step 4: Take the square root: √0.0013012 = 0.03607

Step 5: Multiply by 100 to get a percentage: 0.03607 × 100 = 3.61%

The calculator shows 3.61% for RMSPE, and the MAPE for the same data is 3.31% (the average of the absolute percentage errors). The RMSPE is slightly higher because the squaring penalizes the 5% error more heavily.

Why Use RMSPE Instead of MAPE?

RMSPE and MAPE are both scale-independent measures, but they behave differently. RMSPE gives a higher penalty to large errors, which is useful when you care more about avoiding big mistakes than small ones. For example, in demand forecasting, a single 20% error might be much more costly than two 10% errors, and RMSPE reflects that by being higher than MAPE in such cases.

However, RMSPE is not always the best choice. If your data contains zeros or very small actual values, the percentage error becomes huge or undefined, making RMSPE unreliable. In those cases, you might use a different metric like RMSE (root mean square error) or MAE (mean absolute error) on the raw values.

How to Interpret the Result

A lower RMSPE indicates better predictive accuracy. A value of 0% means perfect predictions. There is no universal “good” threshold — it depends on your domain. In retail sales forecasting, an RMSPE under 10% is often considered good; in stock price prediction, even 20% might be acceptable. Always compare RMSPE against a baseline model (e.g., using the previous value as the prediction) to see if your model adds value.

Note that RMSPE is expressed in the same units as the percentage error, so it’s easy to communicate. However, because it squares errors, it is not directly comparable to MAPE — RMSPE will always be ≥ MAPE. The difference between them tells you how much large errors are inflating the average.

Common Mistakes and Pitfalls

  • Dividing by zero: If any actual value is zero, the percentage error is undefined. Check your data for zeros before using RMSPE.
  • Confusing percentage and decimal: The formula uses decimals internally; only multiply by 100 at the end. If you forget, you’ll get a number like 0.036 instead of 3.6%.
  • Using RMSPE on negative values: If actual values can be negative (e.g., profit margins), the percentage error becomes meaningless. RMSPE is only valid for positive values.
  • Ignoring sample size: RMSPE is an average, so it’s more stable with larger n. With very few points, a single outlier can dominate the result.
  • Not comparing to a baseline: A low RMSPE is only meaningful relative to a simple model. Always benchmark.

RMSPE vs. Other Error Metrics

Here’s how RMSPE compares to common alternatives:

  • MAPE (Mean Absolute Percentage Error): Average of absolute percentage errors. Less sensitive to outliers, easier to interpret, but can be zero if any actual is zero.
  • RMSE (Root Mean Square Error): Same as RMSPE but without the percentage scaling. Used when you want errors in the original units (e.g., dollars, units).
  • MAE (Mean Absolute Error): Average absolute error in original units. Robust to outliers, but not scale-independent.
  • SMAPE (Symmetric MAPE): Uses the average of actual and predicted as the denominator, avoiding issues with zero actuals but still problematic when both are zero.

Choose RMSPE when you need a percentage-based error that penalizes large errors more heavily. Choose MAPE if you want a simpler, more interpretable percentage. Choose RMSE or MAE if you want errors in the original units.

Limitations and When Not to Use

RMSPE has several limitations:

  • Zero or near-zero actual values: As mentioned, these cause huge or infinite errors. If your data has many small values, RMSPE will be dominated by them.
  • Asymmetric penalty: Over-prediction and under-prediction are treated equally in percentage terms, but a 50% over-prediction is not the same as a 50% under-prediction in business impact. RMSPE doesn’t capture that.
  • Not suitable for negative actuals: Percentage error becomes meaningless when the denominator is negative.
  • Scale dependence on the denominator: A 5% error on an actual of 1000 is 50 units, but on an actual of 10 it’s 0.5 units. RMSPE treats both as 5% — which may or may not be appropriate.

If your data violates these conditions, consider using RMSE on log-transformed values or a different metric entirely.

Frequently Asked Questions

What is a good RMSPE value?

There is no universal threshold. In many business forecasting contexts, an RMSPE below 10% is considered good, but it depends on the volatility of the data. For example, daily stock returns might have an RMSPE of 2-3% even with a decent model, while monthly sales could be 5-10%. Always compare to a naive forecast (e.g., predicting the last value) to see if your model is better.

Can RMSPE be negative?

No. RMSPE is a square root of an average of squared values, so it is always non-negative. A value of 0% means perfect predictions. Negative errors are squared, so they contribute positively to the metric.

How is RMSPE different from RMSE?

RMSE is the square root of the average squared error in the original units (e.g., dollars, units). RMSPE is the same but divided by the actual value first, then expressed as a percentage. RMSPE is scale-independent, so you can compare across datasets with different magnitudes, while RMSE is not.

What if my actual values include zero?

RMSPE is undefined for zero actuals because you’d divide by zero. A common workaround is to add a small constant (e.g., 1) to all values, but that distorts the percentage. Better to use a different metric like RMSE or MAE, or filter out zero observations if they are not meaningful.

Can I use RMSPE for time series forecasting?

Yes, RMSPE is commonly used for time series forecast accuracy, especially in retail and supply chain. Just be aware that it treats each time point equally, so if you have seasonal patterns, you might want to compute RMSPE separately for each season or use a weighted version.

Does RMSPE penalize large errors more than MAPE?

Yes. Because errors are squared before averaging, a single large error has a disproportionately large effect on RMSPE. For example, errors of 5% and 15% give MAPE = 10%, but RMSPE = √((25+225)/2) = √125 ≈ 11.18%. This is intentional — RMSPE is more sensitive to outliers.

In this article
  1. Formula
  2. Worked Example
  3. Why Use RMSPE Instead of MAPE?
  4. How to Interpret the Result
  5. Common Mistakes and Pitfalls
  6. RMSPE vs. Other Error Metrics
  7. Limitations and When Not to Use
  8. Frequently Asked Questions