Skip to content
Dropfile

RANK Function

Returns the rank of a number within a list. Can rank in ascending or descending order. In Excel, RANK.EQ and RANK.AVG provide tie-handling options.

ExcelGoogle Sheets

Syntax

RANK(number, ref, [order])

Parameters

ParameterDescription
numberThe value to rank.
refThe range of values to rank against.
order(optional)0 or omitted for descending (largest = 1), 1 for ascending (smallest = 1).

Examples

Rank a student's score (highest first)

=RANK(B2, $B$2:$B$50)

Data: B2 = 92 in a class of 50

Result: 3

Rank ascending (lowest = 1st place)

=RANK(B2, $B$2:$B$50, 1)

Result: 48

Combined with TEXT for display

=RANK(B2, $B$2:$B$50) & " of " & COUNTA($B$2:$B$50)

Result: 3 of 50

Tips & Best Practices

Related Formulas

Need a different formula?

Describe what you need in plain English and our AI will generate the formula for you.

Try Formula Generator