SUMSQ Function in ONLYOFFICE Spreadsheet Editor: Syntax, Examples and Troubleshooting
Learn SUMSQ in ONLYOFFICE: sum squares for magnitudes, distance and score calculations, with exact inputs and documented limits.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =SUMSQ(3,4) has the independently expected result 25, because it adds 3² and 4². It does not square their sum: (3+4)² is 49, a different calculation.
Availability and version history
- Introduced: The original introduction release and date are not established by the checked sources.
- Availability: Currently documented in ONLYOFFICE’s rolling function help; no final supported-version endpoint is established.
- Scope: Shared Spreadsheet Editor documentation. Exact historical availability and parity across individual Docs, Desktop and mobile builds remain unverified.
- Checked: October 14, 2026, against the official SUMSQ reference. Formula meanings and example outputs were independently checked; no native test of these cases was performed.
Syntax and documented limits
=SUMSQ(number1, [number2], ...)
The first numeric argument is required; further arguments are optional. The brackets indicate optional syntax and are not typed. The official entry describes up to 255 numeric values. It does not establish a separate 255-cell maximum for a referenced range or a detailed mixed-type/error table.
Each numeric input is squared before addition, so negative values contribute nonnegative terms. Use SUMSQ for squared magnitudes or explicitly constructed deviations. Use SUM when the original signs should participate in an ordinary total.
Preserve the original six numeric observations
Create a blank sheet named Squares. Put Observation in A1 and enter 3,4,-2,0,1.5,-0.5 in A2:A7. These are numbers, not quoted text.
Enter x, y and z in C1:E1. Put 0,0,0 in C2:E2 and 3,4,12 in C3:E3. These are the two endpoints for the original three-dimensional distance example.
Use G for result labels and H for the following formulas. Each formula has its own result cell, outside both input blocks.
| Cell | Formula | Independent target |
|---|---|---|
| H2 | =SUMSQ(A2:A3) |
25 |
| H3 | =SUMSQ(A2,A3,A4) |
29 |
| H4 | =SUMSQ(A4) |
4 |
| H5 | =SUMSQ(A2:A5) |
29 |
| H6 | =SUMSQ(A6:A7) |
2.5 |
| H7 | =SUMSQ(1,2,3) |
14 |
| H8 | =SUMSQ(A2:A3,A4) |
29 |
| H9 | =SUMSQ(A4,A4) |
8 |
| H10 | =SUMSQ(A2:A3)+SUMSQ(A4) |
29 |
| H11 | =POWER(A2,2)+POWER(A3,2) |
25 |
| H12 | =SQRT(SUMSQ(A2:A3)) |
5 |
| H13 | =SUM(A2:A3)^2 |
49 |
| H14 | =SQRT(SUMSQ(C3-C2,D3-D2,E3-E2)) |
13 |
H6 adds 2.25 and 0.25. H9 counts the same -2 reference twice, so it adds 4+4. Repeating an argument does not deduplicate it. H11 checks the first pair using POWER, while H12 uses SQRT to turn a squared magnitude into a length.
For a visible per-row check, put Square in B1 and =A2^2 in B2; fill through B7. Expected values are 9,16,4,0,2.25,0.25. Put =SUM(B2:B7) in H16 and =SUMSQ(A2:A7) in H17; both targets are 31.5.
Advanced: distance between points away from the origin
Keep the Squares worksheet unchanged. Create a separate sheet named TranslatedPoints. Put x, y and z in A1:C1, then enter 10,20,30 in A2:C2 and 13,24,42 in A3:C3.
In E2 enter =SUMSQ(A3-A2,B3-B2,C3-C2); expect 169. In E3 enter =SQRT(E2); expect 13. The differences remain 3,4,12, exactly as in the original distance example, despite shifting both endpoints.
In E4 enter =SUMSQ(A3:C3); expect 2509. That is the squared distance of the second endpoint from the origin, not the squared distance between the two points. Subtract coordinates first when the problem concerns separation between endpoints.
The coordinate units must be compatible. Combining one coordinate in metres with another in centimetres without conversion does not produce the intended geometric distance even though the arithmetic is valid.
Sum of squares is not automatically variance
SUMSQ of raw observations measures squared magnitude about zero. A variance calculation instead needs deviations from a chosen mean and an appropriate population or sample denominator. Passing raw observations to SUMSQ does not make those choices for you.
Similarly, an amplitude sum of squares is not automatically a calibrated physical energy measurement. Sampling interval, units and the measurement model may require additional factors. Keep the mathematical quantity and its application label consistent.
Errors, settings and related functions
The short SUMSQ entry does not specify every response to blank cells, numeric text, booleans, input errors or extremely large values. Check actual stored numeric types and avoid assigning undocumented error codes. Squaring can magnify values and precision problems; no exact overflow threshold is established by that page.
The examples use English names, commas and decimal points. ONLYOFFICE’s advanced settings describe formula language and regional number settings; a visually numeric imported string is not necessarily a number. Same-named functions elsewhere do not guarantee identical coercion or workbook round trips.
SUMX2PY2 adds paired x²+y² contributions. SUMX2MY2 sums signed differences of squares, and SUMXMY2 subtracts corresponding values before squaring. Placement of the square changes the question being answered.