Quartiles cut sorted data into four groups of roughly equal size. Q1 marks the top of the lowest quarter, Q2 is the median, and Q3 marks the bottom of the highest quarter. The distance from Q1 to Q3, the interquartile range (IQR), is the standard robust measure of spread and the basis of the most widely used outlier rule. This calculator finds all three quartiles, the IQR and the outlier fences, and shows how four different quartile conventions treat your data.
How to use the quartile calculator
- Enter at least two numbers, separated by commas, spaces or new lines.
- Choose a quartile method. The default is the median-of-halves method used by TI-84 calculators and most US textbooks.
- Read the IQR and quartiles on the tape. Show the work lists the halves or the interpolation positions, the box plot marks any outliers, and the comparison table shows every method at once.
Quartile formulas
Median of halves (default). Sort the data and find the median. Q1 is the median of the values below it and Q3 the median of the values above it. When n is odd, the median is excluded from both halves; the Tukey’s-hinges option includes it instead.
Interpolation methods. Find a position h, then interpolate between the neighboring sorted values x₍⌊h⌋₎ and x₍⌊h⌋+1₎:
with p = 0.25 for Q1 and 0.75 for Q3. Then the fences are
Worked example
Ten values: 3, 7, 8, 5, 12, 14, 21, 13, 18, 41.
- Sort: 3, 5, 7, 8, 12, 13, 14, 18, 21, 41.
- Median: n = 10 is even, so Q2 = (12 + 13) ÷ 2 = 12.5.
- Q1: the lower half 3, 5, 7, 8, 12 has median 7.
- Q3: the upper half 13, 14, 18, 21, 41 has median 18.
- IQR = 18 − 7 = 11, so the fences are 7 − 16.5 = −9.5 and 18 + 16.5 = 34.5.
- Outliers: 41 is above 34.5, so it is flagged.
How much do the methods differ?
For the same ten values the four methods give:
| Method | Q1 | Q3 | IQR |
|---|---|---|---|
| Median of halves (TI-84) | 7 | 18 | 11 |
| Tukey’s hinges | 7 | 18 | 11 |
| QUARTILE.INC (Excel, R) | 7.25 | 17 | 9.75 |
| QUARTILE.EXC (Minitab) | 6.5 | 18.75 | 12.25 |
The two median-of-halves methods agree whenever n is even; they differ only for odd n. The interpolation methods can land between data values, and QUARTILE.EXC never gives a narrower IQR than the others because its positions sit closest to the ends. (For odd n it matches the TI-84 method exactly, while QUARTILE.INC matches Tukey’s hinges.) With large data sets the differences shrink to almost nothing, but on homework with ten or fifteen values they can change the answer — so match the method your course or software uses.
Using quartiles well
- Skewed data: report the median and IQR rather than the mean and standard deviation. Income, response times and home prices are classic examples.
- Outliers: the 1.5 × IQR rule, introduced by statistician John Tukey, flags values worth a second look. Check them for data-entry errors before deleting anything; real extremes are often the most interesting data.
- Comparisons: for roughly normal data the IQR is about 1.35 standard deviations, so a much larger ratio hints at heavy tails.
To draw the full box plot with the minimum and maximum use the five number summary calculator, and for any other cut point such as the 90th percentile use the percentile calculator.
Frequently asked questions
What is the interquartile range?
The IQR is Q3 minus Q1, the width of the middle 50% of the data. Because it ignores the lowest and highest quarters, a single extreme value cannot inflate it the way it inflates the range or the standard deviation.
How do I find outliers with the IQR?
Compute the fences Q1 − 1.5 × IQR and Q3 + 1.5 × IQR. Any value outside them is a potential outlier. Values beyond 3 × IQR from the quartiles are often called extreme outliers.
Which quartile method matches Excel?
Excel's QUARTILE.INC (and the older QUARTILE function, Google Sheets and R's default) use the interpolation method at position 1 + p(n − 1). Excel's QUARTILE.EXC uses position p(n + 1). Choose the matching option from the method menu.
Which method does a TI-84 use?
The TI-83 and TI-84 1-Var Stats command takes the median of each half and leaves the overall median out of both halves when n is odd. That is this calculator's default.
What is the quartile deviation?
It is half of the IQR, also called the semi-interquartile range. For roughly symmetric data it measures the typical distance from the median to the quartiles.