What Is the Sum of Squares?
The sum of squares (SS) measures the total squared deviation of each data point from the mean of the data set. It is a foundational quantity in statistics, used to compute variance, standard deviation, regression, and analysis of variance (ANOVA). A larger sum of squares indicates that the values are more spread out around the average, while a value of zero means every data point is identical.
How to Use This Calculator
Enter your numbers separated by commas or spaces (for example 4, 8, 15, 16, 23, 42) and the calculator returns the sum of squares along with the count, sum, mean, population variance, and sample variance. There is no limit on the type of values — use integers, decimals, or negative numbers.
The Formula Explained
The sum of squares is defined as $$SS = \sum_{i=1}^{n}\left(x_i - \bar{x}\right)^2$$ First, find the mean \(\bar{x}\) by dividing the sum of all values by the count \(n\). Then subtract the mean from each value to get its deviation, square each deviation, and add them all up. Squaring makes every deviation positive and gives larger weight to points that are farther from the mean.
Worked Example
Take the values 2, 4, 6, 8. The mean is \((2 + 4 + 6 + 8) / 4 = 5\). The deviations are \(-3, -1, 1, 3\), and their squares are \(9, 1, 1, 9\). Adding these gives \(SS = 20\). Dividing by \(n = 4\) gives a population variance of \(5\), and dividing by \(n - 1 = 3\) gives a sample variance of about \(6.67\).
FAQ
Is sum of squares the same as variance? No. Variance is the sum of squares divided by \(n\) (population) or \(n - 1\) (sample). SS is the unscaled total.
Can the sum of squares be negative? No. Because each deviation is squared, every term is zero or positive, so SS is always \(\geq 0\).
Should I use population or sample variance? Use sample variance (\(SS / (n - 1)\)) when your data is a sample drawn from a larger population; use population variance (\(SS / n\)) when your data represents the entire population.