Sum of Squares Calculator

The sum of squares (SS) adds up the squared distance of every value from the mean. It is the numerator of the variance and the building block of ANOVA and regression. Paste your data to get SS with the full table and the shortcut formula.

5 values read.

Sum of squares SS
50
Σx²
295
(Σx)² ÷ n
245
Mean
7
Sample variance
12.5
Count
5
±1 SD4681012
▲ mean 7 · ◆ median 6 · shaded band = mean ± 1 SD (3.4645 to 10.5355)

Step-by-step working

  1. Add the values and divide by the count to get the meanx̄ = (3 + 5 + 6 + 9 + 12) ÷ 5 = 35 ÷ 5 = 7
  2. Definition: add the squared deviations from the meanSS = Σ(x − x̄)² = 50
  3. Shortcut (same answer): Σx² − (Σx)² ÷ n295 − 35² ÷ 5 = 295 − 245 = 50
Deviation table
xx − x̄(x − x̄)²
3−416
5−24
6−11
924
12525
Σx = 35≈ 0SS = 50

Formula SS = Σ(x − x̄)² = Σx² − (Σx)² ÷ n

Ask the tutor about your result

An AI tutor reads your inputs and results above and explains them in plain English. The numbers come from the calculator; the explanation is AI-written, so check it against your notes.

See why standard deviation works

Drag any dot (or focus it and use ← →). Each square’s side is that value’s distance from the mean, so its area is the squared deviation. Standard deviation is the side of the “average” square.

012345678910mean 5.17

Σ(x − x̄)² = 10.03 + 1.36 + 1.36 + 0.03 + 3.36 + 14.69 = 30.83
s = √(30.83 ÷ 5) = 2.48

Why n − 1? A sample’s values sit closer to their own mean than to the true population mean, so squared deviations from x̄ run slightly small. Dividing by one less (Bessel’s correction) makes the variance unbiased. Notice the difference shrinks as n grows.

Two ways to calculate SS

Definition: find the mean, subtract it from each value, square, and add. Computational shortcut: add the squares of the raw values (Σx²), then subtract the square of the total divided by n. Both give the same answer; the calculator shows both so you can check whichever your course uses.

Divide SS by n − 1 to get the sample variance, or by N for the population variance.

Sum of squares in regression and ANOVA

In regression the total sum of squares splits into the part explained by the line and the residual part (SST = SSR + SSE), and r² = SSR ÷ SST. ANOVA splits it into between-group and within-group pieces. The linear regression calculator shows the residuals.

Frequently asked questions

Is the sum of squares the same as Σx²?

Not quite. Σx² is the sum of the raw squared values. The statistical sum of squares is the sum of squared deviations from the mean, which equals Σx² − (Σx)² ÷ n.

Why can the sum of squares never be negative?

Every term is a square, so each is zero or positive.

What is the sum of squares used for?

Variance, standard deviation, ANOVA, regression (r² and the standard error of the estimate) and least-squares fitting all start from it.