Quartile, IQR & Outlier Calculator

Find Q1, Q2 (median), Q3, the interquartile range, and outliers using the 1.5×IQR rule from a pasted dataset.

Inputs

Paste numbers separated by commas, spaces, or new lines.

Result

Loading calculator…

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·IQR

Quartiles are located by interpolating into the sorted data; the IQR measures central spread, and Tukey fences at 1.5×IQR flag outliers.

Worked examples

Example 1
1..10
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
Example 2
7,9,12,15,18,21,24,30,60
Inputs:
data=7,9,12,15,18,21,24,30,60
Output:
IQR with 60 flagged as outlier
Example 3
2,4,6,8
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.

Frequently asked

What is the interquartile range?+
The IQR is the difference between the third quartile (Q3, 75th percentile) and the first quartile (Q1, 25th percentile). It measures the spread of the central half of the data and is resistant to outliers, unlike the full range.
How are outliers detected with the 1.5×IQR rule?+
Compute fences at Q1 − 1.5×IQR and Q3 + 1.5×IQR. Any value below the lower fence or above the upper fence is flagged as a potential outlier. These are exactly the points a box plot draws beyond its whiskers.
Why do different tools give slightly different quartiles?+
There are several accepted methods for computing quartiles (inclusive vs exclusive interpolation, Tukey hinges, etc.). They agree for large datasets but can differ on small ones. This calculator uses the inclusive linear-interpolation method, the same as Excel's QUARTILE.INC.
Is a flagged outlier always an error?+
No. The 1.5×IQR rule identifies values that are unusually far from the middle of the data, but they may be perfectly valid extreme observations. Investigate flagged points before deciding whether to keep, transform, or exclude them.
What is the difference between quartiles and percentiles?+
Quartiles are specific percentiles: Q1 is the 25th, Q2 the 50th (median), and Q3 the 75th percentile. Percentiles divide data into 100 parts; quartiles divide it into 4.
How much data do I need?+
At least two values are required to interpolate quartiles. The method becomes more meaningful with larger datasets; with very few points the quartiles are interpolated between the available values.

Related calculators

More tools you might like

Hand-picked tools that pair well with this one — same audience, same intent.