CHART CHOICES & CHECKABLE METHODS

Box plot quartiles: two conventions worked by hand

Quartiles divide ordered data into positions, but finite-sample algorithms can differ. ChartsAI offers R type 7 linear interpolation and medians of halves excluding an odd sample’s middle observation. State the method when reproducing a box plot.

All chart guides →

The comparison at a glance

SummaryHalves excluding middleLinear type 7
Q134
Median77
Q31310
IQR106

Use a sample small enough to inspect

Take the ordered values 2, 4, 7, 10 and 16. The median is 7. For medians of halves, remove that middle observation from the halves: the lower pair is 2 and 4, the upper pair 10 and 16. Their medians give Q1 = 3 and Q3 = 13, with IQR = 10.

Apply linear interpolation separately

For the default linear method, use a zero-based position (n − 1)p. With n = 5, the quarter positions are 1 and 3, landing exactly on the second and fourth observations. Q1 is therefore 4 and Q3 is 10. The median remains 7, but the IQR becomes 6.

Quartile choices affect more than the box

With 1.5 × IQR whiskers, changing Q1 and Q3 also changes the fences used to flag observations. In this particular sample all values remain within either pair of fences. In another sample an observation might switch flag status. That change would follow from the convention, not from a new measurement.

Match a specification rather than a screenshot

If coursework, a report or another application expects a particular quartile rule, choose and name it explicitly. A screenshot alone may not reveal the algorithm. Download the raw CSV and inspect the calculated table. The editor preserves every observation and lets you compare methods without silently replacing the original list.

A related chart you can inspect

Box plot quartiles for a five-value sample
Box plot quartiles for a five-value sample. Original fictional data; this linked example has its own complete input and calculation settings.

Open the worked example ↗

References and reproducibility

The worked arithmetic and teaching examples on this page are original. Background reading: R quantile algorithms. Source code and reuse terms expose the implemented calculations.

Written by SupaMakers for ChartsAI · September 8, 2026.

Continue with a related question