Skip to content
Statistics

IQR Calculator: Interquartile Range, Quartiles and Outlier Finder

Enter your dataset below to find the interquartile range (IQR), all three quartiles (Q1, Q2, Q3), the five-number summary, and any outliers identified by the 1.5 x IQR and 3 x IQR rules. Choose between the exclusive method (used by TI-83/84 and Excel QUARTILE.EXC) or the inclusive method (standard Tukey approach). Each step of the calculation is shown so you can follow the working.

Your details

Enter numbers separated by commas, spaces, or semicolons. At least 4 values are needed for meaningful quartiles.
Inclusive (standard) splits the sorted list into two halves to find Q1 and Q3. Exclusive interpolates at the 25th and 75th rank positions, matching the TI-83/84 and Excel QUARTILE.EXC function.
IQRNo outliers detected
7

Interquartile range: Q3 minus Q1

Q1 (25th percentile)3
Q2 / Median (50th percentile)6.5
Q3 (75th percentile)10
Minimum1
Maximum15
Lower fence (Q1 - 1.5 x IQR)-7.5
Upper fence (Q3 + 1.5 x IQR)20.5
Mild outliers0
Extreme outliers0
n (count)10
Q13
Q2 / Median6.5
Q310
IQR7

IQR = 7.0000

  • The middle 50% of your 10 values fall between 3.0000 (Q1) and 10.0000 (Q3), a spread of 7.0000.
  • No values fall outside the 1.5 x IQR fences, so no outliers are flagged by the Tukey rule.

Next stepPair the IQR with a box-and-whisker plot to visualize the spread and flag outliers at a glance.

Formula

IQR=Q3Q1,Lower fence=Q11.5×IQR,Upper fence=Q3+1.5×IQR\text{IQR} = Q_3 - Q_1, \quad \text{Lower fence} = Q_1 - 1.5 \times \text{IQR}, \quad \text{Upper fence} = Q_3 + 1.5 \times \text{IQR}

Worked example

Dataset: 1, 2, 3, 4, 6, 7, 8, 10, 13, 15 (sorted). n = 10. Lower half: [1, 2, 3, 4, 6], upper half: [7, 8, 10, 13, 15]. Q1 = 3, Q2 = 6.5, Q3 = 10. IQR = 10 - 3 = 7. Lower fence = 3 - 1.5 x 7 = -7.5. Upper fence = 10 + 1.5 x 7 = 20.5. No values fall outside these fences, so there are no outliers.

What is the interquartile range (IQR)?

The interquartile range is the distance between the first quartile (Q1, the 25th percentile) and the third quartile (Q3, the 75th percentile). Because it covers only the middle 50% of a sorted dataset, it is not pulled upward or downward by very large or very small values the way the overall range (maximum minus minimum) is. That makes the IQR a robust measure of statistical dispersion, especially useful when the data contain outliers or when the distribution is heavily skewed. A small IQR means most values cluster tightly around the median; a large IQR means the data are more spread out.

How to calculate the IQR step by step

Start by sorting your values from smallest to largest. Find the median (Q2): for an odd count, that is the single middle value; for an even count, it is the average of the two middle values. Split the sorted list into a lower half (values below Q2) and an upper half (values above Q2). For odd-length datasets, exclude the median itself from both halves. Q1 is the median of the lower half and Q3 is the median of the upper half. The IQR is simply Q3 minus Q1. This approach is called the inclusive or Tukey method. The exclusive method, used by TI-83/84 calculators and Excel QUARTILE.EXC, instead interpolates at rank positions 0.25(n+1) and 0.75(n+1), which can give slightly different results for small datasets.

Outlier detection with the 1.5 x IQR rule

