MSE Calculator
Calculate mean squared error, SSE, and RMSE from observed values with mean predictions or custom predicted values.
What Is Mean Squared Error (MSE)?
Mean squared error measures how far predicted values sit from observed values. It averages the squared residuals, so large errors are penalized more than small ones and positive and negative residuals cannot cancel. Related tools: Standard Deviation Calculator and Linear Regression Calculator.
MSE and SSE Formulas
For observed values $x_i$ and predicted values $y_i$:
$$\text{SSE} = \sum_{i=1}^{n}(x_i - y_i)^2$$
$$\text{MSE} = \frac{1}{n}\sum_{i=1}^{n}(x_i - y_i)^2 = \frac{\text{SSE}}{n}$$
$$\text{RMSE} = \sqrt{\text{MSE}}$$
This calculator can set every prediction to the sample mean, or accept custom predicted values of the same length.
Example
For the sample $3, 15, 6, 3, 44, 8, 15, 9, 7, 25, 24, 5, 88, 44, 3, 21$, the mean is $20$. Squared deviations sum to SSE $= 7590$, so:
$$\text{MSE} = 7590 / 16 = 474.375, \quad \text{RMSE} \approx 21.78$$
Why Square the Errors?
Without squaring (or taking absolute values), positive and negative residuals can cancel and hide poor fit. Squaring makes every residual contribute positively. RMSE restores the original units after averaging squares.
Frequently Asked Questions
What is a good MSE?
Lower is better, but the scale depends on your data units. Compare MSE across models on the same dataset, or use RMSE to interpret error in original units.
How do I get SSE from MSE?
Multiply: SSE = MSE × n, where n is the number of observations.
How is MSE related to linear regression?
Ordinary least squares chooses the line that minimizes SSE (and therefore MSE) for the fitted predictions.
What is MAE vs MSE?
Mean absolute error averages absolute residuals and is less sensitive to outliers. MSE squares residuals, so large misses dominate more strongly.