Mean Squared Error Calculator (MSE, RMSE, SSE)

Quick answer

The mean squared error calculator compares observed values with predictions (your own or simply the mean of the data) and returns MSE, RMSE, the sum of squared errors, mean absolute error, bias, MAPE and R², with a table of every error and a chart.

Mean squared error (MSE)
2
Root mean squared error (RMSE)
1.414214
Sum of squared errors (SSE)
12
Mean absolute error (MAE)
1.333333
Mean error (bias, observed − predicted)
0
Mean absolute percentage error (MAPE)
5.799 %
R² (share of variance explained)
0.7757
Number of values
6
Mean of observed values
23.5
Observed and predicted values
Error table
# observed y predicted ŷ error y − ŷ squared error ────────────────────────────────────────────────────────── 1 21 22 −1 1 2 24 23 1 1 3 19 21 −2 4 4 26 25 1 1 5 23 24 −1 1 6 28 26 2 4 Σ 141 141 0 12 SSE = 12 · MSE = SSE ÷ n = 12 ÷ 6 = 2 · RMSE = √MSE = 1.414214

The mean squared error is the most common way to score how well a model, a forecast or an estimate matches reality. For every observation you take the error (observed minus predicted), square it, and average the squares. Squaring stops positive and negative errors from cancelling each other out and punishes large misses much more than small ones: an error of 4 counts sixteen times as much as an error of 1.

Because MSE is in squared units (°C², dollars²), people usually also report its square root, the RMSE, which is in the same units as the data and can be read as a “typical” size of error. The sum of squared errors (SSE) is the total before averaging, used in regression and ANOVA. The mean absolute error (MAE) is a gentler alternative that does not square, and the mean error (bias) shows whether predictions are too high or too low on average.

If you have no model yet, choose “the mean of the observed values” as the prediction. Then MSE equals the population variance of the data and RMSE its standard deviation, the baseline any useful model should beat.

How to use the Mean Squared Error Calculator

  1. Predicted values
  2. Observed values (y)
  3. Predicted values (ŷ), same order

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

How it works

Enter the observed values, then either let the calculator predict every value with the mean or type your own predictions in the same order. It computes each error, squares and sums them, divides by n for MSE and takes the square root for RMSE. With custom predictions it also reports R² = 1 − SSE ÷ SST.

Worked example

A forecaster predicted daily highs of 22, 23, 21, 25, 24 and 26 °C; the observed highs were 21, 24, 19, 26, 23 and 28 °C. The errors are −1, 1, −2, 1, −1 and 2, their squares 1, 1, 4, 1, 1 and 4, so SSE = 12, MSE = 12 ÷ 6 = 2 °C² and RMSE = √2 = 1.41 °C. The mean absolute error is 8 ÷ 6 = 1.33 °C, the bias is 0 (no tendency to over- or under-forecast) and R² = 1 − 12 ÷ 53.5 = 0.776.

MSE, RMSE or MAE?

Measure Units Best for
MSE squared Model fitting and comparing least-squares models
RMSE same as data Reporting a typical error when large misses matter
MAE same as data Robust error summary, less affected by outliers
MAPE percent Comparing series on different scales (not with zeros)

Formula

Error eᵢ = yᵢ − ŷᵢ · SSE = Σeᵢ² · MSE = SSE ÷ n · RMSE = √MSE · MAE = Σ|eᵢ| ÷ n · R² = 1 − SSE ÷ Σ(yᵢ − ȳ)²

Worked example

Inputs: Predicted values: My own predictions; Observed values (y): 21, 24, 19, 26, 23, 28; Predicted values (ŷ), same order: 22, 23, 21, 25, 24, 26.
Results: Mean squared error (MSE) = 2; Root mean squared error (RMSE) = 1.414214; Sum of squared errors (SSE) = 12; Mean absolute error (MAE) = 1.333333; Mean error (bias, observed − predicted) = 0; Mean absolute percentage error (MAPE) = 5.799 %.

Key terms

Residual (error)
The observed value minus the predicted value, yᵢ − ŷᵢ.
SSE
Sum of squared errors, the total squared miss.
RMSE
Root mean squared error, the typical size of an error in the data's own units.
Bias
The average error; positive means predictions are too low on average.

Frequently asked questions

How do I calculate MSE by hand?

Subtract each prediction from the observed value, square the differences, add them (that is SSE) and divide by the number of values. For errors −1, 1, −2, 1, −1 and 2, SSE = 12 and MSE = 12 ÷ 6 = 2.

What is the difference between MSE and RMSE?

RMSE = √MSE. MSE is in squared units; RMSE is in the original units, so an RMSE of 1.41 °C is easier to explain than an MSE of 2 °C².

What is a good MSE?

There is no universal threshold, as it depends on the scale of the data. Compare models on the same data, or compare RMSE with the standard deviation of the observations: a useful model has a much smaller RMSE.

How do I convert between SSE, MSE and RMSE?

MSE = SSE ÷ n, RMSE = √MSE and SSE = n × MSE. In regression the residual mean square divides SSE by n − p instead of n.

Why square the errors instead of taking absolute values?

Squares are smooth and easy to minimise (least squares) and punish big errors strongly. If outliers should not dominate, use the MAE that is also shown.

What does MSE equal when the prediction is the mean?

The population variance of the data. In the example 12, 15, 9, 20, 14, 18, 11, 17 the mean is 14.5, MSE = 12.25 and RMSE = 3.5.

Can MSE be negative?

No. It is an average of squares, so it is 0 for perfect predictions and positive otherwise.

Sources

  1. Penn State STAT 462: Applied Regression Analysis
  2. NIST/SEMATECH e-Handbook of Statistical Methods
  3. OpenStax: Introductory Statistics 2e

Cite this calculator

Speedy Calculator. (2026). Mean Squared Error Calculator (MSE, RMSE, SSE). Speedy Calculator. https://speedycalculator.com/calculators/statistics/mse/