SUMXMY2 in ONLYOFFICE: Sum of Squared Differences
Measure paired numeric differences using ONLYOFFICE SUMXMY2, with exact sample tables, MSE, RMSE and common mistakes.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in ONLYOFFICE Spreadsheet Editor. How formula examples are checked
Quick answer. SUMXMY2(array_x, array_y) computes Σ(x−y)² for two equally shaped arrays. With the five numeric pairs below, =SUMXMY2(A2:A6,B2:B6) has an independently calculated expected value of 58. Each pair is subtracted before squaring.
Verification: Examples are independently calculated mathematical expectations, not results observed in ONLYOFFICE.
What the official reference establishes
ONLYOFFICE’s SUMXMY2 reference calls this a math-and-trigonometry function and documents:
=SUMXMY2(array_x, array_y)
| Argument (position) | Required? | Type and role stated by ONLYOFFICE | Default |
|---|---|---|---|
array_x (1) |
Yes | First cell range/array supplying x values | None documented |
array_y (2) |
Yes | Second cell range/array supplying y values; same number of rows and columns as array_x |
None documented |
Exactly two arguments are documented. The order is array_x, then array_y; swapping the two arrays leaves the mathematical result unchanged. The reference does not specify optional arguments, blank/text coercion, numeric precision or explicit shape-error codes. Example formula notation uses English function names and comma-separated arguments.
Shared worksheet: copyable, paired numeric inputs
Open a blank workbook, use English formula language for these examples, and put the following numeric values in A1:B6. The extra C–E columns below show independently calculated row-level checks; they are not input requirements.
A1: x, B1: y. Enter each row’s A and B numbers exactly as shown (including the negative and decimal values):
| Row | A (x) | B (y) | C (x² − y²) | D (x² + y²) | E ((x − y)²) |
|---|---|---|---|---|---|
| 2 | 2 | 1 | 3 | 5 | 1 |
| 3 | -3 | 4 | -7 | 25 | 49 |
| 4 | 0 | -2 | -4 | 4 | 4 |
| 5 | 5 | 5 | 0 | 50 | 0 |
| 6 | 1.5 | -0.5 | 2 | 2.5 | 4 |
| Total | −6 | 86.5 | 58 |
For a row-level verification, type =A2^2-B2^2 in C2, =A2^2+B2^2 in D2, and =(A2-B2)^2 in E2. Fill these formulas down through row 6. Compare each cell against the expected row above. Using ordinary numeric cells avoids undocumented text-conversion behavior. The formula result is expected mathematically, not a result observed in ONLYOFFICE.
Step-by-step function calculation
- Select a blank result cell G2 outside columns A–E.
- Enter
=SUMXMY2(A2:A6,B2:B6)using the exact order shown; press Enter (or use the Formula tab’s documented Insert Function dialog). - The independent mathematical expectation is 58 for these five pairs.
- For a transparent check, use the applicable C, D or E row-calculation column from the table and sum those five cells. That check uses ordinary operators and the arithmetic results shown; it does not assert a vendor-tested equivalence.
- Try the partial-range, swapped-array and same-array tests in the table below. Each formula uses two same-shaped input ranges.
Further reproducible formulas
| English-locale formula | Expected result | Independent reasoning / interpretation |
|---|---|---|
=SUMXMY2(A2:A6,B2:B6) |
58 | Five same-shaped numeric pairs from the worksheet. |
=SUMXMY2(B2:B6,A2:A6) |
58 | Swapped array order; compare signs and symmetry. |
=SUMXMY2(A2:A3,B2:B3) |
50 | Only rows 2–3 are included. |
=SUMXMY2(A4:A6,B4:B6) |
8 | Only rows 4–6 are included. |
=SUMXMY2(A2:A6,A2:A6) |
0 | Both input arrays are the x values. |
=SUMXMY2(A2:A6,B2:B6)/COUNT(A2:A6) |
11.6 | Mean squared paired error. |
=SQRT(SUMXMY2(A2:A6,B2:B6)/COUNT(A2:A6)) |
3.40587727319 | Root-mean-squared error, not an absolute error total. |
=SUMX2PY2(A2:A6,B2:B6)-2*SUMPRODUCT(A2:A6,B2:B6) |
58 | Algebraic identity using the dot product. |
Interpretation and advanced use
Squared error and paired distances. If column A holds predictions and column B holds observations in the same row, each squared error is (prediction − observation)². For the demonstration, the row contributions are 1, 49, 4, 0, 4, totaling 58. Reversing the two arrays does not change the result because squaring removes the sign.
Advanced: mean squared error (MSE). With five complete numeric pairs, =SUMXMY2(A2:A6,B2:B6)/COUNT(A2:A6) has expected value 11.6. This assumes COUNT(A2:A6)=5 and that every A value has exactly one matching numeric B value. It is not a sample variance estimate.
Advanced: root mean squared error (RMSE). =SQRT(SUMXMY2(A2:A6,B2:B6)/COUNT(A2:A6)) has independently calculated expected value 3.40587727319. RMSE is in the same units as x and y; MSE is in squared units. Decide whether errors should be weighted or normalized before using this unweighted result for model comparison.
Algebraic cross-check. Σ(x−y)² = Σx² + Σy² − 2Σxy. With the same numeric rows, =SUMX2PY2(A2:A6,B2:B6)-2*SUMPRODUCT(A2:A6,B2:B6) has expected result 58. This identity helps distinguish SUMXMY2 from similarly named SUMX2MY2.
Errors, troubleshooting and limitations
| Problem or uncertainty | What to check or avoid |
|---|---|
| Calling it a signed total error | This result is a sum of squared differences, nonnegative for real numeric input; signs disappear. |
Confusing SUMXMY2 with SUMX2MY2 |
Placement of the square matters: (x−y)^2 versus x^2−y^2; the example results are 58 versus −6. |
| Unequal array shapes | The vendor requires matching numbers of columns and rows. A2:A6 and B2:B5 do not qualify. Error strings are not documented in this reference. |
| Incorrect pairing | Even equal-size ranges are mathematically wrong if one was sorted independently of the other. Preserve row-to-row identity. |
| Blanks or text / divide-by-zero in MSE | The vendor does not state how SUMXMY2 coerces these types. For the MSE denominator, ensure at least one complete numeric pair; the reference does not specify exact malformed-input error messages. |
The function’s short official help page documents the required dimensions but does not supply an explicit #VALUE!/#NUM! rule for mismatch or atypical cells. Consequently these are test cases to run in ONLYOFFICE, not observed error claims. If a formula returns a different answer, record the exact Desktop/web build, workbook locale, cell types and screenshot in a future validation pass.
Desktop, browser, historical releases, and locale accuracy
- Documentation evidence, not native execution: The current English function catalogue lists the function and links to the signature described above. The documentation is for ONLYOFFICE Docs Spreadsheet Editor; it is not a function-by-function guarantee for every hosted Docs deployment or Desktop Editors version.
- Desktop versus web: The Docs changelog and Desktop changelog are distinct release histories. Checked 2026-10-13 UTC, neither was used to establish the first-supported version of this function. Do not claim a minimum release number or tested parity without controlled execution on named versions.
- Formula locale: The ONLYOFFICE function-entry guide demonstrates English function names, comma-separated arguments, parentheses, and an initial
=. The regional settings guide documents configurable formula language, decimal/thousands separators, and region. These examples use English names, commas between arguments, and a dot for decimals. Recheck the user’s formula language and actual separator settings before copying to a localized workbook; no localized execution was performed. - Workbook formats: The presence of the formula in the help catalogue does not, by itself, verify Excel, Google Sheets, OpenDocument or earlier-format round trips. Avoid assuming that an identical spelling guarantees identical coercion, error codes or calculation precision elsewhere.
Related functions — vendor links checked 2026-10-13 UTC
- SUMSQ sums squares of supplied numeric inputs and is useful for independent math cross-checks. It has a distinct argument signature.
- SUMPRODUCT multiplies corresponding values and sums products, useful for the algebraic identities shown above. Its own help page explicitly documents treating nonnumeric entries as zero; that rule must not be transferred to SUMXMY2 without separate evidence.
- SQRT finds the square root of a number, useful in RMS calculations; negative-input
#NUM!belongs to SQRT’s own documented rule, not to SUMXMY2. - COUNT counts numeric cells, useful only when observations are paired and complete.
Official sources and claims — verified 2026-10-13 UTC
| Claim checked | Official source | What is—and is not—verified |
|---|---|---|
| Name, purpose, syntax, argument order | ONLYOFFICE SUMXMY2 reference | The vendor names this exact function; the English reference supplies its signature. |
| Presence in the current function menu | ONLYOFFICE Insert Functions catalogue | The function appears in a current, unversioned Docs list. This is documentation rather than execution evidence. |
| English entry and argument separators | Inserting functions | Documents typing =, function names, comma argument separators in English examples, and the Function Arguments wizard. |
| Locale and translated function names | Spreadsheet Advanced Settings | Documents configurable formula language and regional numeric separators; specific translated spellings were not verified. |
| Release-era limitations | Docs changelog and Desktop changelog | These document separate release tracks. First supported release of SUMXMY2 remains unconfirmed. |
Verification limitations
Formula values are independently calculated mathematical expectations. Native ONLYOFFICE Desktop/web execution, localized parsing, undocumented coercion, error propagation and extreme-value precision were not tested.
Official references checked: 2026-10-13 UTC. Native release/edition testing: not performed.