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.
Syntax =SUMSQ(number1, [number2], ...)
=SUMSQ(B2-C2,B3-C3,B4-C4,B5-C5)Arguments
| Name | Required | What to pass |
|---|---|---|
| number1 | Required | The first number, cell, or range. SUMSQ squares each number and adds those squares. A range such as D2:D5 is one argument. |
| number2 | Optional | More 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
| A | B | C | |
|---|---|---|---|
| 1 | Date | Actual | Forecast |
| 2 | 3/2/2026 | 1250 | 1200 |
| 3 | 3/9/2026 | 980 | 1100 |
| 4 | 3/16/2026 | 1475 | 1400 |
| 5 | 3/23/2026 | 2100 | 1900 |
| 6 | Sum of squares | 62525 |
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.