Skip to content
Google Sheets

SUMX2PY2 function in Google Sheets

Calculates the sum of the sums of the squares of values in two arrays.

=SUMX2PY2(array_x, array_y)

SUMX2PY2 syntax and parameters

Two arguments, two required.

  • array_xarrayRequired

    The array or range of values whose squares will be added to the squares of corresponding entries in array_y and added together.

  • array_yarrayRequired

    The array or range of values whose squares will be added to the squares of corresponding entries in array_x and added together.

SUMX2PY2 examples

Formulas you'll actually reuse.

  1. Σ(x² + y²) — the total squared magnitude of paired coordinates:

    =SUMX2PY2(B2:B50, C2:C50)

    Result96200

  2. The root-mean-square distance from the origin:

    =SQRT(SUMX2PY2(B2:B50, C2:C50) / ROWS(B2:B50))

    Result44.3

SUMX2PY2 in Excel

Same name — your formula ports as-is.

Try SUMX2PY2 in the playground

Edit the example — nothing to install.

Preloaded with the SUMX2PY2 formula from Example 1 — change anything and watch it respond.

Loading the editor…