Part of the Math & Statistics suite · 235 calculators

Sum of Squares Calculator

The total, within and residual sums of squares — the quantity every variance, regression and ANOVA is built on.

The sum of squares is Σ(xᵢ − x̄)², the total squared distance of the data from its mean.

Comma-separated
Results update as you type
Results
Sum of squares about the mean
910
Σx (sum)
Σx² (sum of squared values)
Correction term (Σx)²/n
Mean
Sample variance (SS ÷ n−1)
Population variance (SS ÷ n)
Count
Reviewed September 2026. Pure mathematics: the result does not depend on where you are. Terminology follows US usage (math, parentheses, decimal point).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About sum of squares

How the sum of squares calculator works

The sum of squares is Σ(xᵢ − x̄)², the total squared distance of the data from its mean. Divide by n − 1 and you have the variance; take the root and you have the standard deviation.

It matters because it *decomposes*: the total sum of squares splits exactly into the part a model explains and the part it does not, which is what makes R², ANOVA and the whole of regression possible.

Formula: SS = Σ(xᵢ − x̄)² = Σxᵢ² − (Σxᵢ)²/n

Worked examples

InputsSum of squares about the meanNote
4, 8, 15, 16, 23, 42910SS = 910.83
Identical values0SS = 0
1, 2, 32SS = 2

Frequently asked questions

What is the sum of squares?

The total squared distance of the data from its mean — the raw material of every variance calculation.

Why square the deviations?

Because they sum to exactly zero otherwize. Squaring removes the sign and gives an algebra that decomposes cleanly.

What is the computational formula?

Σx² − (Σx)²/n. It avoids computing the mean first, though it loses precision on large numbers — which is why software rarely uses it now.

How does it relate to variance?

Variance is SS ÷ (n − 1) for a sample, or SS ÷ n for a population.

Why does it matter for regression?

Because total SS splits exactly into explained plus residual. R² is the explained share, and that decomposition is the whole of ANOVA.

Where these figures come from

Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.