What Is Sum of Squared Errors?
The sum of squared errors (SSE), also called the residual sum of squares, adds up the squared difference between each observed value and its predicted value. A smaller SSE means the model's predictions sit closer to the data, and least-squares regression chooses the line that minimises it.
From the same inputs the calculator reports the mean squared error (SSE ÷ n), the root mean squared error, the mean absolute error, the residual standard error and R² = 1 − SSE ÷ SST, so you can see the fit in several forms.
The sections below give each formula, a variables table, a worked example and answers to common questions such as SSE versus MSE and what a good SSE is.
How to Use the Sum of Squared Errors Calculator
- Enter the observed values in the first box and the model predictions in the second, in the same order.
- Optionally enter the number of predictors to get the residual standard error.
- Read the SSE, then check the error table and charts to see which observations contribute most.
Sum of Squared Errors Formula
Sum of squared errors
Mean squared error and RMSE
Total sum of squares
Coefficient of determination
Residual standard error
Sum of Squared Errors Variables Explained
| Symbol | Meaning | Notes |
|---|---|---|
| SSE | Sum of squared errors | Σ (yᵢ − ŷᵢ)² |
| yᵢ | Actual value | |
| ŷᵢ | Predicted value | |
| n | Number of pairs | |
| SST | Total sum of squares | Σ (yᵢ − ȳ)² |
Sum of Squared Errors Worked Example
Using the example values (press “Load example” above to try them):
- For each pair compute the error e = y − ŷ.
- Square every error and add them up (see the table).
- SSE = Σ(y − ŷ)² = 0.59.
- MSE = SSE ÷ n = 0.59 ÷ 6 = 0.0983333; RMSE = √MSE = 0.313581.
- SST = 80.8333, so R² = 1 − 0.59 ÷ 80.8333 = 0.9927.
Result: Sum of squared errors (SSE) = 0.59; Mean squared error (MSE) = 0.0983333.
SSE, SSR and SST: avoiding the naming trap
Textbooks and software disagree about abbreviations. In many regression texts SSE is the error (residual) sum of squares and SSR is the regression sum of squares; others, and some software, swap them. SST is the same in every source: total variation about the mean. For a least squares line with an intercept, SST = SSR + SSE, so variation splits into the part the model explains and the part it does not.
| Quantity | Meaning | Also called |
|---|---|---|
| SSE | Σ(y − ŷ)² | RSS, residual sum of squares, SSR (some books) |
| SSR / SSM | Σ(ŷ − ȳ)² | Regression or model sum of squares, ESS |
| SST | Σ(y − ȳ)² | TSS, total sum of squares |
How to interpret the SSE
SSE has no universal good or bad value because it grows with the number of observations and the scale of the data. Use it to compare models fitted to the same data: the model with the lower SSE fits better, though adding predictors always lowers SSE, so compare with adjusted R², AIC or a hold-out test set. RMSE puts the error back in the units of y and is easier to judge against the typical size of y.
| Metric | Best for | Sensitivity to outliers |
|---|---|---|
| SSE | Model fitting, ANOVA | High |
| MSE / RMSE | Comparing models on the same data, penalising big misses | High |
| MAE | Typical absolute miss, easy to explain | Low |
| R² | Share of variation explained | High |
Where Sum of Squared Errors Is Used
Regression homework
Computing SSE, MSE and R² for a fitted line.
Comparing models
Checking which model has the smaller error on the same data.
Finding the worst points
Seeing which observations contribute most to the total error.
Forecast accuracy
Summarising prediction error in squared and in original units.
Common Sum of Squared Errors Mistakes to Avoid
- Keep actual and predicted values in the same order.
- A negative R² means the model is worse than predicting the mean.
- Look at the squared-error chart: one outlier can dominate the SSE.
- Never compare SSE between data sets of different size without dividing by n.
Sum of Squared Errors Terms and Definitions
- Residual
- Actual minus predicted value for one observation.
- Least squares
- The method of choosing model parameters that minimise the SSE.
Sum of Squared Errors FAQs
What is the sum of squared errors?
It is the total of the squared differences between observed and predicted values, Σ(y − ŷ)². It measures how far a model’s predictions are from the data.
Is SSE the same as RSS?
Yes. Residual sum of squares (RSS) and SSE both mean the sum of squared residuals. Some texts use SSR for the same quantity, so check the definition.
Why do we square the errors?
Squaring removes signs so positive and negative errors cannot cancel, and it penalises large errors more. It also makes the maths of least squares tractable.
What is a good SSE?
There is no universal threshold. Compare SSE across models on the same data, or look at RMSE and R² which are easier to interpret.
How is SSE related to R²?
R² = 1 − SSE/SST. The smaller the SSE relative to total variation, the closer R² is to 1.
Can SSE be zero?
Yes, when predictions match the actual values exactly. In practice this often signals overfitting.
Can the sum of squared errors be negative?
No. Each error is squared, so SSE is zero for a perfect fit and positive otherwise.
What is the difference between SSE and MSE?
MSE is the SSE divided by the number of observations, so it is an average and does not grow just because you have more data points.