Quartile and IQR calculator
Quartiles split sorted data into four equal parts, and the IQR measures the spread of the middle half.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter data (separate numbers with commas, spaces or new lines) and method.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
Textbook: Q1 is the median of the lower half and Q3 of the upper half, leaving out the median when n is odd. Excel: interpolate at position 1 + (n - 1) × p. IQR = Q3 - Q1.
Example
Inputs: Method = Textbook (median of halves). Result: Interquartile range (IQR): 5; First quartile (Q1): 2.5; Median (Q2): 5.
1, 2, 3, 4, 5, 6, 7, 8, 9
1, 2.5, 5, 7.5, 9
Limits and caveats
- There is no single definition of quartiles, so methods disagree, especially on small data sets.
- The textbook method here matches TI calculators and many school curricula.
Questions about this tool
Why does my answer differ from Excel?
Excel interpolates (QUARTILE.INC) while most courses take the median of each half. Pick the method your teacher or software uses.
What is the IQR used for?
It measures the spread of the middle half and ignores extremes, which makes it useful for spotting outliers and drawing box plots.
What is the five-number summary?
Minimum, Q1, median, Q3 and maximum: the numbers a box plot is drawn from.
