How this calculator works
Q1 and Q3 are the lower and upper quarter cut points. Linear interpolation uses positions 1 + (n - 1)p; nearest rank selects the observed value at ceil(np). The halves method takes the median of the lower and upper halves, excluding the central observation for odd n. Q2 is always the ordinary median on this page, even with nearest-rank Q1 and Q3. A singleton supplies all three quartiles.
Formula
Q1 = Q(0.25); Q2 = median(x); Q3 = Q(0.75); IQR = Q3 - Q1.
Worked example
For 1, 2, 3, 4, 5, linear quartiles are 2, 3, 4. With the centre excluded, medians of halves give 1.5, 3, 4.5.
Advertisement
Frequently asked questions
Which quartile method is correct?
Several are accepted. Match the method required by your course, software or analysis, and name it when reporting results.
Do quartiles guarantee four equal counts?
Not with ties or small samples. Quartiles are cut points; repeated observations may straddle a boundary.
Is Q2 always the mean?
No. Q2 is the median. The mean can differ substantially for a skewed data set.