You can use the SUMSQ function in Google Sheets to calculate the sum of squares for a given sample.
This function uses the following basic syntax:
=SUMSQ(value1, value2, value3, ...)
Here’s the formula that SUMSQ actually uses:
Sum of squares = Σxi2
where:
- Σ: A fancy symbol that means “sum”
- xi: The ith data value
The following example shows how to use this function in practice.
Example: How to Use DEVSQ in Google Sheets
Suppose we have the following dataset in Google Sheets:
We can use the following formula to calculated the sum of squares for this dataset:
=SUMSQ(A2:A13)
The following screenshot shows how to use this formula in practice:
The sum of squares turns out to be 1,402.
We can confirm this is correct by manually calculating the sum of squares for this dataset:
- Sum of squares = Σxi2
- Sum of squares = 22 + 32 + 52 + 52 + 72 + 82 + 92 + 122 + 142 + 152 + 162 + 182
- Sum of squares = 4 + 9 + 25 + 25 + 49 + 64 + 81 + 144 + 196 + 225 + 256 + 324
- Sum of squares = 1,402
The sum of squares turns out to be 1,402.
This matches the value that we calculated using the SUMSQ function.
Additional Resources
The following tutorials explain how to perform other common operations in Google Sheets:
How to Use DEVSQ in Google Sheets
How to Use SUMIF with Multiple Columns in Google Sheets
How to Sum Across Multiple Sheets in Google Sheets