# SUMX2PY2 Function

> Return the sum of the sums of squares of two arrays with SUMX2PY2 in TX Sheet Control: how pairs are calculated, the #VALUE! error and a worked example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > SUMX2PY2 Function
- **193 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/sumx2py2/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/sumx2py2/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/sumx2py2/llms-full.txt

---

Return the sum of the sums of the squares of corresponding values in two arrays. For each pair of values, SUMX2PY2 adds the square of the value in `array1` and the square of the value in `array2`, and adds these sums. Arrays of different sizes return `#VALUE!`.

### Syntax

```text
SUMX2PY2(array1, array2)
```

Category: Math. Minimum arguments: 2. Maximum arguments: 2.

Available for supported offline calculation.

### Examples

```text
=SUMX2PY2({1,2},{3,4})
```

The formula returns 30, which is (1² + 3²) + (2² + 4²).

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [SUMX2MY2 Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/sumx2my2/llms-full.txt)
- **Next:** [SUMXMY2 Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/sumxmy2/llms-full.txt)
