Audited 27 Jul 2026·Last updated 27 Jul 2026·3 citations·Tier 2·0 uses

Interquartile Range (IQR) Calculator

Free interquartile range calculator: get the IQR (Q3 − Q1) of your dataset instantly, compared against the full range, with the interpolation method stated.

Interquartile Range (IQR) Calculator

Comma-separated numbers, at least 4 values, in any order.
Interquartile range (IQR)
17
Q3 − Q1 — the width of the middle 50% of the data. The primary robust measure of spread reported by this calculator.
First quartile (Q1)
72.5
Third quartile (Q3)
89.5
Range (max − min)
37
Count (n)
11

Background.

The Quanta interquartile range calculator answers a single, focused question: how spread out is the middle of my data? It takes any dataset, computes Q1 (the 25th percentile) and Q3 (the 75th percentile), and reports their difference — the interquartile range, or IQR — as a single number describing how wide the middle 50% of your observations actually is. Alongside the IQR it reports the plain range (maximum minus minimum) so you can compare the two directly, which is often the most instructive part of the result.

The IQR exists because the two most obvious ways to measure spread — the range and the standard deviation — both have a real weakness: they are sensitive to extreme values. The range depends entirely on the two most extreme observations in the entire dataset, so a single data-entry typo or one unusually high or low measurement can inflate it dramatically while the bulk of the data hasn't changed at all. The standard deviation is somewhat more resistant but still uses every value, including outliers, in its calculation, so it too can be dragged around by a handful of extreme points. The IQR sidesteps both problems by construction: it only looks at the middle half of the data, completely ignoring the bottom quarter and the top quarter. A single catastrophic outlier at either extreme has zero effect on the IQR, because Q1 and Q3 are determined entirely by the ranks of the middle-lying observations, not by how far away the extremes happen to sit.

This robustness is exactly why the IQR is the standard companion statistic to the median, and why the two of them together (rather than the mean and standard deviation) are the recommended summary for skewed data or data suspected to contain outliers. It is also the statistic that defines the box in a box-and-whisker plot — the box spans exactly from Q1 to Q3, so its width or height literally is the IQR — and it is the input to the classic 1.5×IQR rule used across data science and quality control to flag individual outlying observations (covered by Quanta's dedicated outlier calculator).

As with any statistic built from percentiles, the exact numeric value of Q1 and Q3 depends on which interpolation convention you use when the requested percentile doesn't land exactly on a data point — and different textbooks and software genuinely disagree here. This calculator uses the same Type 7 (linear interpolation) convention as R, NumPy, pandas, and Excel's QUARTILE.INC, matching the majority of modern data-analysis tools; see the FAQ for the specific alternative conventions that can give a slightly different number for the same data.

Use this calculator whenever your question is specifically 'how spread out is my data' and you want an answer that isn't distorted by a handful of extreme values. If you want the individual Q1/Q2/Q3 values reported together rather than just their difference, use the quartile calculator; if you want to know exactly which data points count as outliers under the 1.5×IQR rule, use the outlier calculator, which applies this same IQR to flag specific values.

What is interquartile range (iqr) calculator?

The interquartile range (IQR) is a measure of statistical dispersion equal to the difference between the third quartile (Q3, the 75th percentile) and the first quartile (Q1, the 25th percentile): IQR = Q3 − Q1. It measures the width of the middle 50% of a dataset, ignoring the bottom and top quarters entirely. Because it depends only on the middle half of the ranked data, the IQR is a robust statistic — resistant to the influence of outliers and extreme values, in exactly the same way the median is robust while the mean is not. This makes the IQR the natural companion to the median for describing spread in skewed distributions or datasets suspected of containing extreme values, just as the standard deviation is the natural companion to the mean for roughly symmetric, outlier-free data. The IQR is also the quantity that defines the box in a standard box-and-whisker plot, and it is the basis of the widely used 1.5×IQR rule for flagging individual data points as potential outliers.

How to use this calculator.

  1. Paste your dataset as comma-separated numbers, in any order — the calculator sorts them internally.
  2. You need at least 4 values for the interquartile range to be meaningful.
  3. Read the IQR as your primary answer to 'how spread out is the middle of my data.'
  4. Compare the IQR against the full range shown alongside it — a range that is much larger than the IQR signals that one or a few extreme values are stretching the full spread without affecting the more robust middle-50% measure.
  5. If you also want Q1, Q2, and Q3 reported individually (rather than just their difference), use the quartile calculator. If you want specific data points flagged as outliers using the 1.5×IQR rule, use the outlier calculator.

The formula.

IQR = Q3 − Q1

Sort the n values into ascending order statistics. Compute Q1 and Q3 using Type 7 linear interpolation (per Hyndman & Fan 1996): for proportion p (0.25 for Q1, 0.75 for Q3), the interpolated rank is h = 1 + p·(n − 1), and the quartile is x₍⌊h⌋₎ + (h − ⌊h⌋)·(x₍⌈h⌉₎ − x₍⌊h⌋₎), reducing to the exact order statistic x₍ₕ₎ when h is a whole number. The IQR is simply IQR = Q3 − Q1, per the NIST/SEMATECH e-Handbook's definition of the interquartile range as the 75th percentile minus the 25th percentile. The plain range (max − min) is computed for direct comparison — a much larger range than IQR is a quick visual signal that the extremes are doing more work than the middle of the data.

A worked example.

Example

The same eleven exam scores used in the quartile calculator's example: 62, 68, 71, 74, 78, 81, 85, 88, 91, 95, 99 (n = 11). Q1 works out to 72.5 and Q3 to 89.5 (see the quartile calculator's worked example for the interpolation arithmetic), so the interquartile range is IQR = 89.5 − 72.5 = 17. The full range, by contrast, is 99 − 62 = 37 — more than double the IQR. That gap tells a story: the middle half of the class's scores are packed into a fairly tight 17-point band, while the bottom and top quarters together account for the other 20 points of spread. If one student's score of 99 were instead a data-entry error for 990, the range would explode to 928, but the IQR would barely move — 99 sits above Q3 already, so replacing it with an even larger outlier changes nothing about where Q1 and Q3 sit. That resistance to extreme values is the entire point of using the IQR instead of (or alongside) the range.

