Skip to content
Family Table Math
Auto

Quartiles and Percentiles

The median splits a data set in half. Quartiles go one step further and split it into quarters, and percentiles split it into hundredths. They tell you where a value stands compared with the rest (“better than 80%80\% of the class”) and give a way to measure spread and spot outliers that isn’t fooled by extreme values. A boxplot puts all of this into one simple picture.

Quartiles divide ordered data into four parts with about the same number of values in each.

  • Q1Q_1 (the lower quartile) is the median of the lower half of the data.
  • Q2Q_2 is the median of the whole data set.
  • Q3Q_3 (the upper quartile) is the median of the upper half.

The method used on this site:

  1. Put the data in order and find the median.
  2. Split the data into a lower half and an upper half. If nn is odd, leave the median out of both halves. If nn is even, the halves are simply the first n2\dfrac{n}{2} and the last n2\dfrac{n}{2} values.
  3. Q1Q_1 is the median of the lower half, and Q3Q_3 is the median of the upper half.

Graphing calculators, spreadsheets, and statistics software don’t all use this exact method. (For example, a spreadsheet’s QUARTILE function uses a different rule.) Their answers may differ slightly from yours, especially for small data sets. That’s normal: just be consistent and say which method you used.

The interquartile range is the spread of the middle half of the data:

IQR=Q3−Q1\text{IQR} = Q_3 - Q_1

Unlike the range (maximum minus minimum), the IQR is barely affected by outliers, because it ignores the lowest and highest quarters. For other measures of spread, see standard deviation.

The five-number summary of a data set is

minimum,Q1,median,Q3,maximum\text{minimum}, \quad Q_1, \quad \text{median}, \quad Q_3, \quad \text{maximum}

A value is an outlier if it is more than 1.5×IQR1.5 \times \text{IQR} below Q1Q_1 or above Q3Q_3. The cut-offs are called fences:

lower fence=Q1−1.5×IQRupper fence=Q3+1.5×IQR\text{lower fence} = Q_1 - 1.5 \times \text{IQR} \qquad \text{upper fence} = Q_3 + 1.5 \times \text{IQR}

Any value below the lower fence or above the upper fence is an outlier.

A boxplot (or box-and-whisker plot) shows the five-number summary on a number line:

  • the box goes from Q1Q_1 to Q3Q_3, with a line at the median;
  • the whiskers go from the box out to the smallest and largest values that are not outliers;
  • outliers are plotted as separate dots.
Boxplot of daily phone use for 12 students. Whiskers from 45 to 130, box from Q1 = 76 to Q3 = 115, median 92.5. The value 240 is beyond the upper fence of 173.5 and is plotted as an outlier. outlier upper fence 173.5 45 76 92.5 115 130 240 min Q1 Q3 median whisker end 0 40 80 120 160 200 240 daily phone use (minutes)
The boxplot for Example 2. The whisker stops at 130130, the largest value that isn’t an outlier.

Each of the four sections (left whisker, left half of the box, right half of the box, right whisker) holds about a quarter of the data. A long section doesn’t mean more data; it means the data in that quarter are more spread out.

The kkth percentile is the value that about k%k\% of the data fall below. On this site, the percentile rank of a value is the percentage of the data that are below it:

percentile rank=number of values below xn×100\text{percentile rank} = \frac{\text{number of values below } x}{n} \times 100

rounded to a whole number. (Some textbooks also count half of the values equal to xx; the answers come out close.)

Quartiles are special percentiles: Q1Q_1 is about the 25th percentile, the median is the 50th, and Q3Q_3 is about the 75th.

A percentile is not a percentage mark. Being at the 90th percentile on a test means you did better than about 90%90\% of the people who wrote it, not that you scored 90%90\%.

When data follow a normal distribution, you can find percentiles from z-scores instead of from a list of values.

On the SAT, quartiles usually come up through boxplots: read the median, the quartiles, and the range or IQR straight off the plot, with no calculator needed (IQR == Q3 −- Q1). If you’re given raw data, sort it first; Desmos can do this with sort(L) after you type L = [...], and median(L) gives the median. Remember that the box shows the middle half of the data, so a longer box means more spread in the middle, not more data values. See using Desmos on the SAT.

Find the quartiles and the IQR of these 99 test scores:

55, 62, 68, 70, 74, 79, 81, 88, 9355,\ 62,\ 68,\ 70,\ 74,\ 79,\ 81,\ 88,\ 93

Solution. The data are already in order. With n=9n = 9, the median is the 5th value: 7474.

Leave the median out. The lower half is 55,62,68,7055, 62, 68, 70, so

Q1=62+682=65Q_1 = \frac{62 + 68}{2} = 65

The upper half is 79,81,88,9379, 81, 88, 93, so

Q3=81+882=84.5Q_3 = \frac{81 + 88}{2} = 84.5 IQR=84.5−65=19.5\text{IQR} = 84.5 - 65 = 19.5

