Contact

COVAR Function (Gnumeric)

Statistical Intermediate Gnumeric

Learn the COVAR function in Gnumeric: Calculates the population covariance.

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

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-stat function module must be included and enabled.
  • Checked: October 14, 2026. Documentation/source check; no new native test in Gnumeric 1.12.62.

What COVAR measures

COVAR describes the direction and magnitude of joint variation between two corresponding numeric data sets. Positive covariance means values tend to be above or below their respective means together; negative covariance indicates opposite movement. Unlike correlation, covariance is not constrained to −1 through +1 and carries the product of the original units, so its magnitude is not directly comparable across differently scaled variables. The Gnumeric Statistics manual’s COVAR entry documents the function and two arguments [S1].

The implementation indexed for Gnumeric 1.12.62 uses the population covariance calculator gnm_range_covar_pop(); the distinct documented COVARIANCE.S function is the sample covariance counterpart [S2, S4]. The distinction affects the denominator: COVAR uses n, while sample covariance uses n − 1. Gnumeric native execution was not conducted for this review.

Exact Gnumeric syntax

=COVAR(array1,array2)
Order Name Meaning Required/default
1 array1 Numeric values in the first paired series, e.g. A2:A6. Required; no default
2 array2 Numeric values of the second series, paired by row with the first, e.g. B2:B6. Required; no default

The manual documents two arrays in this order; it lists no optional sample Boolean or denominator argument. In particular, do not write COVAR(A2:A6,B2:B6,TRUE) and assume a supported sample flag. Text and empty cells are documented as ignored. [S1]

Reproducible paired-data worksheet

Enter the following numeric values in a new sheet. The first row is a label, not part of the formula. Each row represents one observation; maintain that row pairing when copying or sorting.

Row A — Hours practiced (X) B — Assessment points (Y) C — Reverse ranking (Z)
1 Hours Points Reverse
2 1 2 5
3 2 3 4
4 3 5 3
5 4 4 2
6 5 6 1

All data cells A2:C6 contain genuine numbers. Their independent statistics are: mean(X) = 3, mean(Y) = 4, Σ(X−3)(Y−4) = 9, Σ(X−3)² = 10, Σ(Y−4)² = 10, with n = 5. The reverse-ranked column C makes it possible to test a deliberately negative relationship. The figures below are independently calculated expectations rather than observed output from a running Gnumeric installation.

Reproducible examples and checked numerical results

Formula Independently calculated result Interpretation
=COVAR(A2:A6,B2:B6) 1.8 Population covariance of hours and points.
=COVAR(B2:B6,A2:A6) 1.8 Covariance is symmetric.
=COVAR(A2:A6,A2:A6) 2 Population variance of X equals the covariance of X with itself.
=COVAR(A2:A6,C2:C6) -2 Perfect inverse movement has negative population covariance.
=COVARIANCE.S(A2:A6,B2:B6) 2.25 Sample covariance, a separate documented Gnumeric function.
=CORREL(A2:A6,B2:B6) 0.9 Normalized linear correlation; not measured in combined units.

Hand calculation: the difference between population and sample

For X = 1,2,3,4,5 and Y = 2,3,5,4,6, their averages are 3 and 4:

X deviations: -2, -1, 0, 1, 2
Y deviations: -2, -1, 1, 0, 2
Paired products: 4, 1, 0, 0, 4
Sum of paired products: 9
COVAR population covariance = 9 / 5 = 1.8
COVARIANCE.S sample covariance = 9 / (5 - 1) = 2.25

These figures are pure arithmetic calculated independently of Gnumeric. Choose sample covariance if your analysis requires that estimator; choosing the function by memory instead of the desired denominator can produce a systematic difference.

Advanced use: relate covariance to correlation

To make covariance comparable across variables with different units, standardize by their population standard deviations:

=COVAR(A2:A6,B2:B6)/(STDEVP(A2:A6)*STDEVP(B2:B6))

