Class Rank (with Tie Handling)

Excel Formulas › Education & Grading

All versionsRANK

Rank students by grade with RANK — highest grade is rank 1. A small add-on produces a dense or tie-broken ranking so two students don’t awkwardly share or skip positions.


Quick formula: rank a grade highest-first:
=RANK(grade, all_grades, 0)
RANK with order 0 ranks largest as 1. Ties share a rank and the next rank is skipped.

Functions used (tap for the full reference guide):

The example

92 ranks above 88.

AB
1GradeRank
2921
3882

The formula

The formula:

=RANK(B2, $B$2:$B$30, 0) // highest grade = rank 1

How it works

How it works:

  1. RANK(grade, range, 0) ranks the highest grade as 1 (order 0 = descending).
  2. Lock the range with absolute references so every row ranks against the whole class.
  3. Ties get the same rank, and the next position is skipped (two 1sts, no 2nd).
  4. Break ties by a tiebreaker, or build a dense rank with COUNTIF (no skipped numbers).

Tie-broken & dense ranks: add a small tiebreaker — RANK(g, range) + COUNTIF($B$2:B2, g) - 1 gives each tie a unique position. For a dense rank (1,2,2,3 instead of 1,2,2,4), use SUMPRODUCT((unique_higher_grades)) or count distinct higher values. Pick the convention your school uses.

Try it: interactive demo

Live demo

Grades; see one student’s rank.

Rank:

Variations

Tie-broken rank

Unique positions:

=RANK(g, range, 0) + COUNTIF($B$2:B2, g) - 1

Percentile rank

Top X%:

=PERCENTRANK(all_grades, grade)

Rank within section

By class:

=COUNTIFS(section, this_section, grades, ">"&grade) + 1

Pitfalls & errors

Lock the range. Forgetting absolute references ranks each student against a shifting subset.

Order argument. Use 0 for highest-first; 1 ranks lowest-first.

Ties skip numbers. Plain RANK gives 1,1,3 — add a tiebreaker if that’s a problem.

Practice workbook

📊
Download the free Class Rank (with Tie Handling) practice workbook
A class-rank sheet with the tie-broken, percentile, and within-section variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I rank students by grade in Excel?
Use =RANK(grade, all_grades, 0) so the highest grade is rank 1. Lock the range with absolute references.
How do I handle ties in ranking?
Add a tiebreaker: =RANK(g, range, 0) + COUNTIF($B$2:B2, g) - 1 gives each tied student a unique position.
How do I rank within a class section?
Use =COUNTIFS(section, this_section, grades, ">"&grade) + 1 to rank only within the matching section.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Rank values · Rank within group · Percent rank

Function references: RANKCOUNTIF