
Quartile Calculator
Free quartile calculator: find Q1, Q2, Q3, and the IQR using the median-of-halves method, with worked examples for odd and even data sets.
There was an error with your calculation.
| Quartile Statistics | |
|---|---|
| First Quartile (Q1) | 25 |
| Second Quartile (Q2) | 55 |
| Third Quartile (Q3) | 75 |
| Interquartile Rang (IQR) | 50 |
| Median = Q2 (x˜) | 55 |
| Minimum | 10 |
| Maximum | 100 |
| Range (R) | 90 |
Quartile calculator at a glance#
Quartiles split a sorted data set into four equal parts. The first quartile (Q1) is the 25th percentile, the second quartile (Q2) is the median, and the third quartile (Q3) is the 75th percentile. The interquartile range is IQR = Q3 - Q1, the spread of the middle half of the data. To find them, sort the data, take the median for Q2, then take the median of the lower half for Q1 and the median of the upper half for Q3.
Worked example: for the sorted set 10, 20, 20, 30, 40, 50, 50, 60 the lower half is 10, 20, 20, 30 and the upper half is 40, 50, 50, 60. Q2 is the median of all eight values, (30 + 40) / 2 = 35. Q1 is the median of the lower half, (20 + 20) / 2 = 20. Q3 is the median of the upper half, (50 + 50) / 2 = 50. The IQR is Q3 - Q1 = 50 - 20 = 30.
| Measure | Calculation | Value |
|---|---|---|
| Q1 (lower quartile) | median of 10, 20, 20, 30 | 20 |
| Q2 (median) | (30 + 40) / 2 | 35 |
| Q3 (upper quartile) | median of 40, 50, 50, 60 | 50 |
| IQR | 50–20 | 30 |
Enter your numbers in the calculator above for the exact Q1, Q2, Q3 and IQR, along with the minimum, maximum and range. Some tools use a slightly different rule for splitting the halves, so quartile values can vary a little between calculators on the same data.
The median-of-halves method#
This calculator finds quartiles with the median-of-halves method (also called Tukey hinges). Sort the data and take the median for Q2. Q1 is the median of the lower half, Q3 is the median of the upper half. When the count is odd, the median itself belongs to neither half, so you exclude it before splitting. Some tools use a slightly different splitting rule, which is why quartile values can vary a little between calculators on the same data.
Worked example with an odd count#
Take nine values: 2, 4, 6, 8, 10, 12, 14, 16, 18. The middle value is 10, so Q2 = 10. Exclude it and the lower half is 2, 4, 6, 8 with median (4 + 6) / 2 = 5, so Q1 = 5. The upper half is 12, 14, 16, 18 with median (14 + 16) / 2 = 15, so Q3 = 15. The interquartile range is Q3 minus Q1 = 15 minus 5 = 10.
Worked example with an even count#
Take eight values: 3, 5, 7, 8, 12, 13, 14, 18. With an even count there is no single middle value, so Q2 is the average of the two middle numbers, (8 + 12) / 2 = 10. The lower half is 3, 5, 7, 8 with median (5 + 7) / 2 = 6, so Q1 = 6. The upper half is 12, 13, 14, 18 with median (13 + 14) / 2 = 13.5, so Q3 = 13.5. The IQR is 13.5 minus 6 = 7.5.
| Measure | Odd Set Example | Even Set Example |
|---|---|---|
| Q1 (25th percentile) | 5 | 6 |
| Q2 (median) | 10 | 10 |
| Q3 (75th percentile) | 15 | 13.5 |
| IQR (Q3 - Q1) | 10 | 7.5 |
The interquartile range and outliers#
The IQR is the spread of the middle 50 percent of the data, Q3 minus Q1. It ignores the extremes, so it is a steadier measure of spread than the full range. A common outlier test flags any value below Q1 minus 1.5 times IQR or above Q3 plus 1.5 times IQR. For the odd example above, with Q1 = 5, Q3 = 15 and IQR = 10, the fences sit at 5 minus 15 = minus 10 and 15 plus 15 = 30, so any value below minus 10 or above 30 would count as an outlier.
Frequently asked questions#
How do you calculate the upper quartile in a data set?#
Sort the data, find the median, then take the median of the upper half. For 10, 15, 20, 25, 30, 35, 40 the median is 25; the upper half is 30, 35, 40 and its median, 35, is the upper quartile (Q3).
What is the difference between the lower quartile and the third quartile?#
The lower quartile (Q1) is the median of the lower half and marks the 25th percentile. The third quartile (Q3) is the median of the upper half and marks the 75th percentile. For 5, 10, 15, 20, 25, 30, 35 the median is 20, so Q1 = 10 (median of 5, 10, 15) and Q3 = 30 (median of 25, 30, 35).
Is the second quartile the same as the median?#
Yes. The second quartile (Q2) is the median: the middle value that splits the data into two equal halves. For an even count it is the average of the two middle values.
Does an odd or even number of values change the method?#
It changes how you split. With an even count, the two halves are clean and each has the same size. With an odd count, the median sits in the middle of neither half, so you leave it out before finding Q1 and Q3.
What is the interquartile range used for?#
It measures the spread of the middle half of the data and feeds the standard outlier test (values beyond 1.5 times the IQR past Q1 or Q3). Because it ignores the extremes, it is less affected by outliers than the full range or the standard deviation.