Calculate IQR, semi-IQR, quartile coefficient of dispersion, Tukey fences, and outlier detection. Includes box plot, quartile segments, and IQR vs SD comparison.
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.
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.
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 × σ.
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.
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.
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.
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.
Last updated:
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.
Range (max − min) uses only two extreme values, making it extremely sensitive to outliers. A single outlier can double the range while barely affecting IQR. IQR uses the middle 50%, so it's robust — it stays stable even when data has unusual extremes.
Tukey's method defines outliers as values beyond Q1 − 1.5×IQR or Q3 + 1.5×IQR. These "fences" work for any distribution shape. Mild outliers fall between 1.5× and 3× IQR from Q1/Q3; extreme outliers fall beyond 3× IQR. This method is used in box plots worldwide.
QCD = (Q3 − Q1) / (Q3 + Q1) is a dimensionless measure of relative variability based on quartiles. Like the coefficient of variation (CV), it allows comparing spread across datasets with different scales. Unlike CV, it's robust to outliers.
Use IQR when data is skewed, contains outliers, or isn't normally distributed. Income data, housing prices, medical lab values, and environmental measurements often require IQR-based reporting. Use SD when data is approximately normal and outliers have been verified as legitimate.
The semi-IQR (also called quartile deviation) is simply IQR / 2. It's used in older statistical texts as a measure of typical deviation from the median. For normal data, semi-IQR ≈ 0.6745 × σ (the probable error).