Google Sheets
SUMX2MY2 function in Google Sheets
Calculates the sum of the differences of the squares of values in two arrays.
=SUMX2MY2(array_x, array_y)SUMX2MY2 syntax and parameters
Two arguments, two required.
- array_xarrayRequired
The array or range of values whose squares will be reduced by the squares of corresponding entries in array_y and added together.
- array_yarrayRequired
The array or range of values whose squares will be subtracted from the squares of corresponding entries in array_x and added together.
SUMX2MY2 examples
Formulas you'll actually reuse.
Σ(x² − y²) — how much larger the squares of one series are than the other's:
=SUMX2MY2(B2:B50, C2:C50)Result
18400That difference relative to the second series:
=SUMX2MY2(B2:B50, C2:C50) / SUMSQ(C2:C50)Result
0.42
SUMX2MY2 in Excel
Same name — your formula ports as-is.
Try SUMX2MY2 in the playground
Edit the example — nothing to install.
Preloaded with the SUMX2MY2 formula from Example 1 — change anything and watch it respond.
Loading the editor…
Related functions
More ways Google Sheets gets this done.
- CHOOSECOLSCreates a new array from the selected columns in the existing range.ArrayExcel
- CHOOSEROWSCreates a new array from the selected rows in the existing range.ArrayExcel
- HSTACKAppends ranges horizontally and in sequence to return a larger array.ArrayExcel
- LINESTGiven partial data about a linear trend, calculates various parameters about the ideal linear trend using the least-squares method.ArrayExcel
- MDETERMReturns the matrix determinant of a square matrix specified as an array or range.ArrayExcel
- MINVERSEReturns the multiplicative inverse of a square matrix specified as an array or range.ArrayExcel