Skip to main content
HSCalculadora

Interquartile Range Calculator

Find the IQR and outlier fences of a data set.

Comma-separated numbers

Results update as you type.

Interquartile range
—
Lower outlier fence—
Upper outlier fence—

How it works

The interquartile range measures the spread of the central half of a data set and is the standard tool for detecting outliers, and this calculator computes it along with the outlier fences. You enter your numbers, and it finds the first and third quartiles, subtracts to get the IQR, and calculates the lower and upper fences at 1.5 times the IQR beyond each quartile. Any value below the lower fence or above the upper fence is considered a potential outlier under the widely used Tukey rule. The IQR itself is a robust measure of variability because it ignores the smallest and largest quarters of the data, so a few extreme values do not distort it the way they distort the full range or the standard deviation. This makes the IQR and its fences ideal for skewed or messy real-world data, and they are the basis of the whiskers and outlier points on a box plot. Analysts use them to clean data, flag anomalies, and summarise distributions without assuming the data follow a normal curve. Enter your values to compute the interquartile range and the outlier fences.

Formula

IQR = Q3 − Q1; fences = Q1 − 1.5·IQR and Q3 + 1.5·IQR

The interquartile range is the third quartile minus the first, measuring the spread of the middle half of the data. Multiplying the IQR by 1.5 and subtracting it from the first quartile gives the lower fence, while adding it to the third quartile gives the upper fence. Values beyond either fence are commonly flagged as outliers, a rule that does not assume any particular distribution.

Source:Descriptive statistics (Tukey's fences)

We review all our tools from time to time to ensure accuracy.

Worked example

Values:1, 2, 3, 4, 5, 6, 7, 8
Q1 = 2.75, Q3 = 6.25, IQR = 3.5; fences at −2.5 and 11.5 flag any outliers.

How to use this calculator

  1. 1

    Enter your values

    Enter values.

  2. 2

    Adjust the options

    Fine-tune any options to match your situation.

  3. 3

    Read your result

    Interquartile range updates instantly as you type — no button to press.

Frequently asked questions

What is the interquartile range?

The interquartile range, or IQR, is the difference between the third quartile and the first quartile of a data set. It measures the spread of the middle 50 percent of the data, ignoring the lowest and highest quarters. Because it excludes extremes, the IQR is a robust measure of variability that resists distortion by outliers.

How does the IQR detect outliers?

The common Tukey rule multiplies the IQR by 1.5 and marks any value more than that distance below the first quartile or above the third quartile as an outlier. These boundaries are called fences. Values outside them are unusually far from the central bulk of the data and warrant a closer look, which this calculator identifies with lower and upper fences.

Why 1.5 times the IQR?

The factor of 1.5 is a convention introduced by statistician John Tukey that balances catching genuine outliers against falsely flagging normal variation. For roughly normal data, values beyond 1.5 times the IQR are quite rare, making them reasonable candidates for outliers. Some analyses use 3 times the IQR to flag only extreme outliers, but 1.5 is the standard default.

Is the IQR better than the range for spread?

Usually, yes. The full range depends only on the minimum and maximum, so a single extreme value can inflate it dramatically. The IQR measures the spread of the central half and is unaffected by extremes, giving a more stable and representative picture of variability, especially for skewed data or data sets that contain outliers.

What is a box plot's connection to the IQR?

A box plot draws a box from the first quartile to the third quartile, so the length of the box is the interquartile range, with a line at the median inside. The whiskers typically extend to the outlier fences at 1.5 times the IQR, and points beyond them are drawn as individual outliers, making the box plot a direct visual of these calculations.