What This Calculator Does
This tool takes any list of numbers and returns the three quartiles (Q1, Q2, Q3), the interquartile range (IQR), the median, the minimum, the maximum, and the range. Quartiles split a sorted data set into four equal parts, and the IQR measures how spread out the middle half of your data is - a robust measure of variability that is not distorted by outliers.
How to Use It
Paste or type your values into the box. You can separate them with commas, spaces, tabs, or new lines, so copying a column straight from a spreadsheet works fine. Negative numbers and decimals are supported, and any non-numeric tokens are ignored. Then read off the results: the IQR is highlighted, with all the other statistics in the table below.
The Method (Median-Exclusive)
This page uses the Moore & McCabe "exclusive" method. First the data is sorted. The median (Q2) is the middle value, or the average of the two middle values for an even count. The data is then split into a lower and an upper half. Key rule: when the count is odd, the median value itself is excluded from both halves. Q1 is the median of the lower half and Q3 is the median of the upper half. Finally $$\text{IQR} = Q_3 - Q_1.$$ Other tools (Excel's QUARTILE.INC, Tukey hinges) may give slightly different quartiles because they use different conventions.
Worked Example
Data: 2, 4, 4, 5, 6, 7, 8 (\(n = 7\), odd). Sorted already. Min = 2, Max = 8, Range = 6. Median (Q2) = 5. Lower half excluding the median = [2, 4, 4], whose median is 4, so \(Q_1 = 4\). Upper half = [6, 7, 8], whose median is 7, so \(Q_3 = 7\). Therefore $$\text{IQR} = 7 - 4 = 3.$$
FAQ
Why exclude the median for odd counts? It is the convention used by Moore & McCabe and many introductory statistics courses, producing quartiles that fall on actual data points more often.
Can the IQR be used to find outliers? Yes. A common rule flags values below \(Q_1 - 1.5 \times \text{IQR}\) or above \(Q_3 + 1.5 \times \text{IQR}\) as potential outliers.
Why does my answer differ from Excel? Excel's QUARTILE.INC uses linear interpolation (the inclusive method), which can give fractional quartiles between data points. This calculator uses the exclusive method instead.