Statistical

RANK Formula

RANK returns the rank of a number within a list of numbers. By default it ranks in descending order (largest = rank 1), but you can set order to non-zero for ascending (smallest = rank 1). Tied values receive the same rank, and the next rank is skipped.

Syntax

RANK(number, ref, [order])
ParameterDescription
number Parameter of the RANK function.
ref Parameter of the RANK function.
[order] (Optional.) Parameter of the RANK function.
Try RANK in Viztab — free, no signup

Examples

Sales ranking

Formula
=RANK(B5, $B$2:$B$50)
Returns the rank of the salesperson in row 5 among all 49 salespeople. The highest revenue gets rank 1.

Ascending rank (lowest first)

Formula
=RANK(C3, $C$2:$C$100, 1)
Ranks with the smallest value as #1. Useful for metrics where lower is better, like response times or defect counts.

Rank across a row

Formula
=RANK(B2, $B$2:$F$2)
Ranks a value among values in a single row, useful for comparing metrics across multiple periods.

Common Errors

#N/A

The number being ranked is not found in the reference range. The value must exist in the range.

#VALUE!

Non-numeric arguments were provided.

Tips

Use absolute references for the range

When dragging the formula down, use $ signs on the range ($B$2:$B$50) so it doesn't shift. Only the first argument (the cell being ranked) should change.

Ties skip ranks

If two values tie at rank 3, the next value gets rank 5 (rank 4 is skipped). Use RANK.AVG if you want tied values to share an averaged rank instead.

Modern alternative: RANK.EQ

RANK and RANK.EQ are identical. RANK.EQ is the newer name that distinguishes it from RANK.AVG for handling ties.

Try RANK in Viztab

Import your data and use RANK with 370+ other formulas. No signup required.

Open Viztab

Related Formulas