Two classes can share the same average and the same highest and lowest scores, and still be completely different places to teach. One is a tight pack, the other is scattered from top to bottom. Range, quartiles and the interquartile range (IQR) are the three tools that let you tell those classes apart, and they take about ten minutes to learn properly.
The problem with “the average”
I have reviewed reports for a long time, and the sentence that worries me most is: “the average delivery time is 27 minutes.” It sounds precise. But is every delivery close to 27, or do half arrive in 15 and the rest take 40? The average cannot tell you. It describes the centre of your data and says nothing about how spread out the values are.
Spread matters in daily life more than most people realise. A commute that averages 35 minutes but sometimes takes 75 makes you leave early. A salary band with an average of ₹67k that is really one founder and eight employees makes the average meaningless. A medicine that lowers blood pressure by 10 points on average but by 40 for some people and zero for others deserves a very different conversation.
So we describe data with two questions: where is the middle, and how far apart are the values? This article is about the second question, with the simplest measure first (range), the smarter measure next (IQR), and the quartiles that connect them.
The three ideas in one glance.
Range = biggest − smallest. Quartiles split sorted data into four equal-sized groups (Q1, Q2 = median, Q3). IQR = Q3 − Q1, the width of the middle half of your data.
Range: the quick, blunt measure
The range is the easiest statistic in the book. Sort the data, subtract the smallest from the largest, done. If eleven students score 52, 58, 61, 64, 67, 70, 72, 75, 78, 84 and 95, the range is 95 − 52 = 43 marks.
The range has real virtues. It is instant to compute, easy to explain to anyone, and good for sanity checks: a thermometer reading range of 200 degrees in one day tells you a sensor is broken. Many everyday questions are really range questions: “What is the cheapest and the most expensive flight?” “What are the coldest and hottest days this week?”
But the range has one serious flaw. It uses only two numbers, and they are the two most extreme ones. Everything in between is ignored. Change one value in the middle and the range does not budge. Change one extreme value and the range can explode. That makes it fragile.
Picture ten homes in a neighbourhood priced between ₹38 lakh and ₹64 lakh. Now a farmhouse worth ₹410 lakh sells at the edge of town. The range leaps from about 26 lakh to 372 lakh, even though nothing changed for the other nine families. That is exactly the situation where we need something sturdier.
Quartiles: cutting your data into four equal groups
You already know the idea from the median: line the data up in order and split it in half. Quartiles take that one step further and split the ordered data into four groups with (about) the same number of values in each.
- Q1 (first quartile, the 25th percentile): a quarter of the data sits at or below it.
- Q2 (second quartile): this is simply the median, with half the data on either side.
- Q3 (third quartile, the 75th percentile): three quarters of the data sits at or below it.
Here is a small example you can see rather than imagine. Twelve colleagues report their commute times in minutes. The dots are sorted, and colours mark the four groups of three.
Notice that quartiles are not fancy. They are just three cut-points that make four equal piles. Q1 is 28.5, the median is 36.5, and Q3 is 47.5 minutes. A quarter of people commute 28.5 minutes or less, half commute 36.5 or less, and three quarters commute 47.5 or less.
How to find quartiles by hand, step by step
Let me walk through the method most textbooks teach, using the eleven exam scores. This is the one I recommend learning first because you can do it on paper without any software.
Step 1: Sort the data
52, 58, 61, 64, 67, 70, 72, 75, 78, 84, 95. Always sort first. Skipping this step is the most common way to get a wrong answer.
Step 2: Find the median (Q2)
There are 11 values, so the middle one is the 6th: 70. Five values sit on each side.
Step 3: Find the median of the lower half (Q1)
The lower half is 52, 58, 61, 64, 67. Its middle value is 61. That is Q1.
Step 4: Find the median of the upper half (Q3)
The upper half is 72, 75, 78, 84, 95. Its middle value is 78. That is Q3.
Step 5: Subtract to get the IQR
IQR = Q3 − Q1 = 78 − 61 = 17. So the middle half of the class scored within a 17-mark window, even though the full range is 43.
What about an even number of values?
With 12 commute times, there is no single middle value, so the median is the average of the 6th and 7th values. Then you split the data cleanly into two halves of six and find the median of each. The lower half is 22, 25, 27, 30, 32, 35, and its median is (27 + 30) / 2 = 28.5. The upper half is 38, 41, 45, 50, 58, 75, and its median is (45 + 50) / 2 = 47.5. That is where Q1 = 28.5 and Q3 = 47.5 came from. No mystery.
Why your calculator and Excel sometimes disagree
Here is something nobody warns you about. If you compute quartiles in Excel and compare with the textbook, you may get a slightly different answer. That does not mean anyone made a mistake. There are several accepted methods for defining quartiles, and they agree on large data but can differ on small datasets. Here is the same exam data run through three common methods.
| Method | Q1 | Q3 | IQR |
|---|---|---|---|
| Median of halves (Tukey / most textbooks) | 61 | 78 | 17 |
| Inclusive, (n − 1)p, Excel QUARTILE.INC and NumPy default | 62.5 | 76.5 | 14 |
| Exclusive, (n + 1)p, Excel QUARTILE.EXC | 61 | 78 | 17 |
And for the twelve commute times:
| Method | Q1 | Q3 | IQR |
|---|---|---|---|
| Median of halves | 28.5 | 47.5 | 19 |
| Inclusive | 29.25 | 46.25 | 17 |
| Exclusive | 27.75 | 48.75 | 21 |
The answers differ by a point or two. In real analysis with hundreds of records, the difference is negligible. In an exam, follow the method your teacher uses. In a report, mention which method your software uses, or just stay consistent. I once saw a two-hour argument between two analysts who were both correct, using different quartile definitions. Do not be those two.
The five-number summary
Once you have quartiles, you can describe any dataset with just five numbers: minimum, Q1, median, Q3 and maximum. It is called the five-number summary, and it is the backbone of the box plot.
| Dataset | Min | Q1 | Median | Q3 | Max |
|---|---|---|---|---|---|
| Exam scores | 52 | 61 | 70 | 78 | 95 |
| Commute minutes | 22 | 28.5 | 36.5 | 47.5 | 75 |
| House prices (lakh) | 38 | 45 | 51 | 60 | 410 |
| Startup pay (₹k) | 28 | 31 | 36 | 43.5 | 320 |
| Delivery minutes | 18 | 22 | 26.5 | 31 | 52 |
Five numbers, and you already know where the centre is, how wide the middle half is, and how far the extremes reach. That is a lot of information in one row.
Same range, very different classes
Now the payoff. Here are two classes of ten students. Both have a lowest score of 45 and a highest of 95. Both have a range of 50. Any teacher looking only at the range would say the classes look identical.
Class X has an IQR of only 6. Most students scored between 62 and 68, with two students far away at the edges. Class Y has an IQR of 25, with scores spread evenly from 55 to 80 in the middle half. Same range, wildly different teaching challenges. In Class X you teach to the pack and support two outliers. In Class Y you need differentiated instruction across the whole room.
This is why I say the IQR is often the honest sibling of the range. It answers “how spread out are the typical values?” rather than “how far apart are the two weirdest values?”
Outliers and the 1.5 × IQR rule
The IQR does a second job that I use constantly: it gives you a fair way to flag unusual values. The statistician John Tukey proposed a simple rule that is now standard in box plots.
For the exam scores, the fences are 35.5 and 103.5, so nobody is unusual. Now look at the startup where nine people earn between 28 and 45 (thousand rupees a month) and the founder takes 320.
The upper fence is 62.25, so 320 is flagged. Two things are worth noticing. The mean pay is 67.2, higher than eight of the nine people, so the average paints a false picture. The median is 36, which is far more representative. And the IQR of 12.5 describes the spread among typical employees, uninfluenced by the founder. Whenever a dataset has one or two giant values, the median and the IQR should be your default pair.
A word of caution I give every junior analyst: an outlier flag is a prompt to investigate, not a permission slip to delete. It might be an error (someone typed 410 instead of 41), or it might be the most important data point you have. Look before you remove.
Range versus IQR on the same datasets
To see the difference at a glance, here are four datasets used in this article, each with its range (orange) and IQR (navy).
For exam scores and commute times the two measures are in the same neighbourhood. For house prices and startup pay, the range towers over the IQR because of one extreme value. That gap is itself a diagnostic: when the range is many times bigger than the IQR, you almost certainly have outliers or heavy skew.
Five real cases to explore
Tap a tab below. Each example uses actual numbers I ran through the method, with the sorted data shown so you can check my work by hand.
Exam scores
Eleven students sit a test. Sorted data: 52, 58, 61, 64, 67, 70, 72, 75, 78, 84, 95.
What it tells you. The lowest score is 52 and the highest 95, so the range is 43. The median is 70. Q1 is 61 and Q3 is 78, so the IQR is 17. The middle half of the class is packed into a 17-mark band, while one high scorer stretches the range. Fences: 35.5 to 103.5, so nobody is flagged as an outlier.
Commute times
Twelve colleagues report their door-to-door commute. Sorted data: 22, 25, 27, 30, 32, 35, 38, 41, 45, 50, 58, 75.
What it tells you. The range is 53 minutes, but the IQR is only 19. The median is 36.5. The upper fence is 76, so a 75-minute commute is long but not an outlier. When you tell a new hire “most people travel between 28.5 and 47.5 minutes,” you are quoting the IQR.
House prices
Ten homes sold in one neighbourhood, prices in lakh rupees. One is a large farmhouse. Sorted data: 38, 42, 45, 48, 50, 52, 55, 60, 64, 410.
What it tells you. The range is 372 lakh, driven entirely by the farmhouse at 410. The IQR is just 15. The fences are 22.5 and 82.5, so 410 is flagged as an outlier. Quoting the range would make the market look wildly unpredictable. The IQR tells you what a typical buyer will actually see.
Startup pay
Nine people work at a small startup, monthly pay in thousand rupees. The founder is on the far right. Sorted data: 28, 30, 32, 34, 36, 38, 42, 45, 320.
What it tells you. The range is 292, the IQR is 12.5. The median is 36, so half of the team earns 36 or less. The founder’s 320 is far beyond the upper fence of 62.25. Averages and ranges get dragged by a single big number, but quartiles barely notice.
Delivery times
Fourteen food orders are timed from kitchen to door. Sorted data: 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 31, 33, 36, 52.
What it tells you. The median delivery took 26.5 minutes and the IQR was 9. The upper fence is 44.5, so the 52-minute order is flagged as an outlier. A restaurant manager can promise “22 to 31 minutes for most orders” and investigate the slowest one separately.
In every tab, the same routine applies: sort, find the median, find the halves’ medians, subtract, check the fences. Learn the routine once and you can use it on any list of numbers, from test marks to server response times.
Reading a box plot like a professional
A box plot squeezes the five-number summary into a picture. Once you know the anatomy, you can read one at a glance.
- The box spans Q1 to Q3, so its width is the IQR. A wide box means a wide spread among typical values.
- The line inside is the median. If it is off-centre in the box, the data is skewed.
- The whiskers reach the smallest and largest values that are still inside the fences.
- The dots beyond the whiskers are the flagged outliers.
Two extra reading tips. If the median sits close to Q1 and the upper whisker is long, the data is skewed to the right, as with incomes or house prices. And when you compare several box plots, look at the boxes first and the whiskers second. The boxes tell you about typical performance, and the whiskers tell you about extremes.
Where these measures show up in real life
Recruiters quote the 25th to 75th percentile pay range for a role. That is Q1 to Q3.
Delivery and support teams report the median and the 75th percentile, not just the average.
Paediatric charts use percentiles. A child at the 25th percentile of height is at Q1 for their age.
Engineers use the IQR to detect sensor readings or parts that are far outside the normal spread.
In finance, the middle 50% of returns or prices is often more informative than the extremes. In education, admissions offices publish the middle 50% of test scores for admitted students. In sports analytics, a player’s IQR of scores describes consistency: a wide IQR means unpredictable, a narrow one means reliable.
Range, IQR or standard deviation?
You will sometimes be asked which measure of spread to use. Here is my rule of thumb after years of picking wrongly and correcting myself.
- Use the range for quick checks, small datasets and situations where the extremes themselves matter, such as safety limits.
- Use the IQR with the median when the data is skewed or contains outliers: incomes, prices, response times, hospital stays.
- Use the standard deviation with the mean when the data is roughly symmetric and you plan further statistical work.
None of these is universally best. Each answers a slightly different question, and reporting two of them together, such as the median and the IQR, usually gives a fair picture.
Seven mistakes I see all the time (tap to open)
1. Forgetting to sort the data first
Quartiles depend on order. If you pick the “middle” of an unsorted list, you are just picking a random value.
2. Reporting the range as if it describes typical spread
The range describes the extremes only. For typical spread use the IQR.
3. Including the median in both halves inconsistently
With an odd number of values, decide up front whether the median is left out of the halves, and stay consistent. Most textbooks leave it out.
4. Assuming Excel and your textbook must agree
Different quartile definitions exist. Small differences are normal, especially with few values.
5. Deleting outliers automatically
Flagged values are a prompt to investigate. They may be errors, or they may be exactly the story.
6. Confusing IQR with the range of the middle
The IQR is Q3 minus Q1, not the difference between the 2nd and 3rd smallest values. It is defined by the quartiles.
7. Comparing IQRs across different units
An IQR of 15 minutes and an IQR of 15 kilos cannot be compared. To compare relative spread, divide by the median or use another scale-free measure.
Quick quiz: test yourself
Tap each question to reveal the answer and the working.
Data: 4, 7, 9, 12, 15, 18, 20, 23. What is the range?
- 16
- 19
- 23
- 12
Range = maximum − minimum = 23 − 4 = 19.
For the same data, what is the median?
- 9
- 15
- 13.5
- 12
Eight values, so the median is the average of the 4th and 5th: (12 + 15) / 2 = 13.5.
For the same data (median of halves), what is the IQR?
- 11
- 19
- 8
- 13.5
Lower half 4, 7, 9, 12 has median 8. Upper half 15, 18, 20, 23 has median 19. IQR = 19 − 8 = 11.
Q1 = 20 and Q3 = 30. What upper fence flags outliers?
- 35
- 40
- 45
- 50
IQR = 10. Upper fence = Q3 + 1.5 × IQR = 30 + 15 = 45. Anything above 45 is flagged.
Why is the IQR preferred to the range for skewed data with extreme values?
- It is easier to spell
- It uses every value
- It is always larger
- It ignores the extreme 25% at each end
The IQR looks only at the middle half of the data, so a single extreme value cannot distort it.
Frequently asked questions
What is the difference between range and IQR?
The range is the maximum minus the minimum, so it depends entirely on the two most extreme values. The IQR is Q3 minus Q1, the spread of the middle 50% of the data, so it is far more stable.
How do I find quartiles by hand?
Sort the data, find the median (Q2), then find the median of the lower half (Q1) and the median of the upper half (Q3). With an odd number of values, textbooks differ on whether the median belongs in the halves, so check what your course expects.
Why does Excel give different quartiles from my textbook?
Several valid quartile methods exist. Excel’s QUARTILE.INC and NumPy interpolate using (n − 1)p, QUARTILE.EXC uses (n + 1)p, and many textbooks use the median of halves. For small datasets they can differ slightly.
What is the 1.5 × IQR rule?
A common rule of thumb from John Tukey: values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR are flagged as potential outliers. It is a flag for a closer look, not proof that a value is wrong.
What does a box plot show?
The box runs from Q1 to Q3 with a line at the median. The whiskers reach the most extreme values inside the fences, and dots beyond them are potential outliers.
When should I use standard deviation instead of IQR?
Use standard deviation for roughly symmetric data without extreme outliers, especially when you plan further calculations. Use the IQR with the median for skewed data or data with outliers.
The takeaway
The range tells you how far the extremes stretch. The quartiles tell you how the data is arranged in between. The IQR tells you how wide the middle half is, and it does so without being pulled around by extreme values. Sort, split, subtract, and check the fences.
Next time somebody quotes an average and a range and stops there, ask for the median and the IQR. You will understand the data better than most people in the room.