John Tukey introduced the fence method for flagging outliers. Multiply the IQR by 1.5 and subtract the result from Q1 to get the lower fence; add it to Q3 for the upper fence. Any data point outside those fences is called a mild outlier and is shown as an individual dot beyond the whiskers on a box plot. For extreme outliers, the multiplier is 3 instead of 1.5: points beyond Q1 minus 3 x IQR or Q3 plus 3 x IQR are very unusual and often signal measurement errors or genuinely exceptional cases. Neither fence rule automatically tells you to remove a value; that decision requires subject-matter judgment.

IQR vs. standard deviation and range

The range (maximum minus minimum) uses only the two most extreme points and is therefore very sensitive to outliers. The standard deviation involves every data point and assumes a roughly bell-shaped distribution; a single extreme value can inflate it substantially. The IQR ignores the top and bottom quarters entirely, making it the preferred spread measure for skewed data, ordinal ratings, or any dataset where outliers are suspected. In practice, report the IQR alongside the median for skewed data, and the standard deviation alongside the mean for symmetric data.

Five-number summary and outlier fences

StatisticFormulaInterpretation
Minimumx_minSmallest observed value
Q1 (lower quartile)25th percentile25% of data fall below this point
Q2 (median)50th percentileMiddle value of the sorted dataset
Q3 (upper quartile)75th percentile75% of data fall below this point
Maximumx_maxLargest observed value
IQRQ3 - Q1Spread of the middle 50% of the data
Lower fence (mild)Q1 - 1.5 x IQRValues below this are mild outliers
Upper fence (mild)Q3 + 1.5 x IQRValues above this are mild outliers
Lower fence (extreme)Q1 - 3 x IQRValues below this are extreme outliers
Upper fence (extreme)Q3 + 3 x IQRValues above this are extreme outliers

The five-number summary describes the full spread of a dataset. The Tukey fences use the IQR to flag unusual values.

Frequently asked questions

What does the IQR tell you?

The IQR tells you how spread out the middle 50% of your data are. A small IQR means most values cluster close to the median, while a large IQR means the central half of the data covers a wide range. It is particularly useful for skewed distributions because it is not distorted by extreme values.

What is the difference between the inclusive and exclusive quartile methods?

The inclusive (Tukey) method splits the sorted dataset into two halves and finds the median of each half to get Q1 and Q3. The exclusive method (used by TI-83/84 calculators and Excel QUARTILE.EXC) instead computes ranks at positions 0.25(n+1) and 0.75(n+1) and interpolates between adjacent values. For large datasets, the two methods converge; for small datasets (fewer than about 20 values), they can give noticeably different quartiles. Check which method your textbook or software uses before comparing results.

Why is 1.5 x IQR used for outliers and not some other multiplier?

John Tukey chose 1.5 because it works well empirically for approximately normal data: with that multiplier, the fences exclude roughly 0.7% of data points from a normal distribution, which is an appropriate sensitivity for most exploratory analyses. The 3 x IQR multiplier for extreme outliers reflects that values that far out are far more unusual than ordinary boundary cases.

Can I use the IQR for categorical or ordinal data?

Yes, the IQR is valid for ordinal data (such as Likert-scale ratings) as long as you can sort the values and compute a meaningful median. It is not meaningful for purely nominal categories (for example, favourite colour), where ordering has no significance.

How many data points do I need for the IQR to be reliable?

Technically the IQR can be computed from as few as four values, but with very small samples the result is highly sensitive to individual data points. Quartile estimates become stable around n = 20 to 30. For very small samples, report the full five-number summary alongside the IQR so readers can see the raw spread.

Does an outlier flagged by the IQR rule have to be removed?

No. The 1.5 x IQR rule is a screening tool, not a verdict. A flagged value might be a genuine extreme observation, a data-entry error, or a measurement from a different population. Before removing any value, investigate its source. Removing real extreme observations inflates confidence artificially and distorts results.

Sources

Written by Dr. Hannah Brandt, PhD Statistician · Munich, Germany

Applied statistician translating rigorous probability theory into clear, accurate tools for researchers and practitioners.

Search 3,500+ calculators

Loading search…