RANK Function (Gnumeric)
Learn the RANK function in Gnumeric: Returns the ranking of a 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 14, 2026. Documentation/source check; no new native test in Gnumeric 1.12.62.
Quick answer
Use RANK to assign a position to a number within a set. For six scores of 92, 88, 88, 75, 60 and 60, enter =RANK(88,B2:B7) to get 2: only one score is higher than 88. Tied scores share the same position, and the following rank skips the positions occupied by those ties. For instance, the next-lower score, 75, receives rank 4, not rank 3.
Exact Gnumeric syntax and argument rules
=RANK(x,ref[,order])
x — Required. The numeric score to rank. Use a numeric literal or a reference to a numeric cell.
ref — Required. The collection of numeric scores, usually a worksheet range such as $B$2:$B$7.
order — Optional. 0 (default) = descending: largest score receives rank 1. A nonzero value = ascending: smallest score receives rank 1.
The official Gnumeric Statistics manual documents this exact argument order and the default. Both functions are registered with a required numeric x, required range ref, and optional Boolean-like order indicator. This page uses a comma as the formula-argument separator and a period for decimal examples; other locale settings may require different separators. Enter the separators expected by your local Function Wizard, particularly if importing Excel or LibreOffice examples.
Version and availability: The checked Gnumeric reference is the GNOME project documentation with Gnumeric 1.12.62 as the currently listed 1.12 stable release (checked 2026-10-12). The official catalogue confirms the function exists, but catalogue presence does not prove a specific build or older version has been executed in this research. Gnumeric’s function availability can also depend on enabled components.
Build a reproducible worksheet
Enter these six numeric values into cells B2:B7 (and any identifying labels, such as employees, in A2:A7):
On a narrow screen, scroll this table sideways to see every column.
| Row | A — employee | B — score | C — descending rank | D — ascending rank |
|---|---|---|---|---|
| 2 | Maya | 92 | =RANK(B2,$B$2:$B$7) |
=RANK(B2,$B$2:$B$7,1) |
| 3 | Noah | 88 | =RANK(B3,$B$2:$B$7) |
=RANK(B3,$B$2:$B$7,1) |
| 4 | Priya | 88 | =RANK(B4,$B$2:$B$7) |
=RANK(B4,$B$2:$B$7,1) |
| 5 | Sam | 75 | =RANK(B5,$B$2:$B$7) |
=RANK(B5,$B$2:$B$7,1) |
| 6 | Taylor | 60 | =RANK(B6,$B$2:$B$7) |
=RANK(B6,$B$2:$B$7,1) |
| 7 | Zoe | 60 | =RANK(B7,$B$2:$B$7) |
=RANK(B7,$B$2:$B$7,1) |
Lock the comparison range with $ so every filled-down formula ranks against the same six scores. Copy C2:D2 through row 7 to reproduce the ranking calculation.
On a narrow screen, scroll this table sideways to see every column.
| Row | Expected C (descending) | Expected D (ascending) |
|---|---|---|
| 2 | 1 | 6 |
| 3 | 2 | 4 |
| 4 | 2 | 4 |
| 5 | 4 | 3 |
| 6 | 5 | 1 |
| 7 | 5 | 1 |
These values are independently calculated expected outputs, not observed Gnumeric results. The calculations implement the documented tie handling and are cross-checked against the GNOME-maintained function source. Native Gnumeric execution was unavailable during draft preparation.
How ties work: competition ranks
Gnumeric’s official help says that ties receive the largest possible rank. In the ordinary descending example, two students with score 88 each get rank 2; 75 then gets rank 4, because the position 3 was occupied by the other tied score. In ascending order, the two tied 60s each get rank 1; the next score 75 is rank 3.
The ranking uses 1 + the number of scores strictly greater than x when descending, or 1 + the number strictly less than x when ascending. The example contains repeated scores, so don’t confuse this with COUNTIF on the rank column. In the GNOME-maintained function implementation, the reference collector excludes blanks, text and Boolean cells from the numerical comparisons; therefore mixed-type range behavior needs native checking in unusual worksheets.
Advanced example: who qualifies for the top two positions?
Keep the six scores in B2:B7. In cell E2 enter:
=IF(RANK(B2,$B$2:$B$7)<=2,"Qualifies","Not selected")
Fill through E7. Expected: Maya, Noah and Priya qualify: rank 1 for Maya and rank 2 for both employees with 88 points. If your business needs exactly two employees rather than all scores tied at the cutoff, the formula is insufficient: add a disclosed tie-break rule, for example an earlier timestamp or second metric, rather than silently removing a tied person.
Rank an external threshold (Gnumeric-specific portability caution)
In the GNOME-maintained source, =RANK(80,$B$2:$B$7) is mathematically 4: three scores exceed 80. This behavior follows from the current source’s comparison loop even though 80 is not in B2:B7. Do not assume this is portable to Excel or LibreOffice, and treat it as source-inferred, native-not-tested until confirmed in your installed Gnumeric release. To stay portable, rank an actual member of the reference range.
Common errors and troubleshooting
| Symptom | Check |
|---|---|
| Every row shows a different unexpected ranking | Ensure all formulas reference $B$2:$B$7, rather than shifting the range as they are filled. |
| Highest score is not ranked first | Omit order or use 0; using nonzero order reverses the direction. |
| Multiple rows show the same rank | That is intentional: RANK gives equal values equal ranks and skips later positions. For fractional average tie positions, use RANK.AVG. |
| A number is stored as text or values look blank | Confirm real numeric cells, not imported text; mixed-type behavior is not covered by this run’s native validation. |
| A formula cannot be parsed | Confirm RANK is available in the installation, separator syntax and quote characters. Check local list/decimal separators. |
#VALUE! or another error |
Investigate nonnumeric x, invalid reference expressions and input errors in the range. Error codes for each edge case were not natively tested in the recorded checks. |
Compatibility and related guides
The GNOME documentation states that the legacy RANK function is Excel compatible. Excel also offers RANK.EQ, which models competition ranking, but RANK.EQ is not verified here as a separate Gnumeric function or alias. Gnumeric’s RANK.AVG is an independently documented function for the fractional mean position when there are ties. LibreOffice may use different separators and may differ in unusual or nonmember-value cases.
Sources and validation status
- Gnumeric official Statistics manual — RANK, checked 2026-10-12: syntax,
orderdefault, tie ranks, stated Excel compatibility. - Gnumeric official function catalogue, checked 2026-10-12: RANK: Complete implementation; Basic project tests. The project’s test label does not validate this tutorial’s test cases.
- GNOME-maintained function code,
plugins/fn-stat/functions.c,gnumeric_rank/help_rankon checkedmaster: comparisons, mixed-type collector behavior, source-inferred nonmember ranking. Amastersource reference is not a separately verified 1.12.62 tag. - GNOME 1.12 release directory, checked 2026-10-12: identifies release 1.12.62.
How this guide was checked
The syntax and behaviour are based on the Gnumeric references cited above. The sample calculations were independently checked; they are expected results, not outputs observed in Gnumeric. Test locale-sensitive text conversion and imported files in your own installation. View the example-check record.