Sum of Squares Calculator

This sum of squares calculator turns your numbers into the sum of squared deviations, the sum of raw squares and the variance. Example: for 3, 5, 7, 9, 11 the result is Σ(x − x̄)² = 40 and Σx² = 285.

Source: Wikipedia – Quadratsumme. Updated: .

Separate with spaces or semicolons.
My ToolboxYour inputs are saved in this browser only.

Result

Result
Sum of squares Σ(x − x̄)² = 40 (mean 7, n = 5)
All values
QuantityValue
Count n5
Sum Σx35
Mean x̄7
Sum of squared deviations Σ(x − x̄)²40
Sum of squares Σx²285
Sample variance s² (n − 1)10
Population variance σ² (n)8
Calculation steps
  • Mean: x̄ = Σx / n = 35 / 5 = 7.
  • Deviations x − x̄: -4; -2; 0; 2; 4.
  • Square and add: Σ(x − x̄)² = 40.
  • Check with the computational formula: Σx² − (Σx)² / n = 285 − 35² / 5 = 40.
  • Variance: s² = 40 / 4 = 10 (sample), σ² = 40 / 5 = 8 (population).
The sum of squares about the mean underlies variance, standard deviation, analysis of variance and regression. It is never negative and is 0 only when all values are equal.

How it is calculated

The sum of squares measures the total spread of a data set around its mean by adding up all the squared deviations. In statistics it is also written SS or SST and shows up everywhere, from variance to regression.

Formulas

The sum of squares about the mean is SS = Σ(x − x̄)². The computational formula SS = Σx² − (Σx)² / n is more convenient because it needs only the sum and the sum of squares. Dividing SS by n − 1 gives the sample variance, dividing by n the population variance. The calculator shows both routes and compares them as a check.

Example

For 3, 5, 7, 9, 11 the mean is 7. The deviations are −4, −2, 0, 2, 4, their squares 16, 4, 0, 4, 16 with sum 40. Check: Σx² = 9 + 25 + 49 + 81 + 121 = 285, and 285 − 35² / 5 = 285 − 245 = 40. The variance is 40 / 4 = 10 for a sample and 40 / 5 = 8 for a population.

Frequently asked questions

What is the sum of squares?

The sum of the squared deviations of all values from the mean: Σ(x − x̄)². It measures the total spread of the data.

What is the difference between Σx² and Σ(x − x̄)²?

Σx² squares the raw values, Σ(x − x̄)² squares the deviations from the mean. They are linked by SS = Σx² − (Σx)² / n.

How do I get from the sum of squares to the variance?

Divide by n − 1 for a sample or by n for a population. With 40 and n = 5 that gives 10 and 8.

Sources and legal basis

As of: · Editorial policy

Related tools