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.

About the Interquartile Range (IQR) Calculator

The interquartile range (IQR) calculator measures the spread of the middle 50% of your data — from Q1 (25th percentile) to Q3 (75th percentile). The IQR is the most robust measure of variability because it ignores outliers entirely, making it far more reliable than range or standard deviation for skewed or contaminated data.

This tool computes IQR along with semi-IQR, quartile coefficient of dispersion, Tukey fences for outlier detection, and a visual box plot. It also compares IQR to standard deviation, helping you assess whether your data follows a normal distribution (where IQR ≈ 1.35 × SD).

Enter your data, choose a quartile method, set the fence multiplier, and get a complete variability analysis centered on the interquartile range. Check the example with realistic values before reporting. Use the steps shown to verify rounding and units. Cross-check this output using a known reference case. Use the example pattern when troubleshooting unexpected results. Validate that outputs match your chosen standards.

Why Use This Interquartile Range (IQR) Calculator?

The IQR is the gold standard for robust variability measurement. This calculator provides the IQR alongside semi-IQR, quartile coefficient, Tukey fences, and a visual box plot — giving you the complete robust descriptive statistics toolkit in one place.

Whether you're screening for outliers, reporting skewed data, or comparing the spread of datasets with different scales, the IQR calculator delivers accurate, outlier-resistant results.

How to Use This Calculator

  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

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 = 15, Q1 = 73, Q3 = 88

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. Fences: 49–113. No outliers detected.

Tips & Best Practices

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.

Frequently Asked Questions

What does IQR measure?

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.

Why is IQR better than range?

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.

How is IQR used for outlier detection?

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.

What is the quartile coefficient of dispersion?

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.

When should I use IQR instead of standard deviation?

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.

What is the semi-interquartile range?

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).

Related Pages