What Are Quartiles?
Quartiles are the three values that split a sorted dataset into four groups of equal size. The first quartile (Q1) marks the boundary below which 25% of your data falls. The second quartile (Q2), also known as the median, separates the lower and upper halves. The third quartile (Q3) indicates the point where 75% of the data lies below and 25% above.
This approach is particularly powerful when datasets contain outliers or skewed distributions. For example, if you're examining student test scores, the mean might be distorted by one extremely high or low performer. Quartiles instead focus on where most students cluster, giving a clearer picture of typical performance.
The distance between Q1 and Q3 is called the interquartile range (IQR), which captures the spread of the central 50% of your data.
Quartile Formulas
To calculate quartiles, use these position-based formulas where n is the number of data points:
Q1 position = (n + 1) ÷ 4
Q2 position = (n + 1) ÷ 2
Q3 position = 3(n + 1) ÷ 4
IQR = Q3 − Q1
n— Total count of data points in your datasetQ1— First quartile—the value at the 25th percentileQ2— Second quartile or median—the value at the 50th percentileQ3— Third quartile—the value at the 75th percentileIQR— Interquartile range—the spread of the middle 50% of data
How to Calculate Quartiles Manually
Start by arranging your data in ascending order. For a dataset with 24 values, follow these steps:
- Find the median: With an even count (24), average the two middle values (positions 12 and 13). If your ordered data has values 30 and 30 in those positions, the median is 30.
- Locate Q1: Find the median of the lower half—all values below the overall median. This becomes Q1.
- Locate Q3: Find the median of the upper half—all values above the overall median. This becomes Q3.
- Calculate IQR: Subtract Q1 from Q3 to get the interquartile range.
Different methods exist (Tukey's hinges, linear interpolation, etc.), and slight variations may occur depending on the algorithm used. Most statistical software applies consistent, reproducible methods.
Real-World Example
Imagine a high school class with 24 test scores out of 50 points: 9, 12, 17, 19, 21, 21, 22, 22, 25, 27, 29, 30, 30, 32, 33, 36, 37, 38, 40, 42, 42, 44, 45, 48.
After ordering (already done above), you find:
- Median (Q2) = (30 + 30) ÷ 2 = 30
- Q1 (median of lower 12 values) = (21 + 22) ÷ 2 = 21.5
- Q3 (median of upper 12 values) = (38 + 40) ÷ 2 = 39
- IQR = 39 − 21.5 = 17.5
This tells the teacher that half the class scored between 21.5 and 39, with typical scores clustering around 30. The relatively tight IQR suggests consistent performance across the middle range.
Key Considerations When Using Quartiles
Avoid common pitfalls when interpreting quartile analysis:
- Don't confuse quartiles with quadrants — Quartiles refer to data positions, not chart regions. When presenting a scatter plot, mention 'quartile thresholds' clearly if using them to divide the display, since many interpret 'quadrants' as visual chart regions.
- Watch for tied values at quartile boundaries — If multiple data points share the same value near Q1 or Q3, different calculation methods may yield slightly different results. Always note which methodology your analysis software employs.
- Ensure data is sorted before calculating — Quartiles require ordered data. Missing this step is a common mistake that invalidates all subsequent calculations. Double-check your dataset is arranged from smallest to largest.
- Remember quartiles don't show absolute values — Quartiles describe relative position and spread, not magnitude. A dataset with values 1–10 and another with 1,000–10,000 may have identical quartile structures but very different real-world implications.