SUMSQ in Google Sheets: Sum Squares, Residuals and Vector Lengths
Calculate Sheets SUMSQ from explicit numeric ranges, distinguish the square of a sum, and build checked residual and root-mean-square examples.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: SUMSQ squares each supplied number and adds those squares. For -2, 3, 0, 4, the result is 29, from 4+9+0+16. This differs from squaring their sum: the sum is five, whose square is 25.
Availability and version history
- Introduced: first service launch date is not established by the official history reviewed; no numbered desktop introduction is assigned.
- Availability: documented in the rolling Google Sheets service. Examples target ordinary web-spreadsheet cells; mobile clients and imported file modes are not separately certified.
- Checked: October 14, 2026; official SUMSQ reference. Documentation and independently calculated examples, without native Sheets execution.
Syntax and argument scope
=SUMSQ(value1, [value2, ...])
The first number or range is required; later numbers or ranges are optional. A single supplied number is squared. Google explicitly says Sheets supports an arbitrary number of arguments despite the older 30-argument specification. No runtime or maximum practical workload was measured for this guide.
The official page defines the numeric operation without a full text, Boolean, blank or error policy. Every worked range below is explicitly numeric, so no other application’s coercion rules are needed.
Example 1: verify each squared contribution
Enter A2:A5 as -2, 3, 0, 4. In B2 enter =A2^2 and copy through B5. The expected squared contributions are 4, 9, 0, 16.
=SUMSQ(A2:A5)
=SUM(B2:B5)
=SUM(A2:A5)^2
The expected outputs are 29, 29 and 25. The first two formulas describe the same sum of squares. The last squares the combined sum and therefore contains cross terms that the first two do not.
For a direct scalar control, =SUMSQ(-7) has expected result 49. A negative input can contribute a positive square; a sum of real squares cannot be negative in exact arithmetic.
Example 2: calculate a vector length
=SQRT(SUMSQ(3,4))
Expected result: 5. SUMSQ supplies 9+16=25, and SQRT takes its nonnegative square root. SUMSQ by itself returns the squared length, not the length.
For the four components in A2:A5, =SQRT(SUMSQ(A2:A5)) is approximately 5.385164807. Keep all components in compatible units before interpreting that value as a distance. Adding squared meters and squared seconds would not form an ordinary geometric length.
Advanced example: compare predictions with observations
Create D1:F4:
| Row | D · Observed | E · Predicted | F · Residual |
|---|---|---|---|
| 2 | 10 | 9 | =D2-E2 |
| 3 | 12 | 14 | =D3-E3 |
| 4 | 8 | 8 | =D4-E4 |
The residuals are 1, -2, 0. Then use:
=SUMSQ(F2:F4)
=SQRT(SUMSQ(F2:F4)/3)
Expected results: 5 and approximately 1.290994449. The second is the root mean square of these three residuals. Dividing by three is explicit because all three supplied observations are numeric and equally weighted.
The ordinary residual sum is -1. Opposite signs can cancel in that sum; squaring prevents cancellation but also discards the direction of each error. Keep the signed residual column when direction matters.
Advanced example: center the data before describing variation
In H2:H4 enter numeric 2, 4, 6. Their mean is four. In I2 enter =H2-AVERAGE($H$2:$H$4) and fill to I4, giving -2, 0, 2.
=SUMSQ(H2:H4)
=SUMSQ(I2:I4)
Expected results are 56 and 8. The first measures squares relative to zero; the second measures squares of deviations from the mean. Calling 56 a centered variation total would answer a different question.
For this complete three-observation population, dividing the centered total by three gives approximately 2.666666667. A sample estimator can use a different denominator; choosing that statistical model is separate from SUMSQ’s arithmetic.
Scaling and reference checks
Doubling every value in A2:A5 multiplies its sum of squares by four: the expected total becomes 116, not 58. Negating every value leaves the expected total at 29. These are useful finite controls for a copied calculation.
Repeating a reference contributes its square again. =SUMSQ(A2:A5,A2) has expected result 33, because A2’s square of four is included twice. Overlapping blocks are not deduplicated.
Troubleshooting
Confirm that the intended column contains numbers, that residual formulas subtract in a consistent order, and that a square root is applied only when the requested quantity requires it. The selected Google reference does not certify every native error code, range-error treatment or mixed-type case, and no such behavior is inferred here.
References and verification
Inputs are fictional. Approximate answers are independent mathematical expectations rounded to nine places, not captured native results. Complete type/error matrices, extreme-magnitude accuracy and cross-client behavior remain untested.