Example 2: Five-number summary, outliers, and a boxplot

Section titled “Example 2: Five-number summary, outliers, and a boxplot”

Twelve students recorded their daily phone use in minutes:

45, 60, 72, 80, 85, 90, 95, 100, 110, 120, 130, 24045,\ 60,\ 72,\ 80,\ 85,\ 90,\ 95,\ 100,\ 110,\ 120,\ 130,\ 240

Find the five-number summary, check for outliers, and describe the boxplot.

Solution. With n=12n = 12 (even), the median is the mean of the 6th and 7th values:

median=90+952=92.5\text{median} = \frac{90 + 95}{2} = 92.5

The lower half is the first six values, 45,60,72,80,85,9045, 60, 72, 80, 85, 90, so Q1=72+802=76Q_1 = \dfrac{72 + 80}{2} = 76.

The upper half is 95,100,110,120,130,24095, 100, 110, 120, 130, 240, so Q3=110+1202=115Q_3 = \dfrac{110 + 120}{2} = 115.

Five-number summary: 45, 76, 92.5, 115, 24045,\ 76,\ 92.5,\ 115,\ 240.

Now the fences:

IQR=115−76=39lower fence=76−1.5(39)=76−58.5=17.5upper fence=115+1.5(39)=115+58.5=173.5\begin{aligned} \text{IQR} &= 115 - 76 = 39 \\ \text{lower fence} &= 76 - 1.5(39) = 76 - 58.5 = 17.5 \\ \text{upper fence} &= 115 + 1.5(39) = 115 + 58.5 = 173.5 \end{aligned}

No value is below 17.517.5, but 240>173.5240 \gt 173.5, so 240240 is an outlier.

In the boxplot (shown above), the box runs from 7676 to 115115 with a line at 92.592.5. The left whisker goes down to 4545. The right whisker stops at 130130, the largest value that isn’t an outlier, and 240240 is drawn as a separate dot.

In a class of 3030, Jun’s mark on a test was higher than the marks of 2424 classmates. Find Jun’s percentile rank and explain what it means.

Solution.

percentile rank=2430×100=80\text{percentile rank} = \frac{24}{30} \times 100 = 80

Jun is at the 80th percentile: about 80%80\% of the class scored lower than he did. This says nothing about his actual mark. On a hard test, the 80th percentile might be a 68%68\%.

Two Grade 12 classes wrote the same test. Their five-number summaries are:

MinQ1Q_1MedianQ3Q_3Max
Class A52526464717178789090
Class B58587070747477778585

Compare the two classes.

Solution.

  • Centre: Class B’s median (7474) is higher than Class A’s (7171), so a typical student in B did a little better.
  • Spread: Class A’s IQR is 78−64=1478 - 64 = 14, and Class B’s is 77−70=777 - 70 = 7. The middle half of Class B is much more tightly grouped, so B’s results are more consistent.
  • Extremes: Class A had the highest mark (9090), but also the lowest (5252).
  • In Class B, about 75%75\% of students scored 7070 or more (since Q1=70Q_1 = 70). In Class A, 7070 is between Q1=64Q_1 = 64 and the median, so somewhere between 50%50\% and 75%75\% scored that well.

Forgetting to sort the data. Quartiles, like the median, only make sense for ordered data.

Switching quartile methods partway through. With the method on this site, leave the median out when nn is odd. Including it is another method some books and calculators use, and it gives slightly different quartiles, so pick one method and stick to it.

Drawing the whisker all the way to an outlier. Whiskers stop at the most extreme values that are not outliers. Outliers get their own dot.

Thinking a longer section of a boxplot holds more data. Every section holds about 25%25\% of the data. A longer section means those values are more spread out.

Confusing percentile with percent. The 70th percentile means “better than about 70%70\% of people”, not “a mark of 70%70\%”.

Using 1.5 × IQR from the median. The fences are measured from Q1Q_1 and Q3Q_3, not from the median.

1. (Warm-up) Find the five-number summary: 3,5,7,8,12,13,14,18,213, 5, 7, 8, 12, 13, 14, 18, 21.

Solution

n=9n = 9, so the median is the 5th value, 1212. Lower half: 3,5,7,83, 5, 7, 8, so Q1=5+72=6Q_1 = \dfrac{5 + 7}{2} = 6. Upper half: 13,14,18,2113, 14, 18, 21, so Q3=14+182=16Q_3 = \dfrac{14 + 18}{2} = 16.

Five-number summary: 3, 6, 12, 16, 213,\ 6,\ 12,\ 16,\ 21.

2. (Warm-up) Find Q1Q_1, the median, Q3Q_3, and the IQR: 22,25,27,30,31,34,36,38,41,4522, 25, 27, 30, 31, 34, 36, 38, 41, 45.

Solution

n=10n = 10, so the median is 31+342=32.5\dfrac{31 + 34}{2} = 32.5.

