Contact

SUMXMY2 Function (Gnumeric)

Math Beginner Gnumeric

Learn the SUMXMY2 function in Gnumeric: Returns the sum of squares of differences of two arrays.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

SUMXMY2 calculates the sum of squared differences between aligned numeric pairs. It computes (X−Y)² for each pair, then adds the results. Because the differences are squared, the expected result for ordinary finite numeric inputs is nonnegative. It is useful for measuring squared error between actual and predicted measurements before dividing by the number of valid pairs.

Exact syntax: =SUMXMY2(array0,array1)

Validation limits: Expected outputs are independent arithmetic predictions; no native Gnumeric execution or screenshots were performed.

Availability and version history

  • Introduced: Documented by 1.12.62; original introduction not established.
  • Availability: Supported in Gnumeric 1.12.62, based on the function-specific registration.
  • Scope: Desktop; the fn-math function module must be included and enabled.
  • Checked: October 14, 2026. Documentation/source check; no new native test in Gnumeric 1.12.62.

Gnumeric version, syntax and inputs

The English-language Gnumeric Mathematics function reference documents this function with two required positional array arguments, array0 followed by array1; neither argument has a default. Use equal-length, correspondingly ordered numeric cell ranges for the reproducible examples. These are arrays/ranges, not two independent single numbers to multiply or add. The corresponding row positions define each pair.

Argument Required? Meaning This guide’s value
array0 Yes First area/range of numeric observations, X A2:A6
array1 Yes Second area/range of numeric observations, Y B2:B6

The published English syntax uses a comma between arguments. Region-dependent formula presentation can vary; when a formula is rejected, first check your Gnumeric locale and argument separator rather than assuming another spreadsheet’s syntax applies. Use the exact English function name shown here.

Gnumeric’s upstream download index identifies 1.12.62 (21 September 2026) as the latest 1.12 source release at this review date. The Gnumeric web catalogue independently lists this function as Complete with Basic upstream test coverage. These are documentation and implementation-status claims, not native execution of this tutorial. Linux/Unix desktop installations are within the project scope; platform-specific availability for a particular package, a Windows build, and any other spreadsheet’s precise coercion behavior were not tested.

Reproducible practice sheet: two matched five-row series

In a blank worksheet, put Series X into A1, Series Y into B1, and the following numeric values into A2:B6. The extra columns in the table are manual arithmetic for explanation—you need only enter columns A and B.

Row A: series X B: series Y A² B² A² − B² A² + B² (A − B)²
2 1 2 1 4 −3 5 1
3 2 1 4 1 3 5 1
4 3 4 9 16 −7 25 1
5 4 3 16 9 7 25 1
6 5 6 25 36 −11 61 1
Total 55 66 −11 121 5

Use the five paired observations, not six cells including headers. To reproduce the result, enter the formula into a blank result cell, such as D2. For each row, the formula evaluates the two numeric inputs at the same position and combines them using the operation below.

Main formula and independently calculated result

=SUMXMY2(A2:A6,B2:B6)

Expected output: 5 (independent arithmetic; not observed in Gnumeric). The pairwise differences are −1,1,−1,1,−1; each squared difference is 1, so the sum of five squared differences is 5.

This is not SUMX2MY2: the latter subtracts already-squared values and gives −11 on these inputs. Parentheses matter: (X−Y)² = X²−2XY+Y², whereas X²−Y² subtracts the Y square.

Advanced uses: prediction error and pairwise audits

  1. Mean squared error (MSE): If column A contains five numeric predictions and B has the five corresponding measured outcomes, use =SUMXMY2(A2:A6,B2:B6)/COUNT(A2:A6). Expected result 1, because 5/5=1. COUNT(A2:A6) is an appropriate denominator only after confirming every row has a valid numeric value in both columns. If pairs are missing, construct a validated paired subset and divide by the count of those pairs instead.
  2. Root-mean-square error (RMSE): =SQRT(SUMXMY2(A2:A6,B2:B6)/COUNT(A2:A6)) has expected result 1 for the five valid pairs. This is a root-mean-square of the paired differences, not a standard deviation and not a root calculated separately for each row.
  3. Swapping actual and predicted: =SUMXMY2(B2:B6,A2:A6) also yields 5 for these numeric pairs. Squaring removes the sign, so this metric does not show whether predictions are systematically too high or too low. To inspect direction, use a separate signed error calculation such as =A2-B2 in a row-level column.
  4. Manual reconciliation: In C2 enter =(A2-B2)^2, copy through C6, and then calculate =SUM(C2:C6) (expected 5). If SUMXMY2 disagrees in a workbook, inspect mismatched row order, text-formatted numerals, blanks and errors. A single large mistake can dominate because differences are squared.
  5. Physical units and interpretation: Squared error is measured in units squared; the RMSE returns to the original measurement unit. The squared-loss metric penalizes large errors strongly and is not a percent-error metric.

