Quartile and IQR Calculator

Quick answer

The quartile calculator finds the first quartile (Q1), median (Q2), third quartile (Q3), interquartile range and the outlier fences used in box plots.

Q1 (25th percentile)
—
Median (Q2)
—
Q3 (75th percentile)
—
Interquartile range
—
Lower fence
—
Upper fence
—

Quartiles split sorted data into four equal parts. Values beyond the fences are often flagged as outliers.

How to use the Quartile and IQR Calculator

  1. Data

Results update as you type, and every field accepts the units shown in its menu.

How it works

Quartiles are computed by linear interpolation between ranked values (the same method as Excel’s QUARTILE.INC).

What each result means

  • Q1 (25th percentile) = [Q1 (25th percentile)]([Data])
  • Median (Q2) = median([Data])
  • Q3 (75th percentile) = [Q3 (75th percentile)]([Data])
  • Interquartile range = [Q3 (75th percentile)] – [Q1 (25th percentile)]
  • Lower fence = [Q1 (25th percentile)] – 1.5×[Interquartile range]
  • Upper fence = [Q3 (75th percentile)] + 1.5×[Interquartile range]

Formula

IQR = Q3 − Q1Lower fence = Q1 − 1.5 × IQR, Upper fence = Q3 + 1.5 × IQR

Worked example

Inputs — Data: 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49.
Results — Q1 (25th percentile) = 25.5; Median (Q2) = 40; Q3 (75th percentile) = 42.5; Interquartile range = 17; Lower fence = 0; Upper fence = 68.

Frequently asked questions

Why do other tools give slightly different quartiles?

There are several quartile methods; this uses linear interpolation (type 7).

What is a five-number summary?

Minimum, Q1, median, Q3 and maximum.

What formula does the Quartile and IQR Calculator use?

IQR = Q3 − Q1.

Sources

  1. NIST/SEMATECH e-Handbook of Statistical Methods

Cite this calculator

Speedy Calculator. (2026). Quartile and IQR Calculator. Speedy Calculator. https://speedycalculator.com/calculators/statistics/quartile/