Mean Squared Error Calculator

Mean Squared Error Calculator

Measure how far predictions or forecasts are from what actually happened: MSE, RMSE, MAE, MAPE and bias, side by side.

MSE = Σ(actual − predicted)² ÷ n

In the same order, so each prediction lines up with what actually happened.

Enter actual and predicted values

What is Mean Squared Error?

Mean squared error (MSE) is the average of the squared differences between what was predicted and what actually happened. Zero means perfect predictions; bigger means worse.

Squaring does two things: it stops positive and negative misses cancelling out, and it punishes big misses much more than small ones. A miss of 10 counts 100 times as much as a miss of 1.

Because MSE is in squared units, its square root, RMSE, is easier to read. MAE (the average absolute miss) and MAPE (the average percentage miss) are gentler alternatives, and bias shows whether forecasts lean high or low.

Mean Squared Error Formula

Accuracy measures as defined in Hyndman and Athanasopoulos, Forecasting: Principles and Practice, section 5.8. See Sources.

1. Errors

eᵢ = actualᵢ − predictedᵢ

2. Squared measures

MSE = Σe² ÷ n
RMSE = √MSE

3. Absolute and relative measures

MAE = Σ|e| ÷ n · bias = Σe ÷ n
MAPE = 100 × Σ|e ÷ actual| ÷ n

Worked Example: Six Weeks of Demand Forecasts

Given:
Units sold 120, 135, 128, 150, 142, 160 against forecasts 118, 130, 135, 145, 150, 155.
Step 1:
Errors:
2, 5, -7, 5, -8, 5
Step 2:
Square and average:
(4 + 25 + 49 + 25 + 64 + 25) ÷ 6 = 32
Step 3:
Readable versions:
RMSE = 5.66 · MAE = 5.33 · MAPE = 3.82%
Result:
Forecasts are typically about 5.7 units out

That's around 3.8% of weekly demand. Bias is close to zero (0.33), so the forecasts aren't leaning consistently high or low.

How One Big Miss Moves MSE and MAE

The worked example with the last forecast made progressively worse.

Error measures as one forecast gets worse
Last forecastMSERMSEMAE
155325.665.33
14094.59.727.83
120294.517.1611.17
100627.825.0614.5

Common MSE Mistakes

  • Reading MSE in the original units. An MSE of 33 for units sold isn't "33 units". Use RMSE for that.
  • Comparing MSE across datasets of different scale. Forecasting thousands of units naturally gives bigger MSE than forecasting tens. Use MAPE to compare across scales.
  • Using MAPE with zeros or tiny actuals. Dividing by small numbers explodes the percentage errors. MAPE is undefined when any actual is zero.
  • Judging a model on training data alone. A model always looks better on the data it was fitted to. Measure errors on data it hasn't seen.

Mean Squared Error FAQs

What is a good MSE?

There’s no universal benchmark. Compare it with a simple baseline, such as last week’s value as the forecast. A useful model should beat it clearly.

MSE or MAE: which should I use?

MSE and RMSE when large errors are especially costly. MAE when every unit of error costs the same and you don’t want a few outliers to dominate.

Why is RMSE always at least as big as MAE?

Squaring weights large errors more heavily. They’re equal only when every error is the same size.

Is this MSE the same as in regression output?

Not quite. Regression software divides SSE by the degrees of freedom; this calculator divides by n, the usual choice for judging forecasts.

What does bias tell me?

The average signed error. Positive means actuals tend to exceed predictions (under-forecasting); negative means over-forecasting.

Can MSE be negative?

No. It’s an average of squares, so it’s always zero or positive.

How do I calculate MSE in Excel?

=SUMXMY2(actual_range, predicted_range)/COUNT(actual_range).

Why is MSE used to train models?

It’s smooth and easy to differentiate, and minimising it gives the least-squares solution, which has good statistical properties.

Sources

Related Tools