The comparison at a glance
| Feature | Box plot | Histogram |
|---|---|---|
| Centre | Median line | Inferred from grouped shape |
| Spread | IQR and whiskers | Range and concentration of bins |
| Multiple peaks | Usually hidden | Can be visible |
| Key convention | Quartiles and whiskers | Bin width and boundaries |
A compact summary leaves details out
A box plot cannot fully encode peaks, gaps or repeated exact values. Two datasets can share a median and quartiles while having different internal patterns. Our equal-median example gives both groups a median of 10, but their IQRs are 2 and 9. That is already a useful comparison; it still does not show every observation.
Binning reveals a different view
A histogram can expose clusters separated by empty intervals, as in our two-peaks example. Its appearance also depends on bin width and alignment. A very coarse grouping may conceal the gap. When shape matters, compare plausible widths and inspect the raw values rather than relying on one visually convenient version.
Compare like with like
For several groups, box plots use less space and permit side-by-side median and IQR comparisons. State the quartile and whisker conventions, and report each group’s N. When comparing histograms across unequal sample sizes, consistent bins and percentages can help; different widths or raw counts can confound shape with sample size.
Use both when the decision needs both
Begin with a box plot to locate a group with unusual spread, then inspect its histogram or dot plot. This is a complementary workflow rather than a contest with a universal winner. Neither view proves that a group difference is significant or explains what caused it. Preserve the source and calculation settings so the comparison can be reproduced.
A related chart you can inspect
References and reproducibility
The worked arithmetic and teaching examples on this page are original. Background reading: NIST histogram background. Source code and reuse terms expose the implemented calculations.
Written by SupaMakers for ChartsAI · September 8, 2026.