SUMXMY2 Function in Google Sheets

Compute the sum of squares of differences between corresponding values in two arrays using the SUMXMY2 function.

SUMXMY2 Function

The SUMXMY2 function in Google Sheets computes the sum of squares of the differences between corresponding values in two arrays.

Syntax

SUMXMY2(array_x, array_y)
  • array_x: The first array or range of values.
  • array_y: The second array or range of values.

Examples

  1. Basic Example

Calculate the sum of the squares of differences between arrays in A1:A5 and B1:B5:

=SUMXMY2(A1:A5, B1:B5)
  1. Example with Different Ranges

Using the function with arrays in C1:C5 and D1:D5:

=SUMXMY2(C1:C5, D1:D5)

Notes

  • Ensure both arrays are of equal length to avoid errors.
  • SUMX2MY2: Calculate the sum of the squares of the differences between corresponding values.
  • SUMX2PY2: Calculate the sum of the squares of the sums of corresponding values.