# Interquartile Range Calculator (IQR)

URL: https://speedycalculator.com/calculators/statistics/iqr/
Last updated: 2026-10-30

> The interquartile range calculator finds the IQR – the spread of the middle 50% of your data – from Q1 and Q3, and also shows the quartile deviation, the five-number summary, outlier fences and a box plot. Four quartile methods are available.

## Inputs

- Data set
- Quartile method

## Results

- Interquartile range (IQR = Q3 − Q1)
- First quartile (Q1)
- Third quartile (Q3)
- Median (Q2)
- Quartile deviation (IQR ÷ 2)
- Lower fence (Q1 − k × IQR)
- Upper fence (Q3 + k × IQR)
- Outliers
- Five-number summary (min, Q1, median, Q3, max)
- Number of values
- Box plot
- Sorted data
- Step-by-step working

## Formula

```
IQR = Q3 − Q1 · Q1 at position (n + 1)/4, Q3 at 3(n + 1)/4 (interpolated) · quartile deviation = IQR ÷ 2
```

## Explanation

The interquartile range measures how spread out the central half of a data set is. It is the distance between the first and third quartiles, so it ignores the lowest and highest quarters of the data entirely. That makes it a robust measure of spread: one extreme salary or a mistyped reading changes the range and the standard deviation a lot, but barely moves the IQR.

The IQR is used to compare the variability of groups, to draw box plots, to scale data robustly and – through the 1.5 × IQR rule – to define outliers. For roughly normal data the IQR is about 1.35 standard deviations, so IQR ÷ 1.35 is a quick robust estimate of σ.

This calculator defaults to the (n + 1) position method, which interpolates Q1 at rank (n + 1)/4 and Q3 at rank 3(n + 1)/4. If your class finds quartiles as medians of halves, or uses Excel's QUARTILE.INC, switch the method and the IQR updates.

### How to use the Interquartile Range Calculator

- **Data set**
- **Quartile method**

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

### How it works

Sort the data, locate Q1 and Q3 with the chosen method (interpolating between neighbouring values when the position is fractional) and subtract: IQR = Q3 − Q1.

### Worked example

Data: 3, 7, 8, 12, 13, 14, 18, 21, 25, 30 (n = 10). With the (n + 1) method Q1 sits at position 11/4 = 2.75: 7 + 0.75 × (8 − 7) = 7.75. Q3 sits at position 33/4 = 8.25: 21 + 0.25 × (25 − 21) = 22. **IQR = 22 − 7.75 = 14.25**. The textbook halves method gives Q1 = 8, Q3 = 21 and IQR = 13; Excel's QUARTILE.INC gives 9 and 20.25, so IQR = 11.25.

### IQR versus other measures of spread

MeasureUsesSensitive to outliers?Rangemin and maxVeryStandard deviationevery value, squaredYesMean absolute deviationevery valueSomewhatIQRQ1 and Q3NoMedian absolute deviationthe median of deviationsNo

### Quartile methods compared

Statistics packages do not agree on one definition of a quartile. For the 10 values 68, 72, 75, 79, 81, 84, 86, 90, 93, 97 the four methods offered here give:

MethodUsed byQ1Q3IQRMedian of halves (median excluded)TI-84, most school textbooks759015Linear interpolation, position 1 + (n − 1)pExcel QUARTILE.INC, R type 7, Google Sheets768913(n + 1)p positionsExcel QUARTILE.EXC, Minitab74.2590.7516.5Median of halves (median included)Tukey's hinges759015With an even number of values the two "halves" methods coincide; they differ only when n is odd. The differences shrink as the data set grows, so with a few hundred values the choice rarely matters.

## Worked example

Inputs — Data set: 3, 7, 8, 12, 13, 14, 18, 21, 25, 30; Quartile method: (n + 1) positions (Excel QUARTILE.EXC, Minitab).

Results — **Interquartile range (IQR = Q3 − Q1) = 14.25**; First quartile (Q1) = 7.75; Third quartile (Q3) = 22; Median (Q2) = 13.5; Quartile deviation (IQR ÷ 2) = 7.125; Lower fence (Q1 − k × IQR) = -13.625.

## Key terms

- **Interquartile range (IQR)**: Q3 − Q1.
- **Quartile deviation**: Half the IQR.
- **Robust statistic**: A measure that changes little when a few values are extreme.
- **1.5 × IQR rule**: Values more than 1.5 IQR beyond the quartiles are flagged as outliers.

## FAQ

**What is the interquartile range?**
Q3 − Q1, the width of the range that holds the middle half of the data.

**How do I calculate the IQR?**
Sort the data, find Q1 and Q3 and subtract. For 3, 7, 8, 12, 13, 14, 18, 21, 25, 30 with the (n + 1) method, Q1 = 7.75 and Q3 = 22, so IQR = 14.25.

**Why is the IQR better than the range?**
The range depends only on the two most extreme values; the IQR ignores the outer quarters and is not distorted by outliers.

**What does a large IQR mean?**
The middle half of the data are widely spread. Compare it with the median: an IQR of 14.25 around a median of 13.5 indicates a lot of variability.

**How is the IQR related to the standard deviation?**
For normal data IQR ≈ 1.349σ, so σ ≈ IQR ÷ 1.349.

**How do I find the IQR in Excel?**
=QUARTILE.EXC(range,3) − QUARTILE.EXC(range,1) matches the default method here; QUARTILE.INC gives 11.25 for the example.

**Can the IQR be zero?**
Yes, if at least half of the values are identical in the middle of the data.


## Sources

- [NIST/SEMATECH e-Handbook – Measures of scale](https://www.itl.nist.gov/div898/handbook/eda/section3/eda356.htm)
- [Wolfram MathWorld – Interquartile range](https://mathworld.wolfram.com/InterquartileRange.html)
- [OpenStax – Introductory Statistics 2e](https://openstax.org/details/books/introductory-statistics-2e)
