Interquartile Range (IQR) Calculator

StatisticsLast updated: August 22, 2026

The interquartile range (IQR) is the span covered by the middle 50% of the data: the difference between the third and the first quartile. Unlike the standard deviation it is untouched by extreme observations, which makes it the most dependable measure of spread for skewed distributions and data containing outliers.

This calculator sorts your data, finds Q1, the median (Q2), and Q3, computes the IQR, and derives the Tukey outlier fences (Q1 − k·IQR, Q3 + k·IQR). Quartiles can be produced either by linear interpolation (R-7), the default in Excel and R, or by Tukey hinges, the classic box-plot definition. The output includes the five-number summary, the quartile deviation, the quartile coefficient of dispersion, the trimean, the list of outliers, a box plot, and a histogram.

Separate the numbers with commas, spaces, or line breaks. A decimal comma is also accepted (3,14).
The two methods can give different Q1/Q3 values, and the gap widens in small samples. State which one you used in your report.
In Tukey's box plot, a coefficient of 1.5 flags 'possible' outliers and a coefficient of 3 flags 'extreme' ones.

Interquartile Range Formulas

Interquartile range:  IQR = Q3 − Q1
Q1 position (R-7):    (n − 1)·0.25 + 1 (intermediate values interpolated linearly)
Q3 position (R-7):    (n − 1)·0.75 + 1
Tukey hinges:         Q1 = median of the lower half,  Q3 = median of the upper half
Outlier fences:       [ Q1 − k·IQR ,  Q3 + k·IQR ]   (k = 1.5 or 3)
Quartile deviation:   QD = IQR / 2
Quartile coefficient: (Q3 − Q1) / (Q3 + Q1)
Trimean:              TM = (Q1 + 2·Q2 + Q3) / 4
Under normality:      IQR ≈ 1.349 · σ

There is more than one definition of the quartiles; this tool reports both linear interpolation (R-7), the Excel and R default, and Tukey hinges, the classic box-plot definition, and shows the result of the method you did not select in the table.

How to Calculate

  1. Paste your data values into the box; at least 4 observations are required.
  2. Choose the quartile method: linear interpolation to match Excel and R, Tukey hinges for the classic box plot.
  3. Set the outlier coefficient: 1.5·IQR flags possible outliers, 3·IQR flags only extreme ones.
  4. Read the IQR: it tells you how wide a range the middle 50% of the data covers.
  5. Look at where the median sits inside the box on the plot; if it is off-center, the distribution is skewed.
  6. Go back to the data to check any flagged outliers, and state in your report which rule you used.

Worked Examples

Salary series with an outlier

For 12 observations, Q1 = 29.50, the median is 34, and Q3 = 40.50, so the IQR is 11. The fences are 29.50 − 1.5·11.00 = 13.00 and 40.50 + 1.5·11.00 = 57.00; the value 78.00 lies beyond the upper fence and is flagged as the single outlier. The wider upper quartile shows that the distribution is right-skewed.

Number of values (n): 12 · Minimum (min): 22.00 · First quartile (Q1, 25%): 29.50

The same data with Tukey hinges

Computed with Tukey hinges, the same series gives Q1 = 29 as the median of the lower half and Q3 = 41 as the median of the upper half, so the IQR becomes 12. The fences widen to 11 and 59, yet 78 is still an outlier. The one-unit difference in the IQR shows how the choice of method can change the result in small samples.

Number of values (n): 12 · Minimum (min): 22.00 · First quartile (Q1, 25%): 29.00

Extreme outlier fence (3·IQR)

For 10 observations, Q1 = 17.50, the median is 20.50, and Q3 = 23.75, giving an IQR of 6.25. With the 3·IQR rule the fences are -1.25 and 42.50, and the value 60.00 is flagged as an extreme outlier. On the same data the 1.5·IQR rule would narrow the fences to 8.13 – 33.13; the larger the coefficient, the more only genuinely extreme observations are caught.

Number of values (n): 10 · Minimum (min): 14.00 · First quartile (Q1, 25%): 17.50

Frequently Asked Questions

What is the difference between the interquartile range and the standard deviation?
The standard deviation uses every observation's distance from the mean and is heavily affected by a single extreme value. The IQR looks only at the distance between Q1 and Q3, so the bottom and top 25% of the data cannot change it. For symmetric, outlier-free data the standard deviation carries more information; for skewed or messy data the IQR is more dependable.
Why do Excel and SPSS report different quartiles?
There is no standard definition of a quartile; the literature contains at least nine methods. The Excel QUARTILE.INC function and the default of R's quantile() use linear interpolation (R-7), while the SPSS Explore output also reports Tukey hinges. The differences show up mainly in small samples, which is why the method used should be stated in the report.
Where does the 1.5 coefficient come from?
John Tukey proposed it as a practical compromise: under a normal distribution the 1.5·IQR fences correspond to roughly ±2.7 standard deviations, leaving only about 0.7% of observations outside. A smaller coefficient produces too many false alarms, a larger one misses genuine extremes. The 3·IQR rule is used to isolate 'extreme' outliers.
What should I do when I find an outlier?
First investigate the cause: fix it if it is a data-entry error, a unit mix-up, or an instrument failure. If it is a genuine extreme observation, switching to resistant methods (median, IQR, nonparametric tests) is better than deleting it. If you do remove any observation, always report that decision and the reason for it.
How far do the whiskers on a box plot reach?
The whiskers reach not to the minimum and maximum but to the most extreme observations that still lie inside the outlier fences. Observations beyond the fences are drawn as separate points. That is why whisker ends are always values that actually occur in the data, never the computed fences.
Is there a conversion between the IQR and the standard deviation?
Under a normal distribution IQR ≈ 1.349·σ, so σ ≈ IQR / 1.349 can be used as an estimate; this is called the normalized IQR and is a resistant measure of spread. The conversion breaks down as the distribution departs from normality. If the IQR/s ratio in the results deviates clearly from 1.349, the normality of the distribution should be questioned.
How many observations make quartiles meaningful?
Technically they can be computed from 4 observations, but quartiles are highly unstable in small samples and extremely sensitive to the choice of method. For a box plot to be informative, at least 15–20 observations are usually recommended. Below that, showing every value in a dot plot is the more honest presentation.