SUMSQ
Returns the sum of the squares of its arguments. Often used in statistics, regression and least-squares calculations.
SUMSQ(number1, [number2], ...)Arguments
number1The first number or range to be squared and summed.number2Optional. Additional numbers or ranges (up to 255).(optional)
=SUMSQ(3,4)3² + 4² = 9 + 16 = 25
=SUMSQ(A1:A3)Sum of squares of cells A1, A2, A3
- •Empty cells, logical values and text in ranges are ignored
- •Useful for computing variance, standard deviation by hand, magnitudes
- •For sum of squared differences, use SUMXMY2 instead
- •Confusing SUMSQ (sum of squares) with SUMXMY2 (sum of squared differences) - SUMSQ squares and adds values within a single set, while SUMXMY2 first subtracts pairs of values from two sets and then squares and sums the differences
- •Expecting SUMSQ to ignore negative numbers the way it might seem to given the squaring operation - it does include them, since squaring a negative number still produces a positive contribution to the sum
- •Forgetting that text and logical values within a range are silently ignored rather than causing an error, which can mask a data entry mistake if a number was accidentally typed as text
SUMXMY2Calculates the sum of squared differences between two paired sets of values, a related but distinct calculation from SUMSQ's single-set sum of squares.SUMPRODUCTCan replicate SUMSQ's behavior with SUMPRODUCT(range,range), though SUMSQ is more direct and readable for this specific case.STDEVUses sum-of-squares calculations internally as part of computing standard deviation, a common downstream use of what SUMSQ calculates.What's the difference between SUMSQ and SUMXMY2?
SUMSQ squares and adds every value within one set of numbers. SUMXMY2 takes two paired sets, subtracts corresponding values first, and then squares and sums those differences - a completely different calculation despite the similar-sounding names.
Does SUMSQ treat negative numbers specially?
No, but since every number gets squared before adding, both positive and negative inputs of the same magnitude contribute identically and positively to the total.
Why doesn't SUMSQ raise an error when my range includes some text?
SUMSQ silently ignores text and logical values in a range rather than erroring - this is convenient in most cases, but can hide a genuine data entry mistake if a number was accidentally entered as text.
Need to translate a formula using SUMSQ?
Use our translator to convert your complete formula
