Contact

AVERAGEA Function (Gnumeric)

Statistical Intermediate Gnumeric Gnumeric 0.27

Learn Gnumeric AVERAGEA with numbers, logical values, text and blanks. Includes a reproducible dataset and the 1.12.57 versus 1.12.62 text difference.

Verification status: 20 reference, boundary and advanced-check formulas were recalculated with Gnumeric 1.12.57 ssconvert. Retained identities and results were checked against independent calculations. Gnumeric 1.12.62 was source-checked only. How formula examples are checked

Version note: Direct text arguments changed after the tested 1.12.57 build. Referenced text and literal text must be distinguished; see the current-source comparison below.

Quick answer: =AVERAGEA(2,4,6) gives 4 in the tested Gnumeric 1.12.57 build.

Availability and version history

  • Introduced: Gnumeric 0.27 release notes explicitly record its addition.
  • Supported in: Gnumeric 1.12.62; no retirement is established.
  • Scope: Desktop Gnumeric with its Statistics plugin. English comma-separated formulas are shown.
  • Checked: October 14, 2026. The tables and named advanced check use 1.12.57 ssconvert. Current 1.12.62 source was inspected; that release was not executed.

What AVERAGEA returns

AVERAGEA computes an arithmetic mean after including logical values as TRUE=1 and FALSE=0. Referenced text contributes zero and still increases the count; genuinely empty cells are ignored. This can be useful for deliberately encoded data, but it is often wrong for a measurement column containing status labels. Versioned function help.

Syntax and arguments

=AVERAGEA(value1[,value2,...])

value1 and further values may be scalars or ranges. The examples below use the explicitly typed dataset. A text value and an empty cell are different, even when a formula or display makes them look similar.

Brackets denote optional additional arguments; do not type them. Current implementation.

Reproducible examples

Enter F2:F4 as numbers 2,4,6 and N2:N4 as numbers −2,−4,−6. Enter the mixed column exactly as follows:

Cell Stored value and type
H2 number 2
H3 logical TRUE
H4 logical FALSE
H5 text 8
H6 text pending
H7 genuinely empty

F5 is also genuinely empty. Prefix an entered numeric-looking text value with an apostrophe if needed; the apostrophe is an entry marker, not part of the stored value.

Formula Gnumeric 1.12.57 result
=AVERAGEA(2,4,6) 4
=AVERAGEA(F2:F4) 4
=AVERAGEA(N2:N4) -4
=AVERAGEA(TRUE(),FALSE()) 0.5
=AVERAGEA(0) 0
=AVERAGEA(H2:H6) 0.6
=AVERAGEA(F2:F4,H2:H6) 1.875
=AVERAGEA(H3:H4) 0.5

Practical worksheet

The mixed cells H2:H6 contain number 2, logical TRUE, logical FALSE, text “8” and text “pending”. They contribute 2,1,0,0,0, so =AVERAGEA(H2:H6) = 0.6. Replacing the pending label with a genuinely empty cell would remove that zero from the denominator; it is not the same operation as replacing it with an empty string.

For measurements, decide whether text means a deliberate zero, an excluded observation or a data-quality problem before choosing this function. Numeric text in a referenced cell is still text here. Simply formatting it as a number does not change the stored type.

Advanced interpretation and checks

For F2:F4=2,4,6 and H2:H6 as above, =AVERAGEA(F2:F4,H2:H6) = 1.875, because the converted sum is 12+3=15 over 3+5=8 values. Averaging the two group means would instead give (4+0.6)/2=2.3 and would weight the unequal groups incorrectly.

The native advanced check repeats the mixed-range mean, while the weighting calculation is an independent reconstruction. All-blank input has no denominator and gives #DIV/0!; a real zero observation alone returns zero.

Version-specific source comparison

The older callback includes all strings as zero. The current callback adds COLLECT_STRINGS_DIRECT_COMBO2; the current collector tries to parse direct strings as numbers and reports #VALUE! when parsing fails. Referenced strings still follow the zero-string rule.

Formula Native 1.12.57 Source-derived 1.12.62 behavior, not executed
=AVERAGEA("8",2) 1 5
=AVERAGEA("abc",2) 1 #VALUE!
=AVERAGEA(H5,2), with H5 stored text 8 1 1

No exact first release for this conversion change is asserted. These are English numeric-string examples, not tests of other locales or date-like strings.

Boundaries and troubleshooting

The native boundary table uses 1.12.57: direct text “8”, “abc” and "" all contribute zero in that version. The current-source section above explains a later direct-argument rule; do not transplant these direct-text results into a newer release. Errors in the input are propagated, rather than ignored or converted to zero.

F5 is an actually empty cell. Errors below are the tested build’s results, not zero-valued mathematical answers.

Formula Gnumeric 1.12.57 result
=AVERAGEA() #DIV/0!
=AVERAGEA(F5) #DIV/0!
=AVERAGEA(F2:F5) 4
=AVERAGEA("8",2) 1
=AVERAGEA("abc",2) 1
=AVERAGEA("",2) 1
=AVERAGEA(H5,2) 1
=AVERAGEA(H6,2) 1
=AVERAGEA(H7) #DIV/0!
=AVERAGEA(1/0,2) #DIV/0!
=AVERAGEA(-2,-4,"abc") -2

Official evidence and checking scope

The retained workbook’s stale SUM cache and uncached SUM both recalculated correctly. Formula identities, typed inputs and native results were inspected. The importer reported unsupported style-extension elements; that warning is retained, and no all-formatting claim is made. GUI entry, other locales and later-release output were not tested.