Math & Trig

SUMX2MY2 Function in Excel

Returns the sum of the difference of squares of corresponding values in two arrays.

Syntax

  • =SUMX2MY2(array_x, array_y)

Arguments

  • array_x (required): First array
  • array_y (required): Second array

Examples

  • =SUMX2MY2(A1:A3, B1:B3) - Sum of x²-y² - Result: Sum value

SUMX2MY2 in reporting workflows

  • Use absolute references when copying formulas across rows.
  • For conditional totals see [SUMIF](/functions/sumif/) and [SUMIFS](/functions/sumifs/).
  • Filtered lists may need [SUBTOTAL](/functions/subtotal/) instead of SUM on visible cells only.

Common errors

  • Arrays must be same size

Use cases

  • Statistical analysis
  • Mathematics
  • Engineering

Frequently asked questions

  • What is the SUMX2MY2 function in Excel? SUMX2MY2 returns the sum of the difference of squares of corresponding values in two arrays. The syntax is =SUMX2MY2(array_x, array_y). Typical use cases include statistical analysis, mathematics, engineering.
  • How do I use the SUMX2MY2 function? To use SUMX2MY2, type =SUMX2MY2( in a cell and provide the required arguments. Excel will show you the syntax and parameter hints as you type. Make sure to close the parentheses and press Enter to execute the function.
  • What happens if SUMX2MY2 encounters errors? If SUMX2MY2 encounters invalid arguments or calculation errors, it may return error values like #VALUE!, #NUM!, or #DIV/0!. Check your input values and ensure they meet the function's requirements.
  • Why is SUMX2MY2 not working in my Excel? Common issues with SUMX2MY2 include Arrays must be same size. Start by checking the syntax =SUMX2MY2(array_x, array_y), then verify each referenced cell or range.

Editorial review

  • Reviewed by Excel.Directory Editorial Team. Updated May 2026.