Zoho Sheet SUMX2MY2: Signed Differences of Squares
Use SUMX2MY2 in Zoho Sheet with complete paired data, signed totals, factorized checks and examples showing cancellation and changes of origin.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =SUMX2MY2(A2:A6;B2:B6) gives −4 for the five pairs below. It sums x²−y². It does not square x−y, and a negative total is mathematically valid.
Availability and version history
- Introduced: The original introduction release and date are not established by the checked sources.
- Availability: Currently documented in Zoho Sheet’s rolling web-service help; no numbered release or retirement endpoint is established.
- Scope: English-language web-service documentation. Exact mobile and offline-client parity is not established here.
- Checked: October 14, 2026, against the official SUMX2MY2 reference. Documentation and independent exact-arithmetic models; no native Zoho Sheet test.
Syntax and the order of operations
=SUMX2MY2(x; y)
Both inputs are supplied. Zoho describes them as arrays or ranges and illustrates a scalar call, =SUMX2MY2(9;8), returning 17 from 81−64.
The first input supplies the squares being added; the second supplies the squares being subtracted. Use aligned numeric ranges with the same layout for the worksheet below. The short reference does not settle every mismatched-shape, missing-value or text-conversion case.
The examples follow Zoho’s semicolon argument syntax. The 2 appears before MY because each value is squared before the subtraction.
Practice worksheet: compare each pair explicitly
Create a blank sheet named MagnitudeDifference. Put x, y, Difference of squares, Factored check and Squared difference in A1:E1. Enter A2:B6:
| Row | A: x | B: y | Expected C | Expected D | Expected E |
|---|---|---|---|---|---|
| 2 | 2 | 1 | 3 | 3 | 1 |
| 3 | -1 | 2 | -3 | -3 | 9 |
| 4 | 4 | -2 | 12 | 12 | 36 |
| 5 | 0 | 0 | 0 | 0 | 0 |
| 6 | 3 | 5 | -16 | -16 | 4 |
Enter =A2^2-B2^2 in C2, =(A2-B2)*(A2+B2) in D2 and =(A2-B2)^2 in E2. Fill C2:E2 through row 6. C and D agree by the difference-of-squares identity; E answers a different question.
Use G for labels and H for these independent totals:
| Cell | Formula | Expected result |
|---|---|---|
| H2 | =SUMX2MY2(A2:A6;B2:B6) |
-4 |
| H3 | =SUMX2MY2(B2:B6;A2:A6) |
4 |
| H4 | =SUMX2MY2(A2:A3;B2:B3) |
0 |
| H5 | =SUMX2MY2(A4:A6;B4:B6) |
-4 |
| H6 | =SUMSQ(A2:A6) |
30 |
| H7 | =SUMSQ(B2:B6) |
34 |
| H8 | =SUMXMY2(A2:A6;B2:B6) |
50 |
| H9 | =SUMPRODUCT(A2:A6;B2:B6) |
7 |
| H10 | =SUMX2PY2(A2:A6;B2:B6) |
64 |
| H11 | =SUM(D2:D6) |
-4 |
The total −4 is 30−34. Swapping the ranges changes the sign; splitting the rows into two nonoverlapping groups preserves the total. H8 confirms that a discrepancy based on squared paired differences is 50, not −4.
SUMSQ exposes each separate squared magnitude, and SUMPRODUCT supplies the dot product used in related identities. Those helper functions have their own input rules; this fixture uses complete numeric pairs throughout.
Advanced: shifting both sequences changes this result
Keep A:H intact. Put Shifted x, Shifted y and Shifted difference in J1:L1. Enter =A2+10 in J2, =B2+10 in K2 and =J2^2-K2^2 in L2. Fill J2:L2 through row 6.
Expected L values are 23, −63, 132, 0, −56. In N2 enter =SUMX2MY2(J2:J6;K2:K6); expect 36. In N3 enter =SUMXMY2(J2:J6;K2:K6); expect 50, unchanged from H8.
The explanation is algebraic: (x+c)^2−(y+c)^2=(x²−y²)+2c(x−y). Here the original x total is 8 and the y total is 6. With c=10, the total changes by 2×10×(8−6)=40, moving −4 to 36.
Put =H2+2*10*(SUM(A2:A6)-SUM(B2:B6)) in N4 to verify that same 36. Squared paired differences remain unchanged because adding the same constant cancels before the square. State the origin and units before interpreting a squared-magnitude difference physically.
Cancellation is not agreement
On another sheet named Cancellation, enter x and y in A1:B1, then 1,3 in A2:B2 and 3,1 in A3:B3. Put =SUMX2MY2(A2:A3;B2:B3) in D2 and =SUMXMY2(A2:A3;B2:B3) in D3.
Expect 0 and 8. The signed square differences −8 and +8 cancel even though neither pair agrees. Zero from SUMX2MY2 means equal aggregate squared magnitudes for this fixture; it does not mean identical sequences.
For scalar controls on the same sheet, put =SUMX2MY2(9;8) in F2, =SUMX2MY2(8;9) in F3 and =SUMX2MY2(9;9) in F4. Expected results are 17, −17 and 0.
Errors and related functions
Keep corresponding observations on the same rows and retain genuine numeric zeros. A sign change in an input disappears when that individual value is squared, while swapping which range is subtracted reverses the total. Neither behavior is a rounding error.
Zoho’s general error list does not give a function-specific rule for every size mismatch, text value, blank, boolean or propagated error. Do not assign a native error token by analogy with another spreadsheet. Very large squared terms can also expose numerical limits not stated in the short page.
Use SUMXMY2 for nonnegative squared discrepancies and SUMX2PY2 for the combined squared magnitude. Taking SQRT of a legitimately negative signed total would ask a different and invalid real-square-root question.