How to Make a Box Plot (Box and Whisker Plot)
Learn to make and read a box and whisker plot: find the five-number summary, quartiles, IQR and outliers step by step, then build one free online.
Published
Free tool: Box Plot MakerA box plot, also called a box and whisker plot, sums up a set of numbers in one compact picture: where the middle is, how spread out the values are, whether they lean to one side, and which values are unusually far from the rest. Because each box is narrow, you can line up several groups side by side and compare them at a glance. This guide walks through the calculation by hand and then shows how to make a box plot with the free Box Plot Maker.
The parts of a box plot
- The box runs from the first quartile (Q1) to the third quartile (Q3), so it holds the middle 50% of the values.
- The line inside the box is the median, the middle value.
- The whiskers reach out to the lowest and highest values that aren't outliers.
- Dots beyond the whiskers are outliers: values unusually far from the box.
The five numbers behind the box and whiskers (the minimum, Q1, the median, Q3 and the maximum) are called the five-number summary.
Worked example: quiz scores
Eleven students took a quiz. Their scores, already sorted from lowest to highest, are:
31, 62, 65, 68, 70, 73, 75, 78, 80, 84, 88
1. Find the median
With 11 values, the median is the 6th: 73.
2. Find the quartiles
Q1 is the value a quarter of the way through the data, and Q3 three quarters of the way. Graph Maker uses the same method as Excel's QUARTILE.INC: the position of a quartile is (n − 1) × p, counting the first value as position 0.
- Q1: (11 − 1) × 0.25 = 2.5, halfway between the 3rd value (65) and the 4th (68), so Q1 = 66.5.
- Q3: (11 − 1) × 0.75 = 7.5, halfway between the 8th value (78) and the 9th (80), so Q3 = 79.
3. Work out the interquartile range
The interquartile range (IQR) is the width of the box: 79 − 66.5 = 12.5.
4. Find the outliers
The usual rule, from the statistician John Tukey, flags any value more than 1.5 × IQR beyond the box:
- Lower fence: 66.5 − 1.5 × 12.5 = 47.75
- Upper fence: 79 + 1.5 × 12.5 = 97.75
The score of 31 is below the lower fence, so it's an outlier. Nothing is above the upper fence.
5. Draw the whiskers
The whiskers stop at the most extreme values inside the fences: 62 at the bottom and 88 at the top. The outlier, 31, is drawn as a separate dot.
| Statistic | Value |
|---|---|
| Minimum | 31 |
| Q1 | 66.5 |
| Median | 73 |
| Q3 | 79 |
| Maximum | 88 |
| IQR | 12.5 |
| Whiskers | 62 to 88 |
| Outliers | 31 |
| Mean | 70.36 |
Why your quartiles might not match your textbook
There are several accepted ways to calculate quartiles, and they can give slightly different answers on small data sets. Many textbooks and graphing calculators take the median of each half of the data instead: here the lower half is 31, 62, 65, 68, 70, giving Q1 = 65, and the upper half is 75, 78, 80, 84, 88, giving Q3 = 80. Excel's QUARTILE.EXC gives the same 65 and 80 for this data.
| Method | Q1 | Q3 | IQR |
|---|---|---|---|
| Linear interpolation (Graph Maker, Excel QUARTILE.INC) | 66.5 | 79 | 12.5 |
| Median of each half (many textbooks), Excel QUARTILE.EXC | 65 | 80 | 15 |
Neither is wrong; the differences shrink as the data set grows. In this example, both methods flag 31 as an outlier. If your homework expects a particular method, use that one for hand calculations.
How to make a box plot with Graph Maker
-
Open the Box Plot Maker. It works in your browser, with no account needed.
-
Add a chart title and a y-axis title, for example "Quiz Scores" and "Score".
-
Type your data in Groups and Values, one group per line: a name, a colon, then the values separated by commas or spaces. For the example:
Quiz: 31, 62, 65, 68, 70, 73, 75, 78, 80, 84, 88To compare groups, add a line for each one, such as
Class A: …andClass B: …. The values don't need to be sorted. -
Choose the whiskers. 1.5 × IQR (show outliers) uses Tukey's rule from the example; Minimum to maximum stretches the whiskers to the smallest and largest values and shows no outliers.
-
Show the mean as a diamond if you want to compare it with the median.
-
Pick the colors of the boxes, background, title and text.
-
Check the five-number summary table under the chart. It lists n, the minimum, Q1, the median, Q3, the maximum, the mean and any outliers for each group.
-
Download the chart as a PNG, JPG or SVG.
How to read a box plot
- Center: the median line shows the typical value. Comparing medians is the quickest way to compare groups.
- Spread: a tall box and long whiskers mean the values vary a lot; a short box means they're consistent.
- Skew: if the median sits off-center in the box, or one whisker is much longer than the other, the data lean to one side. In the quiz, the low outlier pulls the mean (70.36) below the median (73).
- Outliers: check them before drawing conclusions. They may be data-entry mistakes, or the most interesting values in the set.
- Overlap between groups: when two boxes barely overlap, the groups really differ; when they overlap heavily, the difference may be noise.
Box plot or histogram?
A box plot is best for comparing several groups compactly. It can hide the shape of the data, though: a set with two separate clusters can produce the same box as a smooth bell curve. To see the full shape of one group, use a histogram. And with very few values, say fewer than 8 per group, consider showing the individual points instead, because quartiles of tiny samples are unstable.
Frequently asked questions
What does the box in a box plot represent?
The middle half of the data: from the first quartile (25% of values below it) to the third quartile (75% below it). Its height is the interquartile range.
What counts as an outlier in a box plot?
Usually any value more than 1.5 × IQR below Q1 or above Q3. It's a rule of thumb for spotting values worth a second look, not proof that a value is wrong.
Why is there only one whisker, or none?
When the lowest or highest values sit right at a quartile, there's nothing for the whisker to reach. That's common with small data sets or data with many repeated values.