All calculators

Education

IQR Calculator

Last updated: May 31, 2026

Written by Blake Boege

An IQR (Interquartile Range) calculator is a descriptive statistics tool that measures data dispersion by calculating the range of the middle 50% of a dataset. It sorts the dataset, computes Q1 (25th percentile) and Q3 (75th percentile) using linear interpolation, determines the IQR (Q3 − Q1), and flags any values falling outside the 1.5 × IQR fence as outliers.

Find the interquartile range, quartiles Q1, Q2, and Q3, and detect outliers using the 1.5 × IQR rule with steps.

Quick Answer

Calculate the interquartile range (IQR), quartiles Q1, Q2, Q3, and detect data outliers from any list of numbers.

Separate values with commas, spaces, or new lines. Negative numbers and decimals are supported.

IQR Statistics

Interquartile Range (IQR)

21

Q₁ = 11.5 · Q₃ = 32.5

Dataset Count (N)7
Q1 (25th Percentile)11.5
Q2 (Median / 50th)16
Q3 (75th Percentile)32.5
IQR (Q3 - Q1)21
Lower Fence (1.5 IQR)-20
Upper Fence (1.5 IQR)64
Outliers Count1
Outliers108

Step-by-Step Quartile Identification

[1]Sort the dataset (N = 7): 4, 8, 15, 16, 23, 42, 108
[2]Find Quartile 1 (25th percentile):
[3] Index = (7 - 1) × 0.25 = 1.5. Interpolate between index 1 (8) and index 2 (15): 8 + 0.5 × (15 - 8) = 11.5
[4]Find Quartile 2 / Median (50th percentile):
[5] Index = (7 - 1) × 0.5 = 3 (integer index) ⇒ value at index 3 = 16
[6]Find Quartile 3 (75th percentile):
[7] Index = (7 - 1) × 0.75 = 4.5. Interpolate between index 4 (23) and index 5 (42): 23 + 0.5 × (42 - 23) = 32.5
[8]Calculate Interquartile Range (IQR): IQR = Q₃ - Q₁ = 32.5 - 11.5 = 21
[9]Determine outlier fences using 1.5 × IQR rule:
[10] Lower Fence = Q₁ - 1.5 × IQR = 11.5 - 1.5 × 21 = -20
[11] Upper Fence = Q₃ + 1.5 × IQR = 32.5 + 1.5 × 21 = 64
[12]Identify outliers (values outside the fences [-20, 64]): 108
Was this helpful?

Examples

Dataset: 4, 8, 15, 16, 23, 42, 108

Q1=11.5, Q3=32.5, IQR=21, Outliers=None

Dataset: 3, 5, 7, 8, 9, 11, 15, 30

Q1=6.5, Q3=12, IQR=5.5, Outliers=30

How it works

The Spread of Data

In descriptive statistics, a dataset is divided into quarters using quartiles. The first quartile (Q1) marks the 25th percentile, the second quartile (Q2) is the 50th percentile (the median), and the third quartile (Q3) marks the 75th percentile.

The IQR Formula

IQR = Q₃ − Q₁

To evaluate other measures of central tendency or dispersion, use our statistical packages like the standard deviation calculator, median calculator, or the combined mean median mode calculator.

Outliers and Box Plots

The IQR is the basis for box-and-whisker plots. The box spans from Q1 to Q3, and the 'whiskers' extend to the minimum and maximum data values that fall within the outlier fences. Points outside the fences are plotted individually as outlier dots.

Related Calculators

More tools from Education

Frequently asked questions

The interquartile range (IQR) is a measure of statistical dispersion representing the width of the middle 50% of a dataset. It is calculated by subtracting the first quartile (Q1, 25th percentile) from the third quartile (Q3, 75th percentile): IQR = Q3 − Q1.

Outliers are data points that lie far away from the rest of the distribution. Under the 1.5 × IQR rule, fences are set: Lower Fence = Q1 − 1.5 × IQR, and Upper Fence = Q3 + 1.5 × IQR. Any data values smaller than the lower fence or larger than the upper fence are flagged as outliers.

Standard deviation measures the average distance of all data points from the mean and is highly sensitive to extreme outliers. The IQR only looks at the middle 50% of the data, making it a robust or 'resistant' measure of spread that is unaffected by extreme outliers.

Quartiles divide a sorted dataset into four equal quarters. This calculator uses the inclusive linear interpolation method: the rank/index is calculated as (N − 1) × (P / 100). If the rank is a decimal, we interpolate proportionally between the two neighboring values.