Category: FUNCTION | Updated: 2026-11-22
How to Use the RANK Function | Find the Rank of a Number
How to Use the RANK Function
The RANK function returns the rank of a specified value in a dataset—either from largest to smallest or smallest to largest. It is essential for ranking test scores or creating sales leaderboards.
Syntax
=RANK(value, data, [is_ascending])
- value: The value whose rank will be determined (required).
- data: The cell range containing the dataset to consider (required).
- is_ascending: Whether to consider the values in
datain descending or ascending order (optional).0or omitted: Descending (largest value is ranked 1st)1(any non-zero value): Ascending (smallest value is ranked 1st)
Example with a Table
Here is an example of ranking sales from highest to lowest (descending).
| Rep | Sales | Formula | Result | Explanation |
|---|---|---|---|---|
| A | 80 | =RANK(B2, $B$2:$B$6) |
2 | 2nd place (tied) |
| B | 100 | =RANK(B3, $B$2:$B$6) |
1 | 1st place because 100 is the highest |
| C | 80 | =RANK(B4, $B$2:$B$6) |
2 | 2nd place (tied) |
| D | 60 | =RANK(B5, $B$2:$B$6) |
4 | 4th place because two people tied for 2nd |
| E | 50 | =RANK(B6, $B$2:$B$6) |
5 | 5th place |
Common Errors and Notes
- #N/A Error: Occurs if the first argument (
value) does not exist within the second argument (data). - Forgetting to lock the range: When copying formulas via autofill, make sure to use an absolute reference like
$B$2:$B$6for the second argument; otherwise, the comparison range will shift and produce incorrect ranks. - Difference from RANK.EQ: Google Sheets now provides
RANK.EQas the successor toRANK, and both functions work identically.
Frequently Asked Questions
Q. How do I rank the smallest number as 1st place?
A. Specify 1 for the third argument (is_ascending), for example: =RANK(B2, $B$2:$B$10, 1).
Q. What happens to ranks when there are ties (identical numbers)?
A. Tied values receive the same rank, and the next rank is skipped (e.g., if two people tie for 2nd, the next person is ranked 4th).