Function · Math

Excel SUMSQ function

The Excel SUMSQ function adds the squares of its arguments. Forecast misses of $50, -$120, $75, and $200 on March 2026 Mondays square and add to 62,525.

All current Excel versions, including Microsoft 365, Excel 2024, Excel 2021, Excel 2019, and Excel for the web. Also in Google Sheets.

Syntax =SUMSQ(number1, [number2], ...)

SUMSQ
=SUMSQ(B2-C2,B3-C3,B4-C4,B5-C5)

Arguments

NameRequiredWhat to pass
number1RequiredThe first number, cell, or range. SUMSQ squares each number and adds those squares. A range such as D2:D5 is one argument.
number2OptionalMore numbers or ranges, up to 255 arguments. Text and blanks in a range are ignored. The word tax typed as its own argument is

Examples

3 and 4, and a 3/2/2026 order of $12, $5, and $9

=SUMSQ(3,4)

Result 25

Sum of squared forecast misses on four Mondays

=SUMSQ(B2-C2,B3-C3,B4-C4,B5-C5)

Result 62525

Sample variance of four utility bills, from the squared distances

=SUMSQ(32.0125,-15.3875,6.8625,-23.4875)

Result 1860.331875

Text in the range is skipped, and text typed as an argument is an error

=SUMSQ(B2:B6)

Result 250

=SUMSQ(B2-C2,B3-C3,B4-C4,B5-C5)C6
Forecast
ABC
1DateActualForecast
23/2/202612501200
33/9/20269801100
43/16/202614751400
53/23/202621001900
6Sum of squares62525
A picture of the sheet, not a live calculator. The misses are actual minus forecast. 62,525 is the sum of the squared misses, in dollars squared.

SUMSQ squares each number and adds those squares. =SUMSQ(3, 4) is 25, which is 9 + 16. That is Microsoft’s sample. On 3/2/2026 an order of $12, $5, and $9 gives =SUMSQ(12, 5, 9), which is 144 + 25 + 81 = 250.

Four Monday forecasts, dated 3/2/2026, 3/9/2026, 3/16/2026, and 3/23/2026, miss the actual sales by $50, −$120, $75, and $200. =SUMSQ(B2-C2,B3-C3,B4-C4,B5-C5) is 2,500 + 14,400 + 5,625 + 40,000 = 62,525. The result is in dollars squared. SUMXMY2 of the actual column and the forecast column returns the same 62,525.

The four utility bills dated 1/15/2026, 2/15/2026, 3/15/2026, and 4/15/2026 are $143.60, $96.20, $118.45, and $88.10. They average $111.5875. The distances from that mean are 32.0125, −15.3875, 6.8625, and −23.4875. =SUMSQ(32.0125,-15.3875,6.8625,-23.4875) is 1,860.331875. Divide by 3 and the sample variance is 620.110625, which is VAR.S. Divide by 4 and the population variance is 465.08296875, which is VAR.P. SQRT of the sample variance is 24.9020205, which is STDEV.S for these bills. SQRT of the population variance is 21.56578236, which is STDEV.P. DEVSQ of the four bills is the same 1,860.331875. The z-score LAMBDA divides January’s distance from this mean by that sample standard deviation.

A range skips text and blanks. =SUMSQ(B2:B6) on $12, $5, the word tax, a blank, and $9 returns 250. A cell that stores the characters 5 as text is skipped too, so SUMSQ of 12, that text, and 9 is 225. Type the word as its own argument and the result is #VALUE!. =SUMSQ(12, 5, "tax") is #VALUE!. A logical value typed as an argument is counted. TRUE is 1, so =SUMSQ(3, 4, TRUE) is 26. FALSE is 0, so =SUMSQ(3, 4, FALSE) is 25. Microsoft’s SUMSQ page says a TRUE or FALSE sitting in the range is ignored, the same way the word tax is.

You can pass up to 255 arguments. A range counts as one of them. SUM adds the numbers themselves and skips text in a range. SUMPRODUCT multiplies aligned rows and then adds, and text inside a range it is multiplying is #VALUE!. =SUMSQ(1/0) is #DIV/0!. The error comes from the argument.

SUMSQ is in every current Excel version, including Microsoft 365, Excel 2024, Excel 2021, Excel 2019, and Excel for the web. Google Sheets has it too.