Advertisement

Mean squared error calculator

Enter actual values and predictions in matching order. This tool evaluates prediction errors without fitting or adjusting a model.

Calculator

Use commas, spaces or new lines between numbers. Use the same unit for every observation.

Use commas, spaces or new lines between numbers. Use the same unit for every observation.

Mean squared error
2.000000
Root mean squared error
1.414214
Mean absolute error
1.333333
Mean signed error (predicted minus actual)
0.666667
Pair count
3.000000
Prediction errors
ActualPredictedPredicted - actualSquared error
2.0000001.000000-1.0000001.000000
4.0000005.0000001.0000001.000000
6.0000008.0000002.0000004.000000

Advertisement

How this calculator works

Each prediction is paired with its corresponding actual value. Squaring its error gives extra weight to large misses; averaging gives MSE. RMSE restores the original unit, while MAE averages ordinary absolute distances. Signed bias uses prediction minus actual, so positive bias indicates overprediction on average. The divisor is the number of evaluated pairs, without a fitted-parameter degrees-of-freedom correction.

Formula

e_i = predicted_i - actual_i; MSE = Σe_i²/n; RMSE = sqrt(MSE); MAE = Σ|e_i|/n; bias = Σe_i/n.

Worked example

Actual values 2, 4, 6 and predictions 1, 5, 8 give errors -1, 1, 2. MSE = (1 + 1 + 4)/3 = 2 and RMSE = sqrt(2).

Advertisement

Frequently asked questions

Can MSE be negative?

No. It averages squared errors. Zero means every evaluated prediction equals its actual value.

Why is MSE not in the original unit?

Squaring the error squares the unit. RMSE is the companion measure in the original unit.

Is this the residual mean square used in regression tests?

This page divides by n for prediction evaluation. Regression inference may use n minus the number of fitted parameters instead.

Sources

Advertisement