Syntax
| Parameter | Description |
|---|---|
| array_x | Parameter of the SUMXMY2 function. |
| array_y | Parameter of the SUMXMY2 function. |
Examples
Sum of squared errors
=SUMXMY2(A2:A6, B2:B6)
Euclidean distance squared
=SUMXMY2({3,7}, {0,3})
Comparing two datasets
=SUMXMY2(C2:C20, D2:D20)
Common Errors
The two arrays must be the same size. Unequal-length arrays return #N/A.
Non-numeric values in either array cause this error. Ensure all cells contain numbers.
Tips
RMSE = SQRT(SUMXMY2(actuals, predictions) / COUNT(actuals)). This is one of the most common model evaluation metrics.
Because differences are squared, SUMXMY2 always returns 0 or a positive number. A result of 0 means the arrays are identical.
Instead of creating a helper column with =(A2-B2)^2 and summing it, use SUMXMY2 directly — it's cleaner and faster on large datasets.
Try SUMXMY2 in Viztab
Import your data and use SUMXMY2 with 370+ other formulas. No signup required.
Open Viztab