Method and source check
Last checked:
Source and implementation check; this is not professional review or advice.
Method
The calculator validates at least two finite numbers, sorts them, and reports the minimum, 25th percentile, median, 75th percentile, and maximum. Percentiles use linear interpolation with zero-based position h = (n − 1)p; range and IQR are derived from those values.
Q(p) = x⌊h⌋ + (h − ⌊h⌋)(x⌊h⌋+1 − x⌊h⌋), h = (n − 1)p
IQR = Q3 − Q1
range = maximum − minimum
Variables and units
- x
- the data sorted in ascending order
- p
- 0.25, 0.50, or 0.75
- n
- number of data values
Worked example
For 1, 2, 3, 4: minimum = 1, Q1 = 1.75, median = 2.5, Q3 = 3.25, maximum = 4, IQR = 1.5, and range = 3.
Limitations
- Quartile conventions differ among books and software. This calculator uses the stated linear-interpolation convention, so Q1 and Q3 can differ from tools that use lower- and upper-half medians.