Contact

MEDIAN Function (Gnumeric)

Statistical Intermediate Gnumeric

Learn the MEDIAN function in Gnumeric: Returns the median of a given sample.

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

The MEDIAN function in Gnumeric is used for this task: Returns the median of a given sample. Find the middle observation in a sorted set.

This guide explains how to read the formula, reproduce a concrete example, interpret its result and recognize common input mistakes.

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: Bounded native Gnumeric 1.12.57 cases on October 17, 2026; retained 1.12.62 registration/source remains a separate scope. First historical execution and last functioning release are not established.

Syntax and arguments

=MEDIAN(number1,[number2],...)

Supply values, references or ranges. MEDIAN sorts the usable numeric observations conceptually, then returns the middle one when the count is odd. When the count is even, it returns the arithmetic mean of the two central observations. It does not pick the middle worksheet row without regard to value order, and it need not equal any observed value when the count is even.

The inspected collector ignores text, Boolean and empty cells in ranges. Direct arguments have separate coercion rules, so avoid assuming every Boolean or text expression is treated exactly like a cell inside a referenced range.

Worked example

=MEDIAN(2,9,5)

Expected result: 5.

Why it works: Find the middle observation in a sorted set.

Odd and even sample sizes

The retained =MEDIAN(2,9,5) returns 5 because sorting gives 2, 5, 9. For =MEDIAN(1,3,5,100), the expected result is 4: the central pair is 3 and 5, whose mean is 4. This makes the outlier 100 less influential than it would be in the arithmetic mean, which is 109/4 = 27.25.

For a mixed referenced range, set H1 to 10, H2 to 0, leave H3 blank, put text missing in H4 and Boolean TRUE in H5. =MEDIAN(H1:H5) is expected to return 5 from the two numeric observations 0 and 10. An entirely blank J1:J3 range gives #NUM! in the bounded test. That differs from AVERAGE’s empty-data error and should not be rewritten as a generic missing-value result.

Advanced application: summarize skewed measurements

A median can help describe a typical duration when a few unusually long durations dominate the mean. It is still only a summary: two very different distributions can share the same median. Keep units and sample size visible and examine the range or another spread measure alongside it.

Do not combine subgroup medians by simply averaging or taking the median of the medians and call the result the overall median. The position of each observation in the combined ordered sample matters. Use the underlying observations when a whole-population median is required.

Duplicates count as repeated observations. MEDIAN does not first deduplicate the values. Likewise, worksheet order is irrelevant to the numeric median; sorting the source cells for display is optional and need not mutate the original data.

Common problems and practical checks

  • For an even number of usable observations, check the average of the central pair rather than expecting an existing data point.
  • Empty and text cells in a referenced range do not occupy positions in the numeric order. Numeric zeros do.
  • #NUM! from an empty usable dataset does not mean the median is zero.
  • Verify imported values are actually numeric before interpreting a surprising result.
  • MEDIAN is not a weighted median and has no weight argument. Repeated values only weight the sample through their repeated presence.
  • The source sorts collected values internally; no destructive reordering of input cells is required.

Documentation and verification

  • Gnumeric official function catalog
  • A historical comparable LibreOffice Calc 25.2 test was not Gnumeric verification. The present listed native fixture was recalculated using Gnumeric ssconvert 1.12.57 under C.UTF-8. Unexecuted source branches are not runtime guarantees; no GUI or screenshot is claimed.
  • Official function help and implementation. Statistical/mathematical source1.12.62 was retained October13–14; built-in/logical1.12.57 source was freshly retrieved October17.