Box Plots Explained: How to Read a Box-and-Whisker Plot
A box plot squeezes a whole distribution into five numbers and a handful of outlier dots, which makes it ideal for comparing groups. This guide shows what every part of the box means, works through a small example by hand, and explains when a box plot is the better choice over a histogram.
The five-number summary
A box plot (also called a box-and-whisker plot) is drawn from five numbers: the minimum, the first quartile (Q1), the median, the third quartile (Q3) and the maximum. If you sort the data from smallest to largest, the median is the middle value, Q1 is the value a quarter of the way up and Q3 is three quarters of the way up. Half of all the data lies between Q1 and Q3.
The box runs from Q1 to Q3 and has a line at the median. The distance from Q1 to Q3 is the interquartile range (IQR). It measures the spread of the middle half of the data and, unlike the standard deviation, is barely affected by extreme values. That robustness is the main reason box plots are popular.
Whiskers and outliers: the 1.5 × IQR rule
The whiskers extend from the box to the most extreme data values that are not outliers. The most common definition marks a point as an outlier if it lies more than 1.5 × IQR below Q1 or above Q3. Those boundaries are called fences. Points beyond a fence are drawn individually as dots; the whisker ends at the last point inside the fence, not at the fence itself.
The factor 1.5 is a convention, not a law of nature. For a normal distribution it flags roughly 0.7% of values as outliers, so a few dots in a large data set are expected. Flagged points are worth checking but are not automatically errors.
A worked example by hand
Take nine measurements, already sorted: 5, 7, 8, 9, 10, 12, 13, 15, 30. The median is the fifth value, 10. Using linear interpolation (the method used by Excel’s QUARTILE.INC and by this tool), Q1 is the third value, 8, and Q3 is the seventh value, 13. The IQR is 13 − 8 = 5.
The fences are 8 − 1.5 × 5 = 0.5 and 13 + 1.5 × 5 = 20.5. Every value lies inside the fences except 30, so 30 is drawn as an outlier. The lower whisker reaches 5 (the smallest value) and the upper whisker reaches 15 (the largest value below 20.5).
| Part of the plot | Value | How it is found |
|---|---|---|
| Median | 10 | Middle of nine sorted values |
| Q1 / Q3 | 8 / 13 | 25th and 75th percentiles |
| IQR | 5 | Q3 − Q1 |
| Fences | 0.5 and 20.5 | Q1 − 1.5 IQR, Q3 + 1.5 IQR |
| Whiskers | 5 and 15 | Extreme values inside the fences |
| Outlier | 30 | Beyond the upper fence |
Quartile methods differ slightly between programs; with small samples you may see Q1 = 7.5 and Q3 = 14 from the “median of halves” method.
Comparing groups
The real strength of box plots appears when several groups share one axis. The figure below shows test scores for a control group and two treatments, 40 students each. At a glance you can compare the medians (the lines), the spread (box height) and whether any group has outliers. Treatment A sits highest with the tightest spread, while Treatment B has both the lowest median and the widest box.
When boxes overlap a lot, the groups are not clearly different. If their notches or medians are well separated, the difference is probably real, but a statistical test is needed to say so.
Reading skew from a box plot
If the median line sits close to the middle of the box and the whiskers are about equal, the data are roughly symmetric. A median near the bottom of the box with a long upper whisker means the data are right-skewed. Box plots do not show how many peaks the data have; a two-humped distribution and a one-humped one can have identical boxes. If you suspect multiple groups mixed together, plot a histogram as well.
When to choose a box plot
Choose a box plot to compare three or more groups, to summarise 10 to a few hundred values per group, or whenever outliers matter. Avoid it for fewer than about eight values per group, where the quartiles are poorly defined and it is better to show the raw points. In a report, say how the whiskers are defined (1.5 × IQR or min to max) and give the group sizes, because readers cannot tell n from the box.
Frequently asked questions
- What does the line in the middle of the box mean?
- It is the median, the value that splits the data in half. It is not the mean, which can be pulled towards outliers.
- Are the whiskers always minimum and maximum?
- No. In the common Tukey definition the whiskers stop at the most extreme values within 1.5 × IQR of the box, and points beyond that are drawn as outliers. Some fields use min and max or percentiles instead, so say which you used.
- Should I delete outliers?
- Not just because a box plot flags them. Check whether they are measurement or entry errors. If they are real, keep them and consider reporting the median and IQR, which are less affected.
- Box plot or bar chart with error bars?
- A box plot shows more of the distribution and is usually more informative for raw data. A bar chart with SD bars is fine for a simple comparison of means when the data are roughly normal.
Keep reading
- How Many Bins Should a Histogram Have? – How to choose the number of histogram bins, with formulas and a worked example for 120 measurements, and how to read the shape, skew and outliers once you have one.
- Which Chart Should I Use? – A practical decision guide for choosing between line, bar, scatter, histogram, box and pie charts, with the question each one answers and the mistakes to avoid.
- Error Bars: SD, SE or Confidence Interval? – What error bars show, how SD, SE and 95% confidence intervals differ, how to calculate each from raw data, and which one to put on your graph.
Written and reviewed by the Plotiq Editorial Team. Spotted a mistake? Tell us and we will correct it. See About Plotiq for how these guides are made.