Interquartile Range Calculator
The interquartile range (IQR) is the width of the middle 50% of your data: the distance from the first quartile to the third. This calculator reports the IQR alongside Q1, Q3, the median, and the 1.5 × IQR fences, using the median-split (Moore & McCabe) quartile convention — the same one as our quartile calculator, so the two pages always agree.
Three Steps to the IQR
1. Sort the data from smallest to largest and locate the median.
2. Split the sorted list into a lower and an upper half (the median itself joins neither half when the count is odd), then take the median of each half to get Q1 and Q3.
3. Subtract: IQR = Q3 − Q1. That single subtraction is the whole statistic.
Entering Your Data
- Separate values with commas, spaces, or line breaks — a pasted spreadsheet column works unchanged.
- Two values are the mathematical minimum, but the middle 50% only becomes meaningful from roughly five values upward.
- The fences shown with the result are screening lines, not verdicts; the outlier calculator applies them to your data point by point.
Enter numbers separated by commas or spaces
Related Calculators
Descriptive Statistics Calculator
Summarize data with mean, median, range, variance, and related statistics.
Quartile Calculator
Calculate Q1, Q2, Q3, IQR, and Tukey fences with automatic outlier detection.
Five Number Summary Calculator
Get the minimum, Q1, median, Q3, and maximum of a data set for box plots.
The IQR Formula and the Quartile Convention Behind It
The formula itself could not be simpler — all the work hides inside the quartiles:
IQR = Q3 − Q1
Lower fence = Q1 − 1.5 × IQR
Upper fence = Q3 + 1.5 × IQR
Where:
- Q1 = median of the lower half of the sorted data
- Q3 = median of the upper half of the sorted data
- The overall median is excluded from both halves when n is odd
Because quartiles can be located by several published conventions, this page states its choice explicitly: the exclusive median-split method of Moore & McCabe, the convention taught in most introductory statistics courses and used by TI-83/84 calculators. Excel's QUARTILE.INC interpolates positions instead, so its IQR can differ slightly on small data sets. If you need every landmark of the distribution rather than just its middle width, the five number summary calculator adds the minimum and maximum to the three quartiles.
IQR vs Standard Deviation vs Range
The three common measures of spread react very differently when one extreme value enters the data. Take the eight delivery times from the worked example below — 4, 6, 6, 8, 10, 12, 12, 30 hours — and remove the delayed 30-hour shipment:
- Range: collapses from 26 to 8 — a 69% drop caused by a single value, because the range is built entirely from the two most extreme observations.
- Standard deviation: falls from about 7.68 to about 2.91 — squaring deviations lets one far-out value dominate the sum.
- IQR: stays exactly 6 in both cases. Q1 and Q3 are rank-based, so what happens beyond them is invisible to the statistic.
That immunity is called robustness, and it cuts both ways. The IQR is the honest spread measure when extremes are suspect, but it also ignores genuine information in the tails — two data sets with identical middles and wildly different extremes report the same IQR. Statisticians describe this with the breakdown point: up to 25% of the data can be corrupted before the IQR gives way, while the standard deviation and range can be ruined by a single bad value.
Where the IQR Is the Right Measure of Spread
Reach for the IQR whenever the median is your measure of center — the two are natural partners, just as the standard deviation partners with the mean. That makes the IQR the default for skewed quantities such as household income, house prices, hospital lengths of stay, and response times, where a long tail would inflate the standard deviation and misrepresent typical variation.
The IQR also does structural work in two standard displays. It is the height of the box in a box plot, where whiskers extend to the last observations inside the fences. And it powers Tukey's outlier screen: values beyond 1.5 × IQR from the quartiles are flagged for review, a rule the outlier calculator applies automatically. Prefer the standard deviation instead when the data is roughly symmetric and you need the algebraic machinery built on it — confidence intervals, z-scores, and the empirical rule all assume it.
Worked Example: Eight Delivery Times
A warehouse logs eight delivery times, in hours: 4, 6, 6, 8, 10, 12, 12, 30 — seven routine shipments and one held up in customs. Following the three steps:
- Sort: 4, 6, 6, 8, 10, 12, 12, 30. With n = 8 (even), the median is the average of the 4th and 5th values: (8 + 10) / 2 = 9.
- Split into halves: lower half 4, 6, 6, 8 and upper half 10, 12, 12, 30. Q1 = median of the lower half = (6 + 6) / 2 = 6; Q3 = median of the upper half = (12 + 12) / 2 = 12.
- Subtract: IQR = 12 − 6 = 6.
The fences land at 6 − 1.5 × 6 = −3 and 12 + 1.5 × 6 = 21. A negative lower fence is normal for data packed near zero — it simply means no small-side value can be flagged. The summary reads: half of all deliveries arrive within a 6-hour window around the 9-hour median, and the 30-hour shipment sits well beyond the upper fence. Compare that to the range of 26, which describes the customs delay more than the delivery process itself.
Frequently Asked Questions
What does the interquartile range actually tell me?
The IQR is the width of the interval holding the middle 50% of your data, measured in the same units as the data. An IQR of 6 hours means the central half of all observations fits inside a 6-hour window. It says nothing about the extremes by design, which is exactly what makes it a stable description of typical variation.
Why report the IQR instead of the standard deviation?
Use the IQR when the data is skewed, contains suspect extremes, or is summarized by its median. Because Q1 and Q3 depend only on ranks, a wild value cannot move the IQR, while the standard deviation squares every deviation and can be inflated dramatically by one observation. For symmetric, well-behaved data the standard deviation is preferred because confidence intervals and z-scores are built on it.
What does an IQR of zero mean?
It means Q1 and Q3 are equal, so at least half of your data - the entire middle stretch - consists of one repeated value. This is common in coarse ratings data, such as survey scores where most people answer 4 out of 5. The data may still have spread in its tails; the middle 50% just does not.
Will this IQR match my textbook, TI-84, or Excel?
It matches textbooks that teach the median-split (Moore & McCabe) method and TI-83/84 calculators, which exclude the overall median from both halves when n is odd. Excel's QUARTILE.INC and many programming libraries interpolate percentile positions instead, which can shift Q1 and Q3 slightly on small data sets and change the IQR with them. State which convention you used when reporting results.
Can I use the 1.5 x IQR fences shown here to delete outliers?
Treat the fences as a screening tool, not a deletion rule. A value beyond a fence is unusual relative to the middle of your data, but it may be a legitimate rare event rather than an error. Investigate flagged values first, and if they are genuine, consider reporting summaries with and without them instead of silently removing data.