๐Ÿ“Š Data Spread

Quartiles & IQR Explained

Learn how to split data into four equal parts and measure the spread of the middle 50%.


๐Ÿ• 9 min read  |  Class 9โ€“12  |  FBISE ยท CBSE ยท IGCSE ยท O-Levels ยท IB

The median splits data into two halves. But what if you want to understand the spread more finely โ€” for instance, where the bottom quarter of students scored, or where the top quarter started? That is exactly what quartiles do. Together with the interquartile range (IQR), they give a powerful picture of how data is spread โ€” without being thrown off by extreme values at either end.

What Are Quartiles?

Quartiles divide an ordered data set into four equal parts. There are three quartile values:

  • Q1 (Lower Quartile / 25th percentile): 25% of data falls below this value.
  • Q2 (Median / 50th percentile): 50% of data falls below this value โ€” this is the ordinary median.
  • Q3 (Upper Quartile / 75th percentile): 75% of data falls below this value.
IQR = Q3 โˆ’ Q1

The IQR represents the spread of the middle 50% of the data. Because it ignores the bottom 25% and top 25%, it is not affected by outliers โ€” making it a robust measure of spread.

Step-by-Step: Finding Quartiles

Data: 3, 7, 8, 12, 15, 19, 24, 27, 31, 35, 40 (11 values, already sorted)

๐Ÿ“‹ Method 1: Odd Number of Values
1

Find Q2 (Median): 11 values โ†’ middle is position 6.

Q2 = 19
2

Find Q1: Lower half is {3, 7, 8, 12, 15} (5 values). Median of lower half is the 3rd value.

Q1 = 8
3

Find Q3: Upper half is {24, 27, 31, 35, 40} (5 values). Median of upper half is the 3rd value.

Q3 = 31
4

Calculate IQR:

IQR = Q3 โˆ’ Q1 = 31 โˆ’ 8 = 23

Identifying Outliers Using the IQR

One of the most important uses of IQR is detecting outliers โ€” values that fall suspiciously far from the rest of the data. The standard rule (called the 1.5 ร— IQR rule) is:

Lower fence = Q1 โˆ’ 1.5 ร— IQR
Upper fence = Q3 + 1.5 ร— IQR

Any value outside these fences is considered a potential outlier.

Using our example above (Q1 = 8, Q3 = 31, IQR = 23):

Lower Fence
8 โˆ’ 34.5 = โˆ’26.5
Upper Fence
31 + 34.5 = 65.5

Any data value below โˆ’26.5 or above 65.5 would be flagged as an outlier. In this data set, no outliers exist.

Box Plots and Quartiles

Quartiles are the foundation of a box plot (also called a box-and-whisker diagram). A box plot displays:

  • The minimum value (or lower fence)
  • Q1 โ€” left edge of the box
  • Q2 (Median) โ€” line inside the box
  • Q3 โ€” right edge of the box
  • The maximum value (or upper fence)

Box plots allow you to compare distributions of two or more data sets at a glance โ€” a skill that appears in almost every IGCSE and O-Level statistics exam.

Real-Life Applications

  • ๐Ÿฅ
    Medicine: Growth charts for children use percentiles (which are a form of quartiles). A child's height at the 25th percentile means 75% of children of the same age are taller.
  • ๐Ÿ’ผ
    Salary analysis: HR departments use IQR to understand the pay spread within the middle bulk of employees, ignoring the extremes (CEO salary vs. minimum wage workers).
  • ๐Ÿ“ฆ
    Quality control: Factories use IQR to set acceptable ranges for product dimensions. Anything outside the range is inspected or rejected.

Common Mistakes Students Make

โš ๏ธ Not sorting data first. Quartiles require data in ascending order. Skipping this step produces completely wrong answers.
โš ๏ธ Including Q2 in both halves. When finding Q1 and Q3 from an odd-count data set, do not include the median value (Q2) in either the lower or upper half.
โš ๏ธ Mixing up Q1 and Q3. Q1 is always the lower quartile (smaller value). Q3 is the upper quartile (larger value). IQR = Q3 โˆ’ Q1 is always positive.
โš ๏ธ Different methods give different results. There are several accepted methods for calculating quartiles (especially for even-count data). Your syllabus has a preferred method โ€” follow it consistently in exams.

Frequently Asked Questions

Percentiles divide data into 100 equal parts. Quartiles divide it into 4. Q1 = 25th percentile, Q2 = 50th percentile, Q3 = 75th percentile. Percentiles are more precise; quartiles are easier to compute by hand.
The range uses only the maximum and minimum โ€” two values that could be extreme outliers. The IQR ignores the bottom 25% and top 25%, so it describes the spread of the bulk of the data more fairly.
Yes. If at least half the data values are identical, Q1 and Q3 will both equal that value, giving IQR = 0. This means there is no spread in the middle 50% of the data.

Try the Quartile & IQR Calculator

Enter any list of numbers and instantly get Q1, Q2, Q3, IQR, and a box-plot summary โ€” with step-by-step working shown.

๐Ÿ“Š Open the Calculator โ†’