The SUMSQ function returns the sum of the squares of all values.
This can be useful when you need to quickly obtain the sum of squares of numbers, which can be used in statistics and other mathematical calculations.
Syntax
SUMSQ(value1, [value2, ... ])
Argument |
Description |
Permitted values |
|---|---|---|
value1 |
First number, range, or array for which the sum of squares needs to be calculated |
Any numerical ranges or arrays |
[value2, ...] |
(optional) Additional numbers, ranges, or arrays whose sum of squares must be added to the sum of squares of the first argument |
Similar to the first argument |
Examples of use
Calculating the sum of the squares of several numbers
=SUMSQ(2, 3, 4)
This formula will return 29, since 2×2+3×3+4×4=29.
Calculating the sum of squares in a range of cells
=SUMSQ(A1:A3)
If cells A1, A2, and A3 contain the values 1, 2, and 3, the formula will return 14.
Using an array and a constant
=SUMSQ(A1:A3, 5)
If A1, A2, and A3 contain 1, 2, and 3, the formula will return 39.
Notes
The SUMSQ function ignores text values and empty cells in the range.