Quartile Calculator
Find Q1, the median, Q3 and the interquartile range (IQR) of your data. See the five-number summary, the outlier limits and a clear step-by-step solution.
Quartile and IQR Calculator
Enter your numbers below and get your result instantly.
Step-by-Step Solution
What Are Quartiles?
Quartiles split a sorted data set into four parts that each hold about a quarter of the values. There are three of them:
- Q1 (first quartile): about 25% of the values are at or below this point.
- Q2 (second quartile): the median, with about 50% of the values at or below it.
- Q3 (third quartile): about 75% of the values are at or below this point.
Together with the minimum and the maximum, the three quartiles form the five-number summary of a data set. Our calculator shows all five numbers at once.
What Is the Interquartile Range (IQR)?
The interquartile range is the distance between the third quartile and the first quartile. It describes the spread of the middle half of your data.
Because the IQR ignores the lowest and highest quarters, it is not affected much by extreme values. That makes it a more stable measure of spread than the range, which only uses the two most extreme numbers.
How to Find Quartiles
With the median-of-halves method, you can find the quartiles by hand in four steps.
1. Sort the data
Write the numbers from smallest to largest.
2. Find the median (Q2)
The median is the middle value. For an even number of values, it is the average of the two middle values. You can check it with our Median Calculator.
3. Split the data into a lower half and an upper half
If there is an odd number of values, the median itself can be left out of both halves or kept in both halves, depending on the method you use.
4. Find the median of each half
The median of the lower half is Q1 and the median of the upper half is Q3.
Quartile Calculator Examples
Example 1: odd number of values
Find the quartiles and the IQR of this data, using the method that excludes the median:
The median is 6. The lower half is 1, 3, 3 so Q1 = 3. The upper half is 7, 8, 9 so Q3 = 8. The IQR is 8 − 3 = 5.
Example 2: finding an outlier
Check this data for outliers, using the method that excludes the median:
The median is 7, Q1 = 4.5 and Q3 = 9.5, so the IQR is 5. The lower limit is 4.5 − 1.5 × 5 = −3 and the upper limit is 9.5 + 1.5 × 5 = 17. The value 30 is above 17, so it is an outlier.
Finding Outliers With the IQR
A common rule uses the IQR to set limits, called fences. A value is treated as a possible outlier if it falls outside them.
Upper fence = Q3 + 1.5 × IQR
Our calculator shows both fences and lists any values that fall outside them. This is a rule of thumb. A flagged value is not always an error, so check it before you remove it from your data.
Why Do Quartile Methods Give Different Answers?
There is no single agreed way to calculate quartiles, especially for small data sets. Our calculator offers four common methods:
- Median of halves, excluding the median: popular in many school textbooks. For an odd number of values, the middle value is left out of both halves.
- Median of halves, including the median: the middle value is kept in both halves.
- Interpolation (QUARTILE.INC): the method used by Excel's QUARTILE.INC function. It finds a position in the sorted list and blends neighboring values if the position falls between two of them.
- Exclusive interpolation (QUARTILE.EXC): the method used by Excel's QUARTILE.EXC function. It needs at least three values.
For large data sets, the four methods usually give very close results. To describe the spread of the same data in another way, try the Standard Deviation Calculator.
More Quartile Examples
These extra worked examples show how quartiles change with an even or odd number of values, how the four methods compare, and how the IQR is used to find outliers. Remember that there is no single agreed rule for quartiles, so always check which method your teacher or software uses.
Example 3: An even number of values
Find the quartiles and the IQR of 4, 6, 9, 11, 14, 16, 19, 25.
Answer (median of halves): Q1 = 7.5, median = 12.5, Q3 = 17.5, and the IQR is 10.
There are 8 values, so the median is the average of the 4th and 5th values: (11 + 14) ÷ 2 = 12.5. With an even number of values, the median is not one of the data points, so both halves have 4 values and the two median-of-halves methods agree. The lower half is 4, 6, 9, 11, so Q1 = (6 + 9) ÷ 2 = 7.5. The upper half is 14, 16, 19, 25, so Q3 = (16 + 19) ÷ 2 = 17.5. The IQR is 17.5 − 7.5 = 10.
Other methods give different answers for the same data. Interpolation (QUARTILE.INC): Q1 = 8.25, Q3 = 16.75, IQR = 8.5. Exclusive interpolation (QUARTILE.EXC): Q1 = 6.75, Q3 = 18.25, IQR = 11.5.
Example 4: Including or excluding the median
Find Q1 and Q3 of 2, 5, 7, 9, 12, 15, 20 with both median-of-halves methods.
Answer: excluding the median gives Q1 = 5 and Q3 = 15. Including the median gives Q1 = 6 and Q3 = 13.5.
There are 7 values, so the median is the 4th value, 9. Excluding the median: the lower half is 2, 5, 7 and the upper half is 12, 15, 20, so Q1 = 5, Q3 = 15 and the IQR is 10. Including the median in both halves: the lower half is 2, 5, 7, 9 and the upper half is 9, 12, 15, 20, so Q1 = (5 + 7) ÷ 2 = 6, Q3 = (12 + 15) ÷ 2 = 13.5 and the IQR is 7.5. For this data, QUARTILE.INC gives the same answer as the including method, and QUARTILE.EXC gives the same answer as the excluding method.
Example 5: Outliers at both ends
Check 1, 14, 15, 16, 18, 19, 21, 22, 60 for outliers, using the method that excludes the median.
Answer: both 1 and 60 are outliers.
The median is 18. The lower half is 1, 14, 15, 16, so Q1 = (14 + 15) ÷ 2 = 14.5. The upper half is 19, 21, 22, 60, so Q3 = (21 + 22) ÷ 2 = 21.5. The IQR is 21.5 − 14.5 = 7, and 1.5 × 7 = 10.5. The lower fence is 14.5 − 10.5 = 4 and the upper fence is 21.5 + 10.5 = 32. The value 1 is below 4 and the value 60 is above 32, so both are flagged as outliers. Remember that this is a rule of thumb, so check flagged values before you remove them.
Example 6: When the IQR is zero
Find the IQR of 3, 10, 10, 10, 10, 10, 10, 10, 20, using the method that excludes the median.
Answer: the IQR is 0, and both 3 and 20 are flagged as outliers.
The median is 10. The lower half is 3, 10, 10, 10, so Q1 = (10 + 10) ÷ 2 = 10. The upper half is 10, 10, 10, 20, so Q3 = (10 + 10) ÷ 2 = 10. The IQR is 10 − 10 = 0. Both fences are then equal to 10, so every value that is not 10 is flagged, which means 3 and 20 are outliers. This can happen when most of the data in the middle is identical, so the IQR is a poor measure of spread for data like this.
Common mistakes when finding quartiles
A common mistake is forgetting to sort the data first. Another is mixing methods, for example finding Q1 with one method and Q3 with another. Also be careful that the quartile method is not the same in every book or spreadsheet, so check which one you need. Quartiles are also percentiles: Q1 is the 25th percentile and Q3 is the 75th percentile, which you can explore with our Percentile Calculator.
Created by Sajid Ali, SmartStatCalc · Last updated: 7 November 2026
Found a mistake or have a suggestion? Contact us.
How to Use Our Quartile Calculator
- Type or paste your numbers into the Data Values box.
- Choose the quartile method you want to use.
- Click the Calculate Quartiles button.
- Read Q1, the median, Q3, the IQR and the outlier limits.
- Use the step-by-step solution to see how the answer was found.
Click Reset at any time to clear your data and start again.
Why Use SmartStatCalc?
SmartStatCalc is built to make everyday statistics quick and easy to understand. Instead of sorting and splitting your data by hand, you can enter it and see a clear result right away.
Who Can Use a Quartile Calculator?
Students use quartiles and the IQR in statistics classes, and teachers use them to describe the spread of test scores. Analysts and researchers use them to summarize data, draw box plots and spot unusual values.
Frequently Asked Questions
What is Q1 in simple words?
Q1 is the value below which about a quarter of your sorted data lies.
What is Q3 in simple words?
Q3 is the value below which about three quarters of your sorted data lies.
How do I calculate the IQR?
Subtract Q1 from Q3. The result is the interquartile range.
Is Q2 the same as the median?
Yes. The second quartile is the median of the data.
Why does my textbook give a different answer?
Textbooks and software use different quartile methods. Change the method in our calculator to match the one you are using.
What is the five-number summary?
It is the minimum, Q1, the median, Q3 and the maximum. These five values describe the shape and spread of your data.
Can the IQR be zero?
Yes. The IQR is zero when Q1 and Q3 are equal, which can happen when many values in the middle of the data are the same.
Is this Quartile Calculator free?
Yes. SmartStatCalc's Quartile Calculator is free to use online.
Contact SmartStatCalc
Have a question, suggestion, or feedback about our calculators? We want to make SmartStatCalc more useful, accurate, and easier for everyone to use.
If you spot a mistake or have an idea for another statistics tool, we would be happy to hear from you.
Cite this calculator
If you use this calculator in your work, you can cite it like this:
SmartStatCalc. (2026). Quartile Calculator. https://smartstatcalc.com/quartile-calculator/
Related Calculators
Explore more free statistics tools from SmartStatCalc.