This entry is part of the Chart Index, the reference library for the Chart Design Field Guide.

The box plot is Tukey's invention, and one of the most efficient chart types ever designed. In a single glyph the size of a postage stamp it shows median, quartiles, and range — five summary statistics, encoded as length and position. The form scales linearly: ten box plots side by side compare ten distributions in the space a single histogram would occupy.

The trade-off is summary versus shape. A box plot reduces a distribution to five numbers; subtle features — bimodality, skewness, irregular tails — disappear behind the box. For comparing many groups, that compression is the chart's superpower. For looking carefully at one distribution, the histogram or violin remains preferable.

What it is

A box plot encodes a distribution as a rectangle (the box) bounded by the first quartile (Q1) and third quartile (Q3), with a line inside the box at the median. From the box, whiskers extend outward to mark the range of the bulk of the data — in Tukey's original, to the most extreme values within 1.5× the interquartile range, with anything beyond plotted individually as an outlier; in the percentile variant used throughout this entry, to the 10th and 90th percentiles. The whole composition fits comfortably in a thin vertical strip.

The hero chart above compares delivery times for six states, twenty orders each. The eye reads each state's median (the dark line), its spread (the box height), and its tail behaviour (the whiskers) in a single sweep. NSW and Victoria are quick and tight; Western Australia and Tasmania are slower and more variable, with 90th-percentile deliveries stretching past a week. Randomise the observations and the boxes are recomputed from the raw values — the chart is a summary, not a drawing.

When to use it

Box plots are the right choice when:

  • You are comparing distributions across many groups (5–30 groups is comfortable).
  • The reader's question is "how do these distributions differ?" in terms of centre, spread, and tail.
  • The data is continuous with enough observations per group (typically ≥30) for quartiles to be meaningful.
  • You have outliers worth surfacing — the form makes them explicit.
  • The display needs to be dense — a row of box plots fits easily where a row of histograms would not.

When not to use it

  • Small samples. With fewer than 20 observations per group, quartiles become noisy. Show the raw points (strip or bee swarm) instead.
  • Subtle distribution shape. A bimodal distribution and a unimodal distribution can have identical five-number summaries. Use a histogram, violin, or density plot.
  • Audiences unfamiliar with the form. Non-statistical audiences may not recognise the box's encoding. Either add a small legend or use a simpler form.
  • One distribution. A single box plot is unremarkable. Use a histogram or density plot, which carry richer detail.

Design principles

Know what the box hides

The five-number summary is a lossy compression. Two groups with the same median, quartiles and range draw the same box, whatever the shape of the data in between. The three figures below plot the same two teams' task times three ways: as boxes, as violins, and as raw points.

As box plots: two teams, apparently alike
Team A and Team B have the same median, near-identical quartiles and the same range. The boxes are twins. On this evidence you would treat the two teams the same way.
As violins: Team B is two populations
Same observations. Team A is a single hump around 50 minutes; Team B has almost nobody near 50 — its people are either fast (around 40) or slow (around 60). The box plot could not have told you.
As raw points: the gap is visible in the data itself
Twenty-four dots per team, jittered so ties can be seen, with the median as a rule. Team B's empty band between 45 and 55 is the whole story, and it takes no smoothing to see it.

Show the data behind the box

Tukey's modern advocates — particularly Hadley Wickham — argue for jittered points overlaid on the box. The box gives the summary; the points show the actual observations. Together they preserve both the abstraction and the raw evidence. Where the tooling will not overlay them, put the strip plot beside the box plot, as above.

Use the right whisker rule

Tukey's 1.5×IQR is the default but not the only choice. For data with heavy tails, use percentile-based whiskers (the 10th and 90th, or 5th and 95th). For small samples, use the actual minimum and maximum. Document the choice; a box plot without a stated whisker rule is unreadable.

Whiskers at the 10th and 90th percentiles
Three states from the hero data. The whiskers stop short of the slowest and fastest orders, so the glyph describes the typical range and ignores the extremes.
Whiskers at the minimum and maximum
The same orders with range whiskers. The boxes are unchanged but Tasmania's upper whisker now reaches the single eleven-day order, and the chart reads as far more variable. Neither is wrong; they answer different questions, and the reader must be told which.

Align scales across panels

When comparing multiple box plots, every plot must share the same y-axis (or x-axis for horizontal). Independent scales destroy comparability; the form is then doing more harm than good. Where the comparison is within each group — before and after, this year and last — put the paired boxes side by side on one shared axis rather than in two panels.

Paired boxes on one scale: before and after a carrier change
Two boxes per state, one shared axis. The reader can see in a glance that the switch shortened deliveries everywhere, and by roughly how much — a comparison two separate charts with their own axes would have made impossible.

Use log scale when distributions span orders of magnitude

API latencies, file sizes, transaction values — these often span three or four orders of magnitude. A linear y-axis squashes nearly everything into a narrow band at the bottom. A log scale spreads the distribution and lets the boxes have real height.

Go horizontal for many groups or long labels

A box is as legible lying down as standing up. When there are more than six or seven groups, or the group names are more than a word, a horizontal layout gives every label a full line and lets the reader scan down a ranked list.

Eight product categories, horizontal, sorted by median
Long category names read naturally on the left, and sorting the groups by median turns the panel into a ranked argument: which categories are slow to ship, and how consistently.

Annotate the n per box

A box plot summary is only as good as its sample. Add a small annotation under each box showing the count: n = 1,420. This guards against the reader weighting boxes with twelve observations equally with boxes built on twelve thousand.

Quiet the box fill

The box's fill is decoration, not data. Use a single hue for every box unless colour has a job — a sub-group, a highlighted group — and let the box outline and median line carry the visual weight.

Highlight the median, not the mean

Box plots are quartile-based; the mean is not part of the form. If the mean matters, add a small marker (a diamond or asterisk) inside the box, but do not let it replace the median line. Tukey's resistance to non-resistant statistics is the chart's philosophical foundation.

Anatomy

The composition of a box plot
An anatomical guide

A multi-box-plot panel is a row of vertical glyphs, each summarising one distribution. Shared scale, consistent box widths, consistent whisker rule — these are the design choices that keep the comparison fair.

  • Violin plot — replaces the box with a density curve. Shows shape; harder to read precise quartiles.
  • Strip / jitter plot — every point shown; better for small samples. Often combined with a box plot.
  • Bee swarm — strip plot with collision avoidance.
  • Histogram / density plot — for one distribution at a time; shows shape that box plots hide.
  • Range plot — encodes minimum and maximum only, no quartiles or median.

Reading list

  • Tukey, J. (1977). Exploratory Data Analysis. The original box plot.
  • McGill, R., Tukey, J. & Larsen, W. (1978). Variations of Box Plots. The notched variant.
  • Wickham, H. & Stryjewski, L. (2011). 40 Years of Boxplots. A retrospective and modern variants.
  • Cleveland, W. (1993). Visualizing Data. On the comparative use of box plots.