Interquartile Range (IQR) Calculator

Paste your dataset, and this tool will sort it, calculate Q1, median, Q3, the IQR, and show the usual Tukey outlier fences.

1. Enter your data

You can separate values with commas, spaces, or line breaks. Example: 12, 15, 15, 18, 21, 22, 26

2. Results

Q1 (25%)

Median (Q2)

Q3 (75%)

IQR (Q3 − Q1)

Count (n)

Outlier fences (Tukey)

Lower fence:

Upper fence:

Any value < lower fence or > upper fence is a potential outlier.

Detected outliers

3. Sorted data

What is the IQR?

The interquartile range (IQR) is a robust measure of variability. It tells you how spread out the middle 50% of your values are. Because it ignores the lowest 25% and highest 25% of data, it is much less sensitive to outliers than the full range.

How we computed your quartiles

This tool uses the classic “median-of-halves” method (Tukey style):

  1. Sort the data.
  2. Find the median (Q2).
  3. If n is odd, exclude the median from both halves.
  4. Q1 = median of the lower half, Q3 = median of the upper half.
IQR = Q3 − Q1
Lower fence = Q1 − 1.5 × IQR
Upper fence = Q3 + 1.5 × IQR

Why IQR is useful

  • It’s used in boxplots.
  • It’s a good default for outlier detection.
  • It’s robust and easy to explain.