Contact

MODE Function (Gnumeric)

Statistical Intermediate Gnumeric

Learn the MODE function in Gnumeric: Returns the most common value in a sample.

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 22, 2026. Pinned 1.12.62 source and native headless CLI tests on Debian 13 x86_64, with GOFFICE 0.10.61, C.UTF-8 locale and UTC. No GUI screenshot was captured.

Quick answer

MODE gives the most frequently repeated numeric value. The current manual specifies #N/A when every number appears only once.

Gnumeric syntax and parameters

=MODE(number1,number2,...)

number1 — First numeric value or range containing observations.

number2, ... — Further numbers or ranges to include in the frequency count.

Version and locale scope: The release-scoped function registry confirms MODE within the Gnumeric 1.12.62 standard public function set (September 2026). The Gnumeric manual documents the syntax shown here but is a continuously updated reference, not a frozen 1.12.62 manual. The function’s original introduction version has not been established. The formulas below use comma-separated English-locale syntax; installed regional settings or imported files may display other separators. Availability can depend on installed plugins and builds for Gnumeric functions in general.

Reproduce the example in your own worksheet

Create a worksheet and enter numeric data into the following eight cells. Keep these as real numbers, not quoted text.

Cell B: Observation
B2 2
B3 4
B4 4
B5 4
B6 5
B7 5
B8 7
B9 9

All eight observations total 40 and average 5. Keep the reference B2:B9 consistent across the example.

  1. Enter the values in the indicated cells in Gnumeric.
  2. Select a separate blank result cell outside the input range.
  3. Enter this formula exactly as written for the sample input:
=MODE(B2:B9)

Expected result: 4. The number 4 occurs three times, 5 occurs twice, and every other number appears once. Therefore 4 is the unique mode.

Input interpretation: A single numeric mode is unambiguous in the chosen dataset; no tie rule is assumed in the computed result.

Advanced application: add a useful check or calculation

After reproducing the basic result, enter:

=COUNTIF(B2:B9,MODE(B2:B9))

Expected result: 3. After finding the mode, COUNTIF reports how frequently it occurs. Three occurrences make it the strongest repeat in this sample.

Both the mode result 4 and its frequency 3 were observed in the scoped Gnumeric 1.12.62 CLI test described below.

Third worked example: a new sample can have a different mode

=MODE(2,2,3,3,3)

Independently calculated expected result: 3. Here 3 appears three times, whereas 2 appears twice. The mode is a frequency result, not the largest number or an average. Use this check to verify which observations were actually included.

Errors, edge cases and troubleshooting

  1. If all numeric values are unique, Gnumeric explicitly documents #N/A; check for actual repeats.
  2. The official reference says strings and empty cells are ignored. A category such as a product name needs a different frequency-count approach.
  3. When several numbers tie for the highest frequency, Gnumeric 1.12.62 selects the one whose first occurrence comes first in the input sequence. In the native CLI checks, =MODE(9,9,2,2) and =MODE(9,2,2,9) returned 9, while =MODE(2,2,9,9) and =MODE(2,9,9,2) returned 2. Reordering tied observations can therefore change the answer. These are Gnumeric results, not a cross-application tie rule.
  4. The tested all-unique input =MODE(1,2,3), single value =MODE(7) and empty range =MODE(A2:A4) each returned #N/A. In that last test A2:A4 was blank. The pinned implementation also ignores Boolean arguments; =MODE(TRUE,1,2,2) returned 2.

If the output differs, first confirm the exact cell contents and range boundaries; use an independent small dataset to isolate a formula issue from imported formats, hidden characters or missing values. Keep result cells outside the input ranges to avoid accidental circular references. Do not hide an error with IFERROR until you know which input is responsible.

Limits and cross-software compatibility

The manual marks MODE Excel compatible and separately documents MODE.MULT for multiple modes. Do not confuse those two outputs, particularly on tied data.

Why MODE can appear as MODE.SNGL in an XLSX file

In Gnumeric 1.12.62, enter =MODE(B2:B9) in the worksheet. Its XLSX exporter writes the formula as _xlfn.MODE.SNGL(B2:B9) inside the workbook XML. The importer maps that prefixed XLSX name back to Gnumeric’s MODE. This is an exchange-format name mapping; keep using MODE in the Gnumeric worksheet. The _xlfn. prefix here is part of the stored formula syntax, not evidence that this Gnumeric test failed.

The original sample returned 4 after native export and cacheless re-import into Gnumeric. Changing B3 and B4 from 4 to 5 changed the mode to 5 and its frequency to 4; restoring those cells restored the original results. The four tied-input controls above also retained their Gnumeric results after cacheless re-import.

A successful Gnumeric round trip does not establish how Excel, LibreOffice Calc or another receiving application evaluates the same file. In particular, do not assume identical tie selection merely because the stored name is MODE.SNGL. Test tied data in the actual destination version before sharing a workbook that depends on which mode is selected. For the broader workflow, see Gnumeric file formats and compatibility.

Gnumeric reference coverage is not a claim that every formula behaves identically in Microsoft Excel, LibreOffice Calc, Apple Numbers or other spreadsheet apps. Review the receiving application’s argument conventions, cell types and version-specific behavior before relying on workbook portability.

COUNT · AVERAGE · IF · SUM

Official sources and verification status

How this guide was checked

The original eight observations, mode 4, COUNTIF frequency 3, sum 40, average 5, and third example result 3 were independently counted and then observed with Gnumeric 1.12.62 headless CLI recalculation. Tests also covered tie order, empty/single/unique inputs, direct text and Boolean arguments, input changes and restoration. Formula caches were removed before the first native import and before XLSX re-import, so these observations are not merely retained cached answers. No other spreadsheet application was executed for this check, and no GUI screenshot is claimed. The earlier example-check record remains available as the original arithmetic-only record; it is not the evidence for the new native checks.

Official MODE reference · Editorial standards