values62, 68, 71, 74, 78, 81, 85, 88, 91, 95, 99

Frequently asked questions.

What is the interquartile range?
The interquartile range (IQR) is the difference between the third quartile (Q3, the 75th percentile) and the first quartile (Q1, the 25th percentile): IQR = Q3 − Q1. It measures how spread out the middle 50% of a dataset is, ignoring the top and bottom quarters entirely.
Why use the IQR instead of the range or standard deviation?
Because the IQR is robust to outliers in a way the range and standard deviation are not. The range depends entirely on the two most extreme values in the dataset, so a single data-entry error or unusually extreme measurement can distort it dramatically. The standard deviation uses every value and is also pulled around by extremes, though less severely than the range. The IQR only depends on the middle half of the ranked data, so extreme values at either end have zero effect on it — a genuinely useful property whenever your data might contain outliers or is heavily skewed.
How is the IQR used to detect outliers?
The classic 1.5×IQR rule (popularised by John Tukey) flags any value below Q1 − 1.5×IQR or above Q3 + 1.5×IQR as a potential outlier, and any value beyond 3×IQR from the nearest quartile as a more extreme outlier. Quanta's dedicated outlier calculator applies this rule (and an alternative z-score-based rule) directly to your data and lists which specific values are flagged; this IQR calculator reports only the summary spread statistic itself.
Why might my IQR differ slightly from another calculator's?
Because Q1 and Q3 depend on which interpolation convention is used when the requested percentile doesn't land exactly on a data point. This calculator uses Type 7 (linear interpolation), the default in R, NumPy, pandas, and Excel's QUARTILE.INC function. Older textbooks and Excel's alternative QUARTILE.EXC function use different conventions that can produce a slightly different Q1 or Q3 — and therefore a slightly different IQR — for the same data, especially with small sample sizes. See Hyndman & Fan (1996) for the full catalogue of competing conventions.
What is a 'robust' statistic and why does that matter here?
A robust statistic is one whose value is not substantially changed by a small number of extreme or erroneous observations. The median and the IQR are the two classic robust statistics: replacing the single largest value in a dataset with an arbitrarily larger number changes neither of them, because both depend only on rank position, not on the magnitude of the most extreme values. The mean and the standard deviation, by contrast, are not robust — both can be shifted substantially by a single extreme value. Whenever you suspect your data might contain errors, extreme outliers, or heavy skew, the median/IQR pairing is the safer descriptive summary.
How many values do I need for a meaningful IQR?
This calculator requires at least 4 values. With very small datasets, Q1 and Q3 (and therefore the IQR) can be heavily influenced by just one or two observations, so treat the IQR from a tiny sample as a rough estimate rather than a precise figure — the same caution that applies to any statistic computed from a small n.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 313 calculators remain free
  • No billing is enabled
Coming soon