Quartile, IQR & Outlier Calculator
Find Q1, Q2 (median), Q3, the interquartile range, and outliers using the 1.5×IQR rule from a pasted dataset.
Result
- Q1 (25th percentile)12
- Q2 (median)18
- Q3 (75th percentile)24
- IQR (Q3 − Q1)12
- Outlier fences (1.5×IQR)< -6 or > 42
- Outliers found60
Step-by-step
- Sort the data and find quartiles by interpolation: Q1 = 12, Q3 = 24.
- IQR = Q3 − Q1 = 24 − 12 = 12.
- Fences = Q1 − 1.5·IQR and Q3 + 1.5·IQR = -6 and 42; outliers: 60.
How to use this calculator
- Paste your numbers separated by commas, spaces, or new lines.
- Read Q1, the median, Q3, and the IQR.
- Check the outlier fences and any values flagged beyond them.
- Use the IQR as a robust spread measure when outliers are present.
About this calculator
Quartiles split a sorted dataset into four equal parts. The first quartile (Q1) is the 25th percentile — a quarter of the data lies below it; Q2 is the median; and Q3 is the 75th percentile. The interquartile range (IQR), Q3 minus Q1, captures the spread of the middle 50% of the data and is a robust measure of variability that ignores extreme values. The IQR also drives the standard outlier test: by Tukey's 1.5×IQR rule, any value more than 1.5 IQRs below Q1 or above Q3 is flagged as a potential outlier — the same fences used to draw the whiskers of a box plot. This calculator uses the inclusive linear-interpolation method (matching Excel's QUARTILE.INC) and lists any outliers it finds.
How it works — the formula
Q1 = value at position 0.25·(n−1) (interpolated, 0-based)
Q3 = value at position 0.75·(n−1)
IQR = Q3 − Q1
Outlier if x < Q1 − 1.5·IQR or x > Q3 + 1.5·IQRQuartiles are located by interpolating into the sorted data; the IQR measures central spread, and Tukey fences at 1.5×IQR flag outliers.
Worked examples
- Inputs:
- data=1,2,3,4,5,6,7,8,9,10
- Output:
- Q1 3.25, median 5.5, Q3 7.75, IQR 4.5
- Inputs:
- data=7,9,12,15,18,21,24,30,60
- Output:
- IQR with 60 flagged as outlier
- Inputs:
- data=2,4,6,8
- Output:
- Q1 3.5, median 5, Q3 6.5, IQR 3
Limitations
- Uses the inclusive (QUARTILE.INC) method; other conventions differ on small samples.
- The 1.5×IQR rule flags candidates, not confirmed errors.
- Requires at least two values to interpolate.
Outlier flags are statistical heuristics; domain judgment is needed before removing data.