How to find quartiles and the interquartile range
Quartiles divide a rank-ordered dataset into four equal parts. The Interquartile Range (IQR) measures the spread of the middle 50% of the data. This method applies to any univariate numerical dataset. Use it to identify outliers and assess data dispersion.
The setup
Order the dataset from smallest to largest. Count the total number of observations, let this be .
The steps
- Find the median (Second Quartile, ). If is odd, is the exact middle value. If is even, is the average of the two middle values. 2. Find the First Quartile (). This is the median of the lower half of the data. Exclude from this half if is odd. 3. Find the Third Quartile (). This is the median of the upper half of the data. Exclude from this half if is odd. 4. Calculate the Interquartile Range (IQR). Subtract from : .
Checking the result
Verify that . Approximately 25% of the data points should fall below , 50% below , and 75% below .
Common errors
Forgetting to sort the dataset before finding the quartiles is a standard mistake. Another error is including the median in the upper and lower halves when computing and for an odd-numbered dataset.
Worked example
Find the quartiles and IQR for the dataset: 12, 5, 22, 30, 7, 36, 14, 42, 15, 53, 25.
Order the data: 5, 7, 12, 14, 15, 22, 25, 30, 36, 42, 53. Count . Find : The middle value is in the 6th position. . Find : The lower half is 5, 7, 12, 14, 15. The median of this half is 12. . Find : The upper half is 25, 30, 36, 42, 53. The median of this half is 36. . Calculate IQR: .
FAQ
Run your own problem
References: OpenStax Introductory Statistics, Chapter 2 · Khan Academy: Summarizing quantitative data
See also