How to calculate quartiles
Quartiles divide a sorted data set into four equal parts. Sort the numbers, find the median (Q2), then split the data at the median. Q1 is the median of the lower half and Q3 is the median of the upper half. For 1, 2, 3, 4, 5, 6, 7, 8 the lower half (1, 2, 3, 4) has median 2.5 and the upper half (5, 6, 7, 8) has median 6.5, so Q1 = 2.5, Q2 = 4.5 and Q3 = 6.5. The second quartile is nothing more than the median, which is a handy check on your working.
How to use this calculator
Enter your numbers in the value fields and leave unused fields blank. The result shows Q1, the median (Q2) and Q3. To see the full minimum-to-maximum picture, use the five number summary calculator.
You can type the values in any order, since they are sorted first. Like the median, a quartile can land between two of your entries — 2.5 does not appear in the list above.
Odd vs. even data sets
When the count is even, the data splits cleanly into two halves. When the count is odd, the middle value is the median and is excluded from both halves before finding Q1 and Q3. The gap between Q1 and Q3 is the interquartile range, also used to spot unusual values with the outlier calculator.
Other software sometimes includes the median in both halves, which gives slightly different quartiles for odd-sized sets. Neither approach is wrong, but the difference explains why two tools can disagree on the same data.
Frequently asked questions
- How do I calculate quartiles?
- Sort the data, find the median (Q2), then take the median of the lower half for Q1 and the median of the upper half for Q3. For 1–8, Q1 = 2.5, Q2 = 4.5, Q3 = 6.5.
- What is the difference between Q1, Q2 and Q3?
- Q1 marks the 25th percentile, Q2 is the median (50th percentile) and Q3 marks the 75th percentile of the sorted data.
- Do I exclude the median for an odd-sized data set?
- Yes. With an odd count the middle value is the median and is left out of both halves before finding Q1 and Q3.
- What is the interquartile range?
- The interquartile range (IQR) is Q3 − Q1, the spread of the middle 50% of the data.
- How do quartiles help me spot outliers?
- The usual rule flags any value below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR. Because quartiles ignore the extreme tails, this test is not distorted by the very values it is trying to detect.