free tool, no sign-up
Quartile Calculator
Find Q1, Q3, and the interquartile range (IQR) for a list of numbers, including the lower half and the upper half used to get them.
Exclude the median is the split on most US middle-school pages: when the count is odd, the middle value is left out of both halves. Include the median puts that middle value in both halves. That second split is called Tukey hinges. An even count uses the same two halves either way.
Separate numbers with commas, spaces, or new lines. A pasted minus sign (−) is read as negative. Write 1000, not 1,000.
Enter at least three numbers, separated by commas, spaces, or new lines.
Enter at least three numbers, separated by commas, spaces, or new lines.
This quartile calculator sorts a list and finds the lower quartile Q1, the median Q2, and the upper quartile Q3. The interquartile range, or IQR, is Q3 minus Q1. The default split is the exclusive median method used on most US middle-school pages: when the count is odd, the median is left out of both halves. Tukey hinges, the other choice, include that median in both halves. The two methods match when the count is even. An average that lands on a half is exact, such as 7/2 = 3.5.
How to find Q1 and Q3
The default on this page is the exclusive median method. Sort the numbers from least to greatest, then find the median. That median is Q2. If the count is odd, Q2 is the middle number and it is left out of both halves. If the count is even, Q2 is the average of the two middle numbers and the list splits into two equal halves. Q1, the lower quartile, is the median of the lower half. Q3, the upper quartile, is the median of the upper half. A half with an odd count uses its middle number. A half with an even count averages its two middle numbers. If those two numbers are 3 and 4, the quartile is 7/2, which equals 3.5. That equals sign is exact.
Take 3, 5, 7, 8, 12, 13, 14, 18, 21. There are 9 numbers, so the median is the 5th value, 12. The exclusive median method leaves 12 out. The lower half is 3, 5, 7, 8, and Q1 is the average of 5 and 7, which is 6. The upper half is 13, 14, 18, 21, and Q3 is the average of 14 and 18, which is 16. Commas, spaces, and line breaks all separate numbers, and a pasted minus sign counts as negative. Write 1000, not 1,000, because a comma splits values.
How to find the interquartile range
The interquartile range formula is IQR = Q3 − Q1. It is the spread of the middle half of the data, from the lower quartile to the upper quartile. On 3, 5, 7, 8, 12, 13, 14, 18, 21 the exclusive median method gives Q3 = 16 and Q1 = 6, so the interquartile range is 16 − 6 = 10. The same subtraction is how to calculate the IQR and how to find the IQR of any list once Q1 and Q3 are known.
One number has no halves, and two numbers do not leave a half you can check, so this page does not report Q1, Q3, or an interquartile range for them. Three numbers do. With the exclusive median method, for 4, 7, 10 the median is 7, the lower half is 4, and the upper half is 10, so Q1 = 4, Q3 = 10, and the IQR is 6. Many class problems still use four or more numbers, because a half with one value is a thin check. On 3, 4, 10, 12 the count is even, the lower half is 3, 4, and Q1 is 7/2 = 3.5. Q2 is the average of 4 and 10, which is 7. Q3 is the average of 10 and 12, which is 11. The IQR is 11 − 7/2 = 15/2 = 7.5.
When the two quartile methods disagree
Quartile methods do not all split an odd list the same way. Tukey hinges include the median in both halves. On 3, 5, 7, 8, 12, 13, 14, 18, 21 that puts 12 into both halves. The lower half is then 3, 5, 7, 8, 12, so Q1 is 7. The upper half is 12, 13, 14, 18, 21, so Q3 is 14. The interquartile range is 14 − 7 = 7, not 10. When the count is even, leaving the median out and including it describe the same two halves, so Q1, Q3, and the IQR match. The result names the method it used, exclusive median or Tukey hinges, so the two are not mixed. Spreadsheet functions work differently again: they interpolate between values instead of taking the median of each half, so even an even count can give a third answer. For 3, 4, 10, 12, Excel QUARTILE.EXC gives Q1 = 3.25, QUARTILE.INC gives 3.75, and this page gives 3.5.
If a worksheet says to leave the median out, use Exclude the median. If it says to include the median in both halves, use Include the median. Q2 is the ordinary median either way. A list that only needs the mean, the median, or the mode can be checked on the mean, median, and mode calculator.
Related calculators
Frequently Asked Questions
How do you find Q1 and Q3?
Sort the list and find the median, which is Q2. Split the list into a lower half and an upper half. The exclusive median method leaves the median out when the count is odd. Q1 is the median of the lower half, and Q3 is the median of the upper half. For 3, 5, 7, 8, 12, 13, 14, 18, 21 the median is 12, the lower half is 3, 5, 7, 8, and the upper half is 13, 14, 18, 21. Q1 is the average of 5 and 7, which is 6. Q3 is the average of 14 and 18, which is 16.
How do you find the interquartile range?
Subtract the lower quartile from the upper quartile. On 3, 5, 7, 8, 12, 13, 14, 18, 21 the exclusive median method gives Q3 = 16 and Q1 = 6, so the interquartile range is 16 − 6 = 10. That width is the middle half of the ordered list.
What is the interquartile range formula?
The interquartile range formula is IQR = Q3 − Q1. Q1 is the lower quartile and Q3 is the upper quartile. The median, Q2, is not part of that subtraction. An IQR of 0 means Q1 and Q3 are the same number.
What is the lower quartile?
The lower quartile is Q1, the median of the lower half of the ordered list. The upper quartile is Q3, the median of the upper half. How to find Q1 is the same median step used for the whole list, applied only to the numbers below the median. When that half has an even count, average the two middle numbers. The average of 3 and 4 is 7/2, which equals 3.5.
Why do calculators disagree on Q1 and Q3?
An odd count can be split in more than one way. The exclusive median method leaves the middle value out of both halves. Tukey hinges include that middle value in both halves. For 3, 5, 7, 8, 12, 13, 14, 18, 21 the exclusive median method gives Q1 = 6, Q3 = 16, and an interquartile range of 10. Tukey hinges give Q1 = 7, Q3 = 14, and an interquartile range of 7. An even count uses the same two halves either way. The result on this page names which method it used. Spreadsheet functions work differently again: they interpolate between values instead of taking the median of each half, so even an even count can give a third answer. For 3, 4, 10, 12, Excel QUARTILE.EXC gives Q1 = 3.25, QUARTILE.INC gives 3.75, and this page gives 3.5.