Mean squared error is the scorekeeper of prediction: square every miss, average the squares, and big misses count far more than small ones. This MSE Calculator takes your actual values and your model’s predictions side by side and returns the MSE together with its friendlier relatives — RMSE (the same error back in original units), MAE (the typical absolute miss) and bias (whether the model leans high or low).
Worked Example: Four Forecasts Scored
Actual values 3, 5, 7, 9 against predictions 2.5, 5, 8, 8 give errors (predicted − actual) of −0.5, 0, +1, −1. Squaring them: 0.25, 0, 1, 1 — sum 2.25, divided by 4 data points gives MSE = 0.5625. The RMSE is its square root, 0.75 — back in the units of the data, readable as a typical-sized miss with extra weight on the large ones. The MAE averages the absolute errors instead: (0.5 + 0 + 1 + 1)/4 = 0.625. The bias (mean signed error) is (−0.5 + 0 + 1 − 1)/4 = −0.125: on average the model predicts an eighth of a unit low — small next to the error sizes, so this model is roughly unbiased but imprecise, a distinction the four numbers together make visible and any single one of them would hide. Note how the two unit-1 misses contribute 2.0 of the 2.25 squared-error sum: 89% of the MSE comes from half the points. That quadratic spotlight on the worst predictions is the entire character of the metric.
Why Square the Errors at All?
Three reasons, in descending order of honesty. First, squaring makes errors positive without the absolute value’s kink — plain signed errors average to the bias and cancel, telling you nothing about size. Second, the square is differentiable everywhere, which made MSE the default loss function of a century of optimization: least-squares regression is literally the line that minimizes MSE, and the solution falls out of calculus in closed form. Third — the debatable one — squaring declares that a miss of 2 is four times as bad as a miss of 1, not twice. Sometimes that is true (a bridge-load forecast, a drug-dose model); sometimes it merely lets one outlier grade the whole exam. The MAE line on this page is the antidote: it prices every unit of miss equally, so comparing MSE-driven RMSE against MAE tells you whether your error budget is spread evenly (RMSE ≈ MAE) or concentrated in a few disasters (RMSE well above MAE — here 0.75 versus 0.625, a mild case).
Where MSE Runs the Scoreboard
Machine learning benchmarks regression models by MSE and its root: leaderboards, gradient descent on squared loss, and the R² statistic (which is MSE normalized against the variance of the data) all descend from it. Forecasting in inventory, energy load and weather uses RMSE because it reports in the units planners think in — megawatts, units, millimeters. Signal processing inverts it into PSNR for image quality. Model comparison discipline is the same everywhere: compute the metric on held-out data the model never trained on, compare like with like (same dataset, same units, same n), and never compare MSEs across different datasets — squaring makes the number unit-dependent, so an MSE of 0.56 in kilograms and 0.56 in dollars are strangers, not rivals.
Common Mistakes
Comparing MSE across datasets with different scales or units — meaningless by construction. Reporting MSE when the audience needs RMSE’s original units (no forecaster thinks in squared megawatts). Letting one outlier dominate silently: sort your errors before trusting the average of their squares. Using MSE to compare models evaluated on different numbers of points without checking that n matches. And forgetting the sign information entirely — MSE, RMSE and MAE are all blind to direction, which is why this page prints bias alongside: a model can post a fine MSE while systematically low-balling every single case.
From MSE to R²: Giving the Number a Scale
Because raw MSE is unit-bound, the standard normalization is R² = 1 − MSE / Var(actual), comparing your model against the laziest possible rival — always predicting the mean. For this page’s example, the actual values 3, 5, 7, 9 have mean 6 and variance (9 + 1 + 1 + 9)/4 = 5, so R² = 1 − 0.5625/5 = 0.8875: the model explains about 89% of the variance, and its errors are about a ninth of the no-model baseline. An R² of 0 means your model ties the mean-predictor; negative values — entirely possible on held-out data — mean it loses to it. Whenever an MSE is quoted without its dataset’s variance, ask for the pair: the ratio is the information.
Related Tools
Continue with the Benford’s Law Calculator, the Least to Greatest Calculator, the False Positive Calculator, or browse the full Statistics Calculators hub.
Frequently Asked Questions
How is MSE calculated?
Subtract each prediction from its actual value, square every difference, and average the squares. For errors −0.5, 0, 1, −1 the squares are 0.25, 0, 1, 1 and the MSE is 2.25/4 = 0.5625.
What is the difference between MSE and RMSE?
RMSE is the square root of MSE. It exists to restore the original units: an MSE of 0.5625 squared-units becomes an RMSE of 0.75 units, which humans can compare against the data’s scale.
MSE or MAE — which should I use?
MSE (and RMSE) punish large misses disproportionately; MAE prices all misses linearly. If big errors are disproportionately costly, MSE. If you want the typical miss and outlier resistance, MAE. Reporting both, as this page does, is better than either alone.
Can MSE be zero?
Yes — only when every prediction is exactly right. On real held-out data an MSE of exactly 0 usually signals leakage (the model saw the answers), not perfection.
What is a good MSE?
There is no universal threshold: MSE is unit-bound. Judge it relatively — against a naive baseline (predicting the mean gives MSE near the data’s variance) and against rival models on the same data.
Does MSE tell me if my model is biased?
No — squaring erases direction. The bias line (mean signed error) does: near zero means the over- and under-predictions cancel; consistently negative means the model predicts low on average.