SSE Calculator (Sum of Squared Errors)

This SSE calculator finds the sum of squared errors between actual and predicted values. It also returns the MSE, RMSE, MAE and R², with charts that show which points contribute most to the error.

Same number of values as the predictions.

Predictions in the same order as the actual values.

Used only for the residual standard error.

Checks on your data

  • Only 6 points. Error measures from so few cases can change a lot with a single new observation.
  • These measures depend on the scale of your data. Compare them only between models on the same data, or divide by the mean (shown as RMSE ÷ mean) for a relative sense.

Results

Sum of squared errors (SSE)
0.59
also called RSS or SSR (residual)
Mean squared error (MSE)
0.0983333
Root mean squared error (RMSE)
0.313581
Mean absolute error (MAE)
0.283333
Total sum of squares (SST)
80.8333
variation of actual values about their mean
R² = 1 − SSE/SST
0.9927
99.27% of variation explained
Residual standard error
0.384057
df = n − p − 1 = 4
Count (n)
6
Actual vs predicted (points on the line are perfect predictions)
510468101214Predicted ŷActual y
Squared error per observation (tallest bars drive the SSE)
00.10.21: 0.0410.042: 0.0420.043: 0.0130.014: 0.0940.095: 0.1650.166: 0.2560.25
Error table
Actual yPredicted ŷError y − ŷSquared error
32.80.20.04
55.2-0.20.04
77.1-0.10.01
98.70.30.09
1111.4-0.40.16
1413.50.50.25
Show step-by-step solution
  1. For each pair compute the error e = y − ŷ.
  2. Square every error and add them up (see the table).
  3. SSE = Σ(y − ŷ)² = 0.59.
  4. MSE = SSE ÷ n = 0.59 ÷ 6 = 0.0983333; RMSE = √MSE = 0.313581.
  5. SST = 80.8333, so R² = 1 − 0.59 ÷ 80.8333 = 0.9927.
FormulaSSE = Σ(y − ŷ)²
Other namesRSS, SSR (residual)
Goal in regressionMinimise it
UnitsSquared units of y

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

  1. Enter the observed values in the first box and the model predictions in the second, in the same order.
  2. Optionally enter the number of predictors to get the residual standard error.
  3. 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

SSE=∑i=1n(yi−y^i)2SSE=\sum_{i=1}^{n}(y_i-\hat{y}_i)^2

Mean squared error and RMSE

MSE=SSEn,RMSE=MSEMSE=\frac{SSE}{n},\quad RMSE=\sqrt{MSE}

Total sum of squares

SST=∑(yi−yˉ)2SST=\sum (y_i-\bar{y})^2

Coefficient of determination

R2=1−SSESSTR^2=1-\frac{SSE}{SST}

Residual standard error

se=SSEn−p−1s_e=\sqrt{\frac{SSE}{n-p-1}}

Sum of Squared Errors Variables Explained

SymbolMeaningNotes
SSESum of squared errorsΣ (yᵢ − ŷᵢ)²
yᵢActual value
ŷᵢPredicted value
nNumber of pairs
SSTTotal sum of squaresΣ (yᵢ − ȳ)²

Sum of Squared Errors Worked Example

Using the example values (press “Load example” above to try them):

  1. For each pair compute the error e = y − ŷ.
  2. Square every error and add them up (see the table).
  3. SSE = Σ(y − ŷ)² = 0.59.
  4. MSE = SSE ÷ n = 0.59 ÷ 6 = 0.0983333; RMSE = √MSE = 0.313581.
  5. 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.

Common names for the same quantities
QuantityMeaningAlso 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.

Which error metric to look at
MetricBest forSensitivity to outliers
SSEModel fitting, ANOVAHigh
MSE / RMSEComparing models on the same data, penalising big missesHigh
MAETypical absolute miss, easy to explainLow
R²Share of variation explainedHigh

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.

Related calculators

Last updated 2026-11-09. See our disclaimer.