How to use this sum of squares calculator
Paste your values above and press Calculate. The deviation table shows every squared deviation, and the total at the bottom is the sum of squares (SS), displayed with the mean it was built around.
The total that everything else divides
Sum of squares sounds humble (add up the squared distances from the mean), but it is the raw material of half of statistics. Divide it by its degrees of freedom and you have a variance. Split it into pieces and you have ANOVA. Compare the pieces and you have regression's R². Almost every inferential road starts at this total.
Four values: 3, 5, 7, 9. Mean = 6. Deviations: −3, −1, 1, 3. Squared: 9, 1, 1, 9. SS = 20. From here the sample variance is 20 ÷ 3 ≈ 6.67 and the population variance is 20 ÷ 4 = 5, the same total, divided two ways for two purposes.
The shortcut formula (and why to be careful)
SS can also be computed as Σx² − (Σx)²/n, handy when only summaries survive. With a calculator in hand the deviation form is safer: the shortcut can suffer catastrophic rounding when values are huge and close together (think 1,000,001 and 1,000,002), because it subtracts two giant nearly-equal numbers. Software that computes SS in two passes (mean first, then deviations) avoids the trap, and that is what this page does.
Frequently asked questions
What is the sum of squares used for?
It is the numerator of variance and standard deviation, and the quantity ANOVA and regression partition into explained and unexplained parts.
What is the difference between sum of squares and variance?
Variance is the sum of squares divided by its degrees of freedom (n − 1 or N). SS itself is the un-divided total of squared deviations.
Can sum of squares be zero?
Only when every value equals the mean, that is, when all values are identical.