Math & Trig

SUMSQ Formula

SUMSQ calculates the sum of the squares of its arguments. It's commonly used in statistical analysis, such as computing the sum of squared deviations, or in physics and engineering when you need the magnitude of a vector. Instead of writing =A1^2+A2^2+A3^2, SUMSQ does it in one step.

Syntax

SUMSQ(number1, [number2, ...])
ParameterDescription
number1 Parameter of the SUMSQ function.
[number2 (Optional.) Parameter of the SUMSQ function.
...] Parameter of the SUMSQ function.
Try SUMSQ in Viztab — free, no signup

Examples

Vector magnitude squared

Formula
=SUMSQ(3, 4)
Returns 25 (3²+4² = 9+16). This is the squared length of a 3-4-5 right triangle's hypotenuse.

Sum of squared residuals

Formula
=SUMSQ(A2:A10)
Returns the sum of each value squared. If A2:A10 contains residuals from a regression, this gives the total squared error.

Multiple arguments

Formula
=SUMSQ(2, 5, 7)
Returns 78 (4+25+49). You can pass individual values or mix ranges and values.

Common Errors

#VALUE!

Occurs when any argument is text that cannot be converted to a number, such as =SUMSQ("abc").

#NUM!

Occurs if the result is too large for the spreadsheet to handle (extremely rare with normal data).

Tips

Use with SQRT for distance

Combine with SQRT to calculate Euclidean distance: =SQRT(SUMSQ(x2-x1, y2-y1)) gives the straight-line distance between two points.

Statistical shortcut

For variance calculations, SUMSQ of deviations from the mean is faster than squaring each value individually. Pair it with AVERAGE and COUNT.

Accepts ranges and values

You can mix cell ranges and literal numbers: =SUMSQ(A1:A5, 10) squares each cell in A1:A5 plus 10² and sums them all.

Try SUMSQ in Viztab

Import your data and use SUMSQ with 370+ other formulas. No signup required.

Open Viztab

Related Formulas