Order and ranking questions describe people in a row or a class list and give their positions from one or both ends. Nearly every question comes down to one idea: when you count a person's position from the top and from the bottom, that person is counted twice.

Total = position from top + position from bottom − 1

The same rule works for left and right in a row, or front and back in a queue. Rearranging it gives the position from the other end: position from bottom = total − position from top + 1.

Worked example 1: the total

Ravi is 14th from the top and 23rd from the bottom of his class. The class has 14 + 23 − 1 = 36 students.

Worked example 2: the other end

In a class of 40, Meena is 12th from the top. Her rank from the bottom is 40 − 12 + 1 = 29th.

A quick check: 12 + 29 − 1 = 40, which matches the class size.

When two people are given positions from opposite ends, first decide whether their counts overlap. Add the two positions. If the sum is less than the total, the two people have not crossed, and everyone not counted in either position stands between them.

No overlap: between = total − (a + b)

Worked example 3: no overlap

In a row of 50, A is 18th from the left and B is 20th from the right. 18 + 20 = 38 is less than 50, so between them stand 50 − 38 = 12 people.

If the sum is greater than the total, the two counts overlap. The simplest method is to convert both positions to the same end and count the places between them.

Overlap: between = a + b − total − 2

Worked example 4: overlap

In a row of 40, A is 25th from the left and B is 30th from the right. 25 + 30 = 55 is more than 40, so they overlap. Between them stand 25 + 30 − 40 − 2 = 13 people.

Check by converting: B is 40 − 30 + 1 = 11th from the left. Between the 11th and 25th places there are 13 people, as the formula said.

In an interchange question, two people swap places, and the question gives one new position. The key is that after the swap, each person stands exactly where the other used to stand. So a new position for one person tells you an old position for the other.

Worked example 5: a swap

In a row, A is 10th from the left and B is 15th from the right. They swap, and A becomes 20th from the left. A is now in B's old place, so that place is 20th from the left and 15th from the right. The row has 20 + 15 − 1 = 34 people.

Notice that A's original position, 10th from the left, was not needed. Interchange questions often include such extra numbers, and in some versions they ask you to find B's new position instead, which uses A's original position in the same way.

Some questions place a person relative to another: "5 ranks below", "3 places ahead". Convert the relative position into a position from one end before using the formula. "Below" or "behind" adds to a rank from the top; "above" or "ahead" subtracts.

Worked example 6: ranks below

Sita ranks 9th from the top. Gita is 5 ranks below Sita and 28th from the bottom. Gita is 9 + 5 = 14th from the top, so the class has 14 + 28 − 1 = 41 students.

Watch for students who are outside the ranking. If some failed and were not ranked, or were absent from the test, the formula gives only the number of ranked students. Add the others separately.

Worked example 7: unranked students

Raj is 10th from the top and 25th from the bottom among those who passed. 4 students failed and 2 were absent. The class has 10 + 25 − 1 + 4 + 2 = 40 students.

  • ✘ Forgetting the − 1 in the total, or adding 1 instead.
  • ✘ Using the no-overlap formula when the two positions overlap.
  • ✘ In interchange questions, combining the new position with the wrong person's old position.
  • ✘ Treating "5 ranks below" as rank 5 from the bottom.

Drawing a quick line of positions helps here, just as a family tree helps with blood relations. For more reasoning methods, see the study hub.

Q1. In a row, Rahul is 17th from the left and 12th from the right. How many people are in the row? easy

✅ Answer: (d) 28

💡 Explanation: Rahul is counted in both positions, so subtract him once: 17 + 12 − 1 = 28.

Q2. In a class of 45 students, Ankit ranks 16th from the top. What is his rank from the bottom? easy

✅ Answer: (a) 30th

💡 Explanation: Rank from the other end = total − rank + 1 = 45 − 16 + 1 = 30, so Ankit is 30th from the bottom.

Q3. In a row of 60 people, P is 22nd from the left and Q is 25th from the right. If P is to the left of Q and they do not overlap, how many people stand between them? medium

✅ Answer: (c) 13

💡 Explanation: P and the 21 people before him take 22 places, and Q and the 24 after him take 25. The rest stand between them: 60 − (22 + 25) = 13.

Q4. In a row of 30 children, X is 18th from the left and Y is 20th from the right. How many children are between X and Y? medium

✅ Answer: (b) 6

💡 Explanation: 18 + 20 = 38 is more than 30, so the counts overlap. Y is 30 − 20 + 1 = 11th from the left. Between the 11th and 18th places there are 18 − 11 − 1 = 6 children.

Q5. A is 8th from the left and B is 12th from the right in a row. They swap places, and A is now 15th from the left. How many people are in the row? hard

✅ Answer: (d) 26

💡 Explanation: After the swap A stands where B stood. That place is 15th from the left and, as B's old place, 12th from the right. Total = 15 + 12 − 1 = 26.

Q6. Mohan ranks 7th from the top. Sohan is 6 ranks below Mohan and 20th from the bottom. How many students are in the class? medium

✅ Answer: (a) 32

💡 Explanation: Sohan is 7 + 6 = 13th from the top and 20th from the bottom. Total = 13 + 20 − 1 = 32.

Why do we subtract 1 when adding the two positions?

The person is counted once when you count from the top and again when you count from the bottom. Adding the two positions counts that person twice, so subtract 1 to count everyone exactly once.

How can I tell whether two positions overlap?

Add the two positions and compare the sum with the total. If the sum is less than the total, the counts do not overlap. If it is more than the total, they overlap, and the persons have crossed over each other's counting ranges.

All problems and solutions on this page are original. No outside facts are relied on; every numeric answer is recomputed by software before publishing.

How this page was prepared. Drafted with AI assistance (Claude (Anthropic AI model)) from the sources listed above. 14 calculations on this page were recomputed by software and matched. Automated checks also covered structure, internal links and duplicate text. Software checks cannot confirm facts. Reviewed by praveenkumar on 2026-10-20 against the sources listed above.

Found an error? Report it and we will correct the page.