Interquartile Range (IQR) Calculator

Calculate IQR, semi-IQR, quartile coefficient of dispersion, Tukey fences, and outlier detection. Includes box plot, quartile segments, and IQR vs SD comparison.

Minimum 4 values
1.5 for standard outliers
IQR
16.0000
Q3 − Q1 (middle 50%)
Q1
73.0000
Lower quartile (25th pctl)
Median
82.5000
Middle value (50th pctl)
Q3
89.0000
Upper quartile (75th pctl)
Semi-IQR
8.0000
IQR / 2 (quartile deviation)
QCD
9.88%
Quartile coeff. of dispersion
Lower Fence
49.0000
Q1 − (below data)
Upper Fence
113.0000
Q3 + (above data)

Data Quartile Segments

0-25%
(3)
25-50%
(3)
50-75%
(3)
75-100%
(3)

Box Plot

IQR vs Standard Deviation

MeasureValueNotes
IQR16.0000Robust (ignores outliers)
Standard Deviation9.1266Sensitive to outliers
IQR / SD ratio1.753Normal distribution: ~1.35
Expected IQR (if normal)12.32101.35 × SD
Range27.0000Max − Min (most sensitive)
Semi-IQR8.0000Half the IQR
Calculation Steps
Sorted: 68.00, 70.00, 72.00, 74.00, 76.00, 81.00, 84.00, 85.00, 88.00, 90.00, 92.00, 95.00
n = 12
Q1 = 73.0000, Q3 = 89.0000
IQR = Q3 − Q1 = 89.000073.0000 = 16.0000
Lower fence = Q1 − 1.5 × IQR = 73.000024.0000 = 49.0000
Upper fence = Q3 + 1.5 × IQR = 89.0000 + 24.0000 = 113.0000
Planning notes, formulas, and examples

About the Interquartile Range (IQR) Calculator

The interquartile range (IQR) measures the spread of the middle 50% of a dataset, from Q1 (the 25th percentile) to Q3 (the 75th percentile). Because it ignores the most extreme values, it is one of the standard robust measures of variability for skewed or outlier-prone data.

This calculator reports IQR alongside semi-IQR, quartile coefficient of dispersion, Tukey fences for outlier detection, and a simple box-plot view. It also compares IQR with standard deviation so you can see whether the central spread and the full-spread picture are telling the same story.

That makes it useful when you want a measure of spread that stays stable even if a few unusually high or low values are present.

When This Page Helps

IQR is often the right spread measure when the median matters more than the mean, or when a few extreme values would distort the standard deviation. It is widely used in box plots, outlier screening, and summary tables for skewed data.

Showing the quartiles, fences, and box plot together makes it easier to explain not just how wide the middle of the data is, but also why certain values are or are not being treated as outliers.

How to Use the Inputs

  1. Enter numbers separated by commas or spaces (minimum 4 values).
  2. Select exclusive (Tukey) or inclusive quartile method.
  3. Adjust the fence multiplier (1.5 for standard, 3 for extreme outliers only).
  4. Read IQR from the main output — it measures the middle 50% spread.
  5. Check the box plot to visualize quartiles and outliers.
  6. Compare IQR to standard deviation: IQR/SD ≈ 1.35 for normal data.
  7. Review the outlier table if any values fall beyond the Tukey fences.
Formula used
IQR = Q3 − Q1. Semi-IQR = IQR / 2. QCD = (Q3 − Q1) / (Q3 + Q1) × 100%. Lower fence = Q1 − k × IQR. Upper fence = Q3 + k × IQR. For normal data: IQR ≈ 1.35 × σ.

Example Calculation

Result: IQR = 16, Q1 = 73, Q3 = 89

Sorted data: 68,70,72,74,76,81,84,85,88,90,92,95. Q1 = median(68,70,72,74,76,81) = 73, Q3 = median(84,85,88,90,92,95) = 89. IQR = 89 − 73 = 16. With k = 1.5, the Tukey fences are 49 to 113, so no outliers are detected.

Tips & Best Practices

  • IQR is used in box plots to define the "box" — the central concentration of data.
  • For approximately normal data, IQR ≈ 1.35 × SD. If your IQR/SD ratio is much different, the data is likely non-normal.
  • The quartile coefficient of dispersion (QCD) is the IQR-based analog of the coefficient of variation — it measures relative spread using only quartiles.
  • When reporting data with outliers (like income, housing prices), use IQR and median instead of SD and mean.
  • A very small IQR relative to the range suggests the data has heavy tails or outliers pulling the extremes.
  • The semi-IQR (quartile deviation) is sometimes used as a robust estimate of spread, roughly comparable to standard deviation for normal data.

IQR and the Box Plot

John Tukey introduced the box plot in 1970 specifically around the IQR as its core measurement. The box spans Q1 to Q3 (the IQR), the median line divides it, and whiskers extend to the farthest non-outlier values. Everything beyond the fences (Q1 − 1.5×IQR and Q3 + 1.5×IQR) is plotted individually as an outlier. This elegant design makes the box plot the standard tool for distribution comparison.

IQR in Statistical Testing

The IQR is used to normalize robust test statistics. The IQR-based measure of kurtosis, for example, replaces the fourth moment with quartile-based metrics that are less sensitive to extreme values. Some robust regression methods use IQR to scale residuals for outlier weights.

IQR for Different Distribution Shapes

For a normal distribution, IQR = 1.35σ. For a uniform distribution on [a,b], IQR = (b−a)/2. For an exponential distribution with rate λ, IQR = ln(3)/λ. Comparing the observed IQR/SD ratio to 1.35 provides a quick normality check.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • The IQR measures the spread of the middle 50% of data — from the 25th to the 75th percentile. It tells you how concentrated or dispersed the central bulk of your data is, completely ignoring the most extreme values. A small IQR means data is clustered tightly around the median.