Sum of Squares Calculator

Quick answer

The sum of squares calculator finds the total of the squared deviations from the mean, Σ(x − x̄)², for a list of numbers, along with the raw sum of squared values Σx², the mean, the variance and standard deviation, and a table of every deviation.

Sum of squares Σ(x − x̄)²
54
Sum of squared values Σx²
659
Sum Σx
55
Mean x̄
11
Number of values
5
Sample variance SS ÷ (n − 1)
13.5
Population variance SS ÷ n
10.8
Sample standard deviation
3.674235
Dot plot of the data
Deviation table
# x x − x̄ (x − x̄)² ─────────────────────────── 1 6 −5 25 2 9 −2 4 3 11 0 0 4 14 3 9 5 15 4 16 Σ 55 0 54 Mean x̄ = 55 ÷ 5 = 11 Sum of squares SS = 54 Sample variance s² = SS ÷ (n − 1) = 54 ÷ 4 = 13.5 Population variance σ² = SS ÷ N = 54 ÷ 5 = 10.8 Sample SD s = √s² = 3.674235 · Population SD σ = √σ² = 3.286335 Standard error SE = s ÷ √n = 3.674235 ÷ 2.236068 = 1.643168

The sum of squares (SS) is the raw material of almost every measure of spread and every least-squares method. It adds up how far each value lies from the mean, after squaring so that values below and above the mean do not cancel. Divide it by n − 1 and you have the sample variance; take a square root and you have the standard deviation.

In regression and analysis of variance the total sum of squares is split into parts: the part explained by the model (regression or between-group SS) and the part left over (residual or within-group SS). Comparing those parts gives R² and the F statistic. That is why statistical output is full of SS columns.

Do not confuse SS with the plain “sum of squared values” Σx², which adds the squares of the numbers themselves without subtracting the mean. Both are shown here, because the shortcut formula SS = Σx² − (Σx)² ÷ n links them – handy on a calculator, though it can lose precision with very large numbers.

How to use the Sum of Squares Calculator

  1. Data

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

How it works

Enter your numbers. The calculator finds the mean, subtracts it from every value, squares each deviation and adds them. It also reports Σx² and the variance and standard deviation that follow from SS.

Worked example

For 6, 9, 11, 14 and 15 the sum is 55 and the mean 11. The deviations −5, −2, 0, 3 and 4 square to 25, 4, 0, 9 and 16, so SS = 54. The shortcut gives the same: Σx² = 36 + 81 + 121 + 196 + 225 = 659, and 659 − 55² ÷ 5 = 54. The sample variance is 54 ÷ 4 = 13.5 and the standard deviation √13.5 = 3.674.

Where sums of squares appear

Method Sum of squares used What it gives
Variance SS of one variable s² = SS ÷ (n − 1)
Regression SST = SSR + SSE R² = SSR ÷ SST
One-way ANOVA SS between + SS within F = MS between ÷ MS within
Model error SSE MSE = SSE ÷ n

Formula

SS = Σ(xᵢ − x̄)² = Σxᵢ² − (Σxᵢ)² ÷ n · sample variance = SS ÷ (n − 1) · population variance = SS ÷ n

Worked example

Inputs — Data: 6, 9, 11, 14, 15.
Results — Sum of squares Σ(x − x̄)² = 54; Sum of squared values Σx² = 659; Sum Σx = 55; Mean x̄ = 11; Number of values = 5; Sample variance SS ÷ (n − 1) = 13.5.

Key terms

Sum of squares (SS)
Σ(x − x̄)², the total squared deviation from the mean.
Deviation
A value minus the mean.
Partition of the sum of squares
Splitting the total SS into explained and unexplained parts in regression or ANOVA.

Frequently asked questions

How do I calculate the sum of squares?

Find the mean, subtract it from each value, square the results and add them. For 20, 22 and 18 the mean is 20 and SS = 0 + 4 + 4 = 8.

What is the shortcut formula?

SS = Σx² − (Σx)² ÷ n. For 6, 9, 11, 14, 15: 659 − 55² ÷ 5 = 659 − 605 = 54.

What is the difference between the sum of squares and the standard deviation?

SS is a total in squared units that grows with every value; the standard deviation √(SS ÷ (n − 1)) is an average spread in the original units.

What are SST, SSR and SSE?

In regression, the total sum of squares (SST) splits into the regression sum of squares (SSR, explained) and the error sum of squares (SSE, unexplained): SST = SSR + SSE, and R² = SSR ÷ SST.

Can the sum of squares be negative or zero?

Never negative. It is zero only when every value equals the mean.

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

No. Σx² adds the squared values themselves; the sum of squares subtracts the mean first. They are equal only when the mean is 0.

Sources

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

Cite this calculator

Speedy Calculator. (2026). Sum of Squares Calculator. Speedy Calculator. https://speedycalculator.com/calculators/statistics/sum-of-squares/