SUMXMY2 is a Math and Trigonometry function in Microsoft Excel, and its purpose is to return the sum of squares of differences of corresponding values in arrays. The ‘M’ in the function means minus as in ‘sum x minus y squared.’