SUMX2PY2 Function
Returns the sum of the sums of squares of two arrays (Σ x² + y²).
Category
Math & Trig
Available in
All versions, Microsoft 365
Returns
A number
Want to practice SUMX2PY2 in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox
Overview
SUMX2PY2 squares both values in each pair, adds them, and totals the results.
It's mainly found in statistics and engineering formulas.
Syntax
=SUMX2PY2(array_x, array_y) Explain
Arguments
| Argument | Required? | What it does |
|---|---|---|
| array_x | Yes | The first range. |
| array_y | Yes | The second range, same size. |
Examples
Example 1 — x² + y² for each pair
(2² + 1²) + (3² + 2²) + (4² + 3²).
C2fx=SUMX2PY2(A2:A4, B2:B4)
| A | B | C | |
|---|---|---|---|
| 1 | x | y | Result |
| 2 | 2 | 1 | 43 |
| 3 | 3 | 2 | |
| 4 | 4 | 3 |
=SUMX2PY2(A2:A4, B2:B4) Explain
Common mistakes
- Different sizes. Return #N/A.
Notes
- Related functions: SUMX2MY2, SUMXMY2, SUMSQ.

Author
Kyle Stott
Certified Microsoft Excel Expert
Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.