Expected: 0.9. The X and Y population standard deviations are both SQRT(2), so 1.8/(SQRT(2)*SQRT(2)) = 0.9. Gnumeric also directly documents CORREL(A2:A6,B2:B6) to calculate the same coefficient [S3]. This identity assumes a consistent set of paired numeric observations. If either standard deviation is zero, this quotient is undefined.

A practical financial or operational report might measure price (dollars) against units sold (items). Covariance then has dollar-items units and will change when you rescale one variable (e.g. dollars to cents). Use a normalized correlation to compare the strength of associations across dashboards; use covariance itself when your calculation depends on the underlying joint units, such as a covariance matrix for a model. Gnumeric has separate statistical analysis tools for covariance matrices; these are not the same as COVAR syntax.

COVAR versus similar functions

  • CORREL — Pearson’s normalized, dimensionless correlation coefficient, expected 0.9 for the worked data; not a synonym for covariance. [S3]
  • PEARSON — another officially documented Pearson coefficient function; use it for association rather than covariance magnitude. [S3]
  • COVARIANCE.S — a separately documented sample covariance function using n−1 for the matched data, expected 2.25 here. It must not be treated as an alias of COVAR. [S2]
  • STDEVP — population standard deviation; useful for standardizing a covariance when both data sets have nonzero spread.

Input quality and troubleshooting

  • Different row counts or shifted rows: supply equal-shaped ranges containing genuinely corresponding observations. A pairwise measure has no meaning if X and Y were independently sorted. When copying formulas, inspect the highlighted ranges and lock rows/columns with $ where appropriate.
  • Blank, text, or Boolean data: Gnumeric’s official Statistics reference explicitly says text and empty cells are ignored for this function; the release-tagged collection implementation also excludes Boolean values. It is safer to clean and verify pairs in a helper table first. Do not assume a missing measurement in one column is safely re-paired with the next row in the other column; the exact malformed-input behavior needs native testing.
  • Error-valued cells: fix upstream errors rather than silently replacing them with zero. The behavior and exact error label for a referenced cell that already contains an error were not tested in Gnumeric.
  • Zero useful pairs, unequal-length arrays or invalid argument types: these can prevent a meaningful result. Confirm inputs first and test the exact error code in your installed version; the current manual does not specify an error code for every such case.
  • Locale-specific syntax: the examples use the English-language formula name, comma argument delimiter and dot decimal. Gnumeric follows the configured operating-system locale; use the separators/format accepted by your own installation. The exact locale-specific formula delimiter was not natively checked in this review.
  • Interpretation: a pattern in two columns does not by itself establish causation, accuracy of the underlying measurements, or a statistically significant relationship.

COVAR-specific limits and interpretation

A perfectly constant series produces zero covariance with any changing series (as an arithmetic identity), not an undefined correlation. For very large magnitudes with tiny deviations, floating-point precision can affect last digits; use sensible measurement units and inspect anomalous data. A malformed range may return an error; the exact Gnumeric error label and error propagation for every edge case await native verification. Do not assume COVAR supports sample covariance, probability weights or array-shape recycling.

Compatibility, catalogue and edition cautions

The official manual calls COVAR Excel compatible [S1]. That is a vendor compatibility label only; it does not prove identical treatment of all imported workbooks, Boolean cells or formula separators. The official catalogue registers COVAR and COVARIANCE.S as distinct functions. This tutorial targets documented Gnumeric 1.12-series behavior and uses a versioned 1.12.62 code reference [S4] for the population calculation, while disclosing that no Gnumeric process was run.

Version, support and evidence (checked 2026-10-13 UTC)

Gnumeric’s official 1.12-series Statistics manual documents this formula’s name, argument order and high-level behavior. The official Gnumeric 1.12.62 release announcement establishes release context; it does not establish that any example on this page was executed. The official function catalogue records catalogue registration and upstream implementation/test classifications, not a test run for this manuscript. The official localization manual documents locale configuration. Gnumeric is distributed primarily through supported operating-system packages; see its official download guidance for platform availability.

Validation limits: Official Gnumeric 1.12.62 source was checksum-verified and inspected, and numerical examples were independently calculated. Native Gnumeric execution, screenshots, locale regression and workbook round-trip tests were not performed.