Skip to content
MoneyDeck

Interquartile Range Calculator

Find Q1, Q3, the IQR, outlier fences and the five-number summary

Updated · Free, no signup

Separate numbers with commas, spaces or new lines.

Interquartile range (IQR)

28

First quartile (Q1)

15

Median (Q2)

40

Third quartile (Q3)

43

Minimum

6

Maximum

49

Range

43

Lower fence (Q1 − 1.5 × IQR)

-27

Upper fence (Q3 + 1.5 × IQR)

85

Outliers

None

Count (n)

11

  • The middle 50% of the data lies between 15 and 43, a spread of 28.
  • The median is closer to Q3, suggesting the data are skewed left.

Five-number summary

About the Interquartile Range Calculator

This interquartile range (IQR) calculator finds the spread of the middle 50% of your data. Paste a list of numbers and it sorts them, then returns the first quartile Q1, the median, the third quartile Q3, the IQR (Q3 − Q1), the full five-number summary (minimum, Q1, median, Q3, maximum) and the 1.5 × IQR fences used to flag outliers.

The IQR is the go-to measure of spread for skewed data such as incomes, house prices and response times, because unlike the range or standard deviation it ignores extreme values. Students use it for box plots and homework, and analysts use it to screen data for outliers before modelling.

Different textbooks and software compute quartiles slightly differently, so you can pick the method: the median-of-halves method used by TI-84 calculators and most statistics courses, Excel’s QUARTILE.INC (also the default in Python’s NumPy and Google Sheets), or Excel’s QUARTILE.EXC.

With the default inputs, the interquartile range (iqr) is 28. Change any value above to recalculate instantly.

How to use the interquartile range calculator

  1. 1Paste or type your numbers, separated by commas, spaces or new lines.
  2. 2Choose the quartile method your class or software uses.
  3. 3Read the IQR, Q1, median and Q3.
  4. 4Check the fences and outlier list, and use the five-number summary for a box plot.

Formula and method

IQR = Q3 − Q1 Outlier fences: Q1 − 1.5 × IQR and Q3 + 1.5 × IQR

The data are sorted first. With the median-of-halves method the list is split at the median (leaving the median out when n is odd) and Q1 and Q3 are the medians of the lower and upper halves. The inclusive method places Q1 at position 1 + 0.25(n − 1) and interpolates between neighbours; the exclusive method uses position 0.25(n + 1). Excel’s QUARTILE.EXC returns #NUM! when that position falls outside the data (fewer than 3 values); this calculator instead clamps it to the minimum or maximum and adds a note. All three agree on large data sets but can differ slightly on small ones.

The IQR is the width of the middle half of the data, so it is resistant to outliers. Tukey’s rule treats any value more than 1.5 IQRs below Q1 or above Q3 as a potential outlier — the same rule used to draw whiskers on a box plot.

Q1
First quartile: 25% of the data lie below it
Q3
Third quartile: 75% of the data lie below it
IQR
Interquartile range, Q3 − Q1
n
Number of data values

Worked examples

Eleven values, median-of-halves method

Sorted, the median is the 6th value, 40. The lower half 6, 7, 15, 36, 39 has median 15 and the upper half 41, 42, 43, 47, 49 has median 43, so IQR = 43 − 15 = 28. No value is outside −27 to 85.

Same data, Excel QUARTILE.INC

The inclusive method puts Q1 at position 1 + 0.25 × 10 = 3.5, halfway between 15 and 36 (25.5), and Q3 at position 8.5, halfway between 42 and 43 (42.5), giving an IQR of 17.

Detecting an outlier

The lower half 12–16 has median 15 and the upper half 17–45 has median 19, so IQR = 4. The upper fence is 19 + 1.5 × 4 = 25, so 45 is flagged as an outlier.

Excel QUARTILE.EXC method

With n = 8, Q1 sits at position 0.25 × 9 = 2.25 (between 2 and 3) and Q3 at 6.75 (between 6 and 7), so the IQR is 4.5.

Frequently asked questions

How do you calculate the interquartile range?+

Sort the data, find the median, then find the median of the lower half (Q1) and of the upper half (Q3). The IQR is Q3 − Q1. For 1, 3, 5, 7, 9, 11 that is Q1 = 3, Q3 = 9 and IQR = 6.

Why do different calculators give different quartiles?+

There are several accepted definitions. TI calculators use medians of halves, Excel QUARTILE.INC and NumPy interpolate at 1 + p(n − 1), and QUARTILE.EXC uses p(n + 1). They converge for large samples but can differ for small ones.

What does the IQR tell you?+

It is the range covered by the middle 50% of values, so it measures spread without being affected by extreme highs or lows. A small IQR means the typical values are tightly clustered.

How do you find outliers using the IQR?+

Compute the fences Q1 − 1.5 × IQR and Q3 + 1.5 × IQR. Any value below the lower fence or above the upper fence is a potential outlier. Using 3 × IQR instead identifies extreme outliers.

What is the five-number summary?+

It is the minimum, Q1, median, Q3 and maximum. Together they describe the centre, spread and range of a data set and are exactly what a box-and-whisker plot draws.

Related tools