Math & Trig
All versions
◉ 20 views
=SUMX2MY2()
This Excel function returns the sum of the difference of the squares of corresponding values in two arrays.
Applies To:
Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=SUMX2MY2(array_x, array_y)
Hover argument names in the table for details.
Output typeNumber
Popularity3 / 100
VolatileNo
Dynamic ArrayNo
📥 Download sample .xlsx — Coming soon
▦ Try in Playground
Dedicated file for this function — safe & lightweight · sample data + live formulas
⬇ Download Sample Workbook
A dedicated .xlsx for =SUMX2MY2() with Persian sample data & live formulas — open in Excel and practice.
- Sheet “Sample” — data table + formula in place
- Sheet “Guide” — syntax, arguments & tips from this page
- Instant & secure (token + rate limit)
🧠 🧠 Quiz this function
%d questions — syntax, example & errors — test yourself!
◧ Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
array_x |
Array | Required | The first array or range of values. |
array_y |
Array | Required | The second array or range of values. |
▣ Examples
▦ Data
| Cell | Value |
|---|---|
A2 |
First array |
B2 |
Second array |
A3 |
2 |
B3 |
6 |
A4 |
3 |
B4 |
5 |
A5 |
9 |
B5 |
11 |
A6 |
1 |
B6 |
7 |
A7 |
8 |
B7 |
5 |
A8 |
7 |
B8 |
4 |
A9 |
5 |
B9 |
4 |
A10 |
First array |
B10 |
Second array |
A11 |
2 |
B11 |
6 |
A12 |
3 |
B12 |
5 |
A13 |
9 |
B13 |
11 |
A14 |
1 |
B14 |
7 |
A15 |
8 |
B15 |
5 |
A16 |
7 |
B16 |
4 |
A17 |
5 |
B17 |
4 |
Sum of the difference of squares of the two arrays above (-55)
=SUMX2MY2(A2:A8,B2:B8)
Result:
-55
Sum of the difference of squares of the two arrays constants (-55)
=SUMX2MY2({2, 3, 9, 1, 8, 7, 5}, {6, 5, 11, 7, 5, 4, 4})
Result:
-55
§ Remarks
- The arguments should be either > numbers or > names, arrays, or references that contain numbers.
- If an array or reference argument contains text, logical values, or empty cells, those values are ignored. However, cells with the value zero are included.
- If array_x and array_y have a different number of values, the SUMX2MY2 function returns the #N/A error value.
- The equation for the sum of the difference of squares is:
✦ Tips
- The arguments should be either > numbers or > names, arrays, or references that contain numbers.
- If an array or reference argument contains text, logical values, or empty cells, those values are ignored. However, cells with the value zero are included.
- The equation for the sum of the difference of squares is:
⚠ Common Errors
#N/A
If array_x and array_y have a different number of values, the SUMX2MY2 function returns the #N/A error value.
Fix: Make the two ranges the same size
💬 Comments & Q&A 0 approved
🔒 Your comment will be published after review.Share your thoughts — visible after admin approval
No comments yet — be the first!