Quartile Calculator: Q1, Q3 and IQR
Find the first and third quartiles and the interquartile range of a data set with the exclusive median method, plus the median, mean and spread, free in your browser.
Separate numbers with commas, spaces or new lines.
Quartiles and IQR
- First quartile (Q1)
- 4
- Third quartile (Q3)
- 6
- Interquartile range (IQR = Q3 − Q1)
- 2
Exclusive median method (TI-84): Q1 and Q3 are the medians of the lower and upper halves, leaving out the median itself when the count is odd. Spreadsheet functions such as Excel's QUARTILE.INC may give different values.
Standard deviation
- Population standard deviation (σ, divide by n)
- 2
- Sample standard deviation (s, divide by n − 1)
- 2.1380899353
Sum of squared deviations Σ(x − mean)² = 32 over n = 8 values.
Variance
- Population variance (σ², divide by n)
- 4
- Sample variance (s², divide by n − 1)
- 4.57142857143
Sum of squared deviations Σ(x − mean)² = 32 over n = 8 values.
Z-score
Enter a value x to see how many standard deviations it lies from the mean.
z = (x − mean) / SD.
Summary
- Count (n)
- 8
- Sum
- 40
- Mean
- 5
- Median
- 4.5
- Mode
- 4
- Minimum
- 2
- Maximum
- 9
- Range
- 7
Deviations from the mean
| x | x − mean | (x − mean)² |
|---|---|---|
| 2 | -3 | 9 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
Quartile Calculator
This page opens with the quartiles first. Paste a data set and it shows the first quartile Q1, the third quartile Q3 and the interquartile range IQR = Q3 − Q1. Below them come the standard deviation, variance, z-score, a summary with the median, and a table of deviations. The example 2, 4, 4, 4, 5, 5, 7, 9 is filled in so you can see the result straight away.
What quartiles are
Quartiles split sorted data into four parts with about the same number of values in each. Q1 marks the top of the lowest quarter, the median (Q2) the middle, and Q3 the top of the third quarter. The interquartile range is the width of the middle half of the data. Unlike the range, it ignores the smallest and largest values, so a single outlier cannot stretch it.
The method used
Exclusive median method
- Sort the values and find the median.
- Split the data into a lower half and an upper half. When the count is odd, the median itself goes in neither half.
- Q1 is the median of the lower half and Q3 the median of the upper half.
This is the method TI-84 calculators use. Spreadsheet functions such as Excel's QUARTILE.INC include the median and interpolate between values, so they can give different answers for the same data. Neither is wrong, but say which method you used. Quartiles need at least 4 values; with fewer, the page says "Needs at least 4 values" and still shows the other statistics.
Worked examples
Even count: 2, 4, 4, 4, 5, 5, 7, 9
The halves are 2, 4, 4, 4 and 5, 5, 7, 9. Q1 is the median of the first half, (4 + 4) / 2 = 4, and Q3 is (5 + 7) / 2 = 6, so the IQR is 2.
Odd count: 1 to 9
The median is 5, which is left out. The halves are 1, 2, 3, 4 and 6, 7, 8, 9, so Q1 = 2.5, Q3 = 7.5 and the IQR is 5.
Finding outliers
A common rule flags any value below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR. For the first example the fences are 1 and 9, so no value is an outlier. This is the rule behind the whiskers of a box plot.
Privacy
Nothing is uploaded; every calculation runs in your browser and never leaves your device.
Related tools
The Standard Deviation Calculator opens the same tool with the spread first. The Number List Calculator sorts a list and gives its sum, mean and median.
Frequently asked questions
How are quartiles calculated here?
With the exclusive median method used by TI-84 calculators. Sort the data and find the median. Q1 is the median of the lower half and Q3 the median of the upper half; when the count is odd, the median itself belongs to neither half.
What is the interquartile range?
The IQR is Q3 − Q1, the spread of the middle half of the data. For 2, 4, 4, 4, 5, 5, 7, 9 it is 6 − 4 = 2. It ignores the extremes, so outliers do not affect it.
Why do my quartiles differ from Excel?
There are several quartile methods. Excel's QUARTILE.INC includes the median when splitting and interpolates, so it can give different values from the exclusive median method this page uses. Both are valid; state the method you use.
Why do I need at least 4 values?
With fewer than 4 values, each half has one value or none, so the quartiles say little. The page shows 'Needs at least 4 values' and still shows the other statistics.
How do I find outliers with the IQR?
A common rule marks values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR as outliers. For the example data that range is 1 to 9, so no value is an outlier.