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
| Parameter | Description |
|---|---|
| number | The value to rank. |
| ref | The 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
- •In modern Excel, use RANK.EQ (same as RANK) or RANK.AVG (averages ties).
- •Lock the reference range with $ signs when copying the formula down.
- •To create unique ranks without ties, add a small tiebreaker: =RANK(B2,$B$2:$B$50)+COUNTIF($B$2:B2,B2)-1.
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