How this instrument works
Mean squared error takes every gap between what actually happened and what a model predicted, squares each gap, and averages the squared values across every pair in your dataset: MSE = (1/n) × sum of (actual − predicted)². Squaring each error before averaging does two things at once — it makes every error positive, so overshooting and undershooting don't cancel each other out, and it punishes large errors disproportionately more than small ones, since a miss twice as big contributes four times as much to the total.
Root mean squared error (RMSE) is simply the square root of MSE, which brings the number back to the same units as the original data. An MSE of 0.375 on data measured in dollars is technically in 'squared dollars,' which is hard to interpret directly — an RMSE of about 0.61 dollars is the more intuitive figure, since it's directly comparable to the size of a typical prediction error in the original units.
MSE and RMSE are used constantly to compare competing models or to track how a model's accuracy changes over time — a lower value always means predictions are, on average, closer to the actual values. Because squaring amplifies large errors, MSE is especially sensitive to a few big misses; a model that's usually spot-on but occasionally very wrong will score worse on MSE than one that's consistently a little bit off, even if that second model's typical error is larger.
- Enter your actual (observed) values into Actual — separated by commas, spaces, or new lines.
- Enter the corresponding predicted (fitted) values into Predicted, in the same order and count as Actual.
- Read MSE — the average of the squared differences between each actual and predicted pair.
- Read RMSE — the square root of MSE, expressed in the same units as your original data for easier interpretation.
Worked example — four actual-versus-predicted pairs
A model predicted 2.5, 5.5, 2, and 7 for four cases whose actual values were 3, 5, 2, and 8. Enter '3, 5, 2, 8' into Actual and '2.5, 5.5, 2, 7' into Predicted, in matching order.
The squared errors are (3−2.5)² = 0.25, (5−5.5)² = 0.25, (2−2)² = 0, and (8−7)² = 1, which sum to 1.5. MSE = 1.5/4 = 0.375. RMSE = sqrt(0.375) = 0.612372 — meaning the model's predictions are, on average, off by roughly 0.61 in the original units, once the squaring is undone.
Questions
Why square the errors instead of just averaging them directly?
Averaging raw errors directly lets positive and negative misses cancel out — a model that's +10 wrong on one case and -10 wrong on another would show an average error of 0, hiding that it's actually making large mistakes in both directions. Squaring makes every error positive before averaging, so overshoots and undershoots both count toward the total instead of canceling, and it also weights larger errors more heavily, which is usually the behavior you want when judging prediction quality.
What's the difference between MSE and RMSE, and which should I report?
MSE is the average of the squared errors, so it's expressed in squared units of your original data — hard to interpret directly if the data has real-world units like dollars or degrees. RMSE is just the square root of MSE, bringing the number back to the same units as your original data, which makes it more intuitive to report: 'predictions are typically off by about $0.61' is easier to reason about than 'MSE is 0.375 squared dollars.'
Is a lower MSE always better?
Within the same dataset and units, yes — a lower MSE means the model's predictions are, on average, closer to the actual values. But MSE values aren't directly comparable across datasets with different scales or units (an MSE of 5 might be excellent for house prices in millions of dollars and terrible for temperatures in degrees), so only compare MSE between models tested on the exact same data.
How sensitive is MSE to outliers or a few large errors?
Very sensitive — because each error is squared before averaging, one prediction that's far off contributes disproportionately more to MSE than several small errors combined. A model with one huge miss and otherwise perfect predictions can score worse on MSE than a model that's consistently mediocre across the board. If you want an error metric less sensitive to occasional large misses, mean absolute error, which averages raw absolute differences instead of squaring them, is a common alternative.
Can MSE be zero?
Yes — an MSE of exactly zero means every single predicted value matched its corresponding actual value exactly, a perfect fit with no error anywhere in the dataset. This is common as a sanity-check case, such as comparing a dataset against itself, but rare in practice with real-world predictions, where at least some small gap between predicted and actual values is normal.