Lower half: 22,25,27,30,3122, 25, 27, 30, 31, so Q1=27Q_1 = 27. Upper half: 34,36,38,41,4534, 36, 38, 41, 45, so Q3=38Q_3 = 38.

IQR=38−27=11\text{IQR} = 38 - 27 = 11.

3. (Warm-up) A doctor says a toddler’s height is at the 85th percentile for her age. What does this mean?

Solution

About 85%85\% of toddlers her age are shorter than she is (and about 15%15\% are taller). It doesn’t mean anything is "85%85\%" about her height.

4. (Core) Use the 1.5×IQR1.5 \times \text{IQR} rule to check for outliers: 12,15,16,18,19,20,22,23,25,4112, 15, 16, 18, 19, 20, 22, 23, 25, 41.

Solution

n=10n = 10. Lower half: 12,15,16,18,1912, 15, 16, 18, 19, so Q1=16Q_1 = 16. Upper half: 20,22,23,25,4120, 22, 23, 25, 41, so Q3=23Q_3 = 23.

IQR=23−16=7lower fence=16−10.5=5.5upper fence=23+10.5=33.5\begin{aligned} \text{IQR} &= 23 - 16 = 7 \\ \text{lower fence} &= 16 - 10.5 = 5.5 \\ \text{upper fence} &= 23 + 10.5 = 33.5 \end{aligned}

41>33.541 \gt 33.5, so 4141 is an outlier. No value is below 5.55.5.

5. (Core) A boxplot of quiz scores has this five-number summary: 40, 55, 62, 70, 9540,\ 55,\ 62,\ 70,\ 95.

  • (a) About what percentage of scores are between 5555 and 7070?
  • (b) About what percentage are above 6262?
  • (c) Is the maximum, 9595, an outlier?
Solution

(a) About 50%50\% (the box holds the middle half).

(b) About 50%50\% (6262 is the median).

(c) IQR=70−55=15\text{IQR} = 70 - 55 = 15, and the upper fence is 70+1.5(15)=92.570 + 1.5(15) = 92.5. Since 95>92.595 \gt 92.5, yes, 9595 is an outlier. The boxplot should show it as a dot, with the whisker ending at the largest score that isn’t an outlier.

6. (Core) In a class of 3232 students, Leo’s mark was higher than 2626 other students’ marks. Find his percentile rank.

Solution2632×100=81.25\frac{26}{32} \times 100 = 81.25

Leo is at about the 81st percentile.

7. (Core) Two track teams recorded their long jumps in metres.

MinQ1Q_1MedianQ3Q_3Max
Team X3.13.13.83.84.24.24.54.55.05.0
Team Y2.92.93.53.54.04.04.94.95.65.6
  • (a) Which team had the longest single jump?
  • (b) Which team has the higher median?
  • (c) Find each team’s IQR. Which team is more consistent?
Solution

(a) Team Y (5.65.6 m).

(b) Team X (4.24.2 m compared with 4.04.0 m).

(c) Team X: 4.5−3.8=0.74.5 - 3.8 = 0.7 m. Team Y: 4.9−3.5=1.44.9 - 3.5 = 1.4 m. Team X is more consistent: the middle half of its jumps are spread over half the distance.

8. (Challenge) The ordered data set 4,7,x,10,12,15,19,224, 7, x, 10, 12, 15, 19, 22 has an IQR of 99, where 7≤x≤107 \le x \le 10. Find xx.

Solution

n=8n = 8. The upper half is 12,15,19,2212, 15, 19, 22, so Q3=15+192=17Q_3 = \dfrac{15 + 19}{2} = 17.

The lower half is 4,7,x,104, 7, x, 10, so Q1=7+x2Q_1 = \dfrac{7 + x}{2}.

17−7+x2=97+x2=8x=9\begin{aligned} 17 - \frac{7 + x}{2} &= 9 \\ \frac{7 + x}{2} &= 8 \\ x &= 9 \end{aligned}

Check: Q1=7+92=8Q_1 = \dfrac{7 + 9}{2} = 8 and IQR=17−8=9\text{IQR} = 17 - 8 = 9. ✓

9. (Challenge) For the data in Question 1, a classmate includes the median in both halves when finding the quartiles. What does the classmate get for Q1Q_1 and Q3Q_3? Why do the answers differ, and which is right?

Solution

Including the median 1212, the lower half is 3,5,7,8,123, 5, 7, 8, 12, so Q1=7Q_1 = 7. The upper half is 12,13,14,18,2112, 13, 14, 18, 21, so Q3=14Q_3 = 14.

With our method, Q1=6Q_1 = 6 and Q3=16Q_3 = 16. The answers differ because the halves contain different values. Neither is “wrong”: statisticians use several methods, and calculators and spreadsheets pick different ones. The differences shrink as data sets get larger. What matters is using one method consistently and saying which one you used.