Quartiles and Interquartile Range Calculator
Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 9/10/2026
Quartiles split a sorted series into four equal parts: Q1 is the median of the lower half, Q3 the median of the upper half, and the interquartile range (IQR) is their difference (Q3 − Q1). For the values 1, 2, 3, 4, 5, Q1 = 1.5, Q3 = 4.5, and the IQR = 3.
Explanation
Quartiles extend the idea of the median (which splits the data into two equal halves) by splitting it into four equal parts: the first quartile (Q1) is the value below which 25% of the data lies, the third quartile (Q3) the one below which 75% of the data lies. The interquartile range (IQR = Q3 − Q1) measures the spread of the central half of the data, deliberately ignoring the lowest quarter and the highest quarter — which makes it a dispersion measure much more robust to extreme values than the simple range (which depends only on the minimum and maximum). **Important to know**: there are several slightly different methods for calculating quartiles (this one uses Tukey's method, which excludes the overall median from both halves when the count is odd), and a spreadsheet like Excel may give a slightly different result on the same data, because it uses a different linear interpolation method by default. Neither method is "the true one" — they are two different conventions, not to be mixed in the same analysis. The coefficient of variation offers yet another perspective on spread, relative to the mean.
Example: the values 1, 2, 3, 4, 5
Inputs
Values: 1, 2, 3, 4, 5.
Calculation
Overall median = 3, excluded from both halves (odd count). Lower half = (1, 2) → Q1 = 1.5. Upper half = (4, 5) → Q3 = 4.5. Interquartile range = 4.5 − 1.5 = 3.
Result
For this series, Q1 = 1.5, Q3 = 4.5, and the interquartile range is 3.
Frequently asked questions
Why is the overall median not included in both halves?
With Tukey's method used here, when the count is odd, the central median value belongs to neither the lower half nor the upper half — it is set aside, and each remaining half is of equal size. It is one convention among others: some alternative methods include the median in both halves, which gives slightly different quartiles.
Why does my result differ from Excel or a scientific calculator?
Because there are several recognized methods for calculating quartiles (Tukey, linear interpolation, Moore-McCabe method, among others), which can give slightly different results on the same dataset, especially for small samples. Excel uses a linear interpolation method by default, different from the Tukey method used here — neither is incorrect, they are two distinct conventions.
What is the interquartile range used for in practice?
The interquartile range is used notably to detect outliers robustly: a common convention considers suspect any value more than 1.5 times the IQR above Q3 or below Q1 — it is the principle used to draw the "whiskers" of a box plot, a very widespread visual tool in descriptive statistics.