Second deterministic case: In A2:A4 enter 3,4,0, and in B2:B4 enter 4,0,0. Independent arithmetic predicts =SUMXMY2(A2:A4,B2:B4) → (−1)²+(4)²+0² → 17.

Explicitly documented exceptional cases

The Gnumeric Mathematics manual specifies #N/A if array0 and array1 have different numbers of data points and says strings and blank cells are ignored. The manual does not establish exact cross-row pairing behavior for asymmetric missing inputs; don’t rely on nonnumeric cells being silently counted as zero. For meaningful forecast-error statistics, keep only rows where both observations are usable numbers.

Source/manual discrepancy: The official 1.12.62 source archive was checksum-verified. All three functions use the same paired collector, ignoring range blanks, strings and Booleans. src/collect.c sends unequal collected lengths or no accepted pairs to the configured GNM_ERROR_VALUE fallback. The published sibling help instead says #N/A; this discrepancy remains a native-validation item, not a confirmed runtime-error promise.

Input hygiene and errors

  • Array lengths: Use two equally sized ranges containing the same number of meaningful paired values. The official manual explicitly documents #N/A for different numbers of data points for SUMX2PY2 and SUMXMY2; for SUMX2MY2 it does not state that special case. Do not assume that a reference to rows 2–6 and a reference to rows 2–5 is valid. The precise mismatched-input error of SUMX2MY2 still requires native checking.
  • Text and blanks: The Gnumeric manual specifically says strings and empty cells are ignored for SUMX2PY2 and SUMXMY2. It does not separately specify that rule for SUMX2MY2. A skipped value could compromise pairing; the cross-row behavior for different distributions of blanks/text was not independently tested. Clean the data or explicitly form a pairwise numeric-only subset first, and don’t silently replace an absent measurement with zero.
  • Logical values, formula-generated errors, or numeric-looking text: Do not assume Excel, LibreOffice, or another application handles these identically. The documentation examined does not specify all of these cases for this function. Test such cases natively before making production claims, or normalize inputs to true numbers; a number stored as text is not a verified numeric measurement.
  • Zeros and negatives: Real numeric zero is a valid observation for the stated arithmetic; negatives work algebraically but are squared where shown. Avoid entering thousands separators as if they were formula argument separators.
  • #NAME? or syntax errors: Check the English function spelling, closing parenthesis, correct pair of ranges, and the separator accepted by the installed locale; confirm the function is available in the installed Gnumeric release.
  • Unexpected totals: Verify that headers are excluded, ranges have the same orientation/order, values have not been sorted independently, and input columns truly contain numeric cells. Pair order changes SUMXMY2; for complete numeric columns, SUMX2MY2 and SUMX2PY2 depend only on the separate squared totals.
  • Large-magnitude inputs: Squaring extremely large values can exceed floating-point range, and subtraction of similar large squares can lose precision. The published examples use small exact integers; overflow limits and the precise displayed error are not validated here.

The Gnumeric Mathematics manual marks this function Microsoft Excel compatible, which is an upstream classification rather than independent Excel testing. Do not infer identical blank, text, Boolean, array-literal, locale, or file-import behavior from that label. The examples use Gnumeric’s documented English function name and ordinary cell-range references—not Excel-only features, array literals, macros, or screenshots. Version-specific test status: not executed natively in Gnumeric 1.12.62 or elsewhere. Only independent arithmetic and documentation review were performed.

Related Gnumeric guides: SUMSQ, SUMPRODUCT, SUMX2MY2, SUMX2PY2, SUMXMY2.

Official references and claim checks (accessed 2026-10-13 UTC)

  1. Gnumeric Mathematics manual, especially the SUMX2MY2, SUMX2PY2, and SUMXMY2 entries: official function category. This supports the exact two-argument syntax, mathematics, stated #N/A and text/blank rules (where explicitly written), related functions, and the Excel-compatibility designation.
  2. Gnumeric’s public function catalogue: GNOME-hosted catalogue. Lists each of the three functions as Complete with Basic upstream testing. Catalogue registration is not a local runtime test.
  3. Gnumeric upstream version index: GNOME 1.12 source archives, indicating source release 1.12.62 dated 2026-09-21. This is version evidence, not proof of tested runtime behavior.

Validation: All arithmetic examples independently checked; official documentation and checksum-verified1.12.62 function/collector source inspected. Native execution, screenshots, locale and workbook round-trip tests were not performed.