Box Plot Maker

Paste your data and get a box-and-whisker plot with the five-number summary, quartiles and interquartile range worked out step by step, and outliers marked by the 1.5 × IQR rule. Put two groups on one scale to compare them, then download a PDF of the plot and its working, or a PNG or SVG.

Chart

Data

Type or paste numbers separated by commas, spaces or new lines, or paste a spreadsheet column. Use a point for decimals and leave out thousands separators (1250).15 values read.
The second group, read the same way.14 values read.

Chart and downloads

Minutes spent reading last night102030459560Class A51522.53045Class B5101520253035404550556065707580859095Minutes
  • Circles are outliers by the 1.5 × IQR rule; each whisker ends at the most extreme value that is not an outlier.

The PDF has the chart and every step of the working on Letter paper. Print it at 100% or Actual size. Your data stay in this browser.

Titles and labels

What was measured, with its unit: Height (cm)

Box plot settings

Off: the whiskers run to the smallest and largest values

Working and PDF

The two agree when there is an even number of values

Worked statistics

Class A: sorted data

Sorted values (n = 15): 10, 15, 20, 20, 25, 30, 30, 30, 35, 40, 40, 45, 50, 60, 95

There are 15 values, from 10 to 95.

Class A: mean

Add the values, then divide by how many there are.

Sum = 10 + 15 + 20 + 20 + 25 + 30 + 30 + 30 + 35 + 40 + 40 + 45 + 50 + 60 + 95 = 545

Mean = 545 ÷ 15 = 36.33 (rounded)

Class A: median

With 15 values (an odd number), the median is the middle one: the 8th value in the sorted list.

Median = 30

Class A: mode

30 appears 3 times, more often than any other value, so the mode is 30.

Class A: range

Range = largest − smallest = 95 − 10 = 85

Class A: quartiles and IQR (exclusive method)

With 15 values (an odd number), leave the median (the 8th value) out and split the rest into two halves of 7.

Lower half: 10, 15, 20, 20, 25, 30, 30

Q1 = median of the lower half = 20

Upper half: 35, 40, 40, 45, 50, 60, 95

Q3 = median of the upper half = 45

IQR = Q3 − Q1 = 45 − 20 = 25

By the inclusive method (median in both halves, the same as Tukey’s hinges), Q1 = 22.5, Q3 = 42.5 and IQR = 20. Check which method your class uses.

Class A: five-number summary

Five-number summary
MinimumQ1MedianQ3Maximum
1020304595

Class A: outliers (1.5 × IQR rule)

An outlier is a value more than 1.5 × IQR below Q1 or above Q3. A value exactly on a fence is not an outlier.

1.5 × IQR = 1.5 × 25 = 37.5

Lower fence = Q1 − 37.5 = 20 − 37.5 = −17.5

Upper fence = Q3 + 37.5 = 45 + 37.5 = 82.5

95 is above 82.5, so it is an outlier.

The whiskers run to 10 and 60, the most extreme values that are not outliers.

Class B: sorted data

Sorted values (n = 14): 5, 10, 10, 15, 15, 20, 20, 25, 25, 25, 30, 35, 40, 45

There are 14 values, from 5 to 45.

Class B: mean

Add the values, then divide by how many there are.

Sum = 5 + 10 + 10 + 15 + 15 + 20 + 20 + 25 + 25 + 25 + 30 + 35 + 40 + 45 = 320

Mean = 320 ÷ 14 = 22.86 (rounded)

Class B: median

With 14 values (an even number), the median is the mean of the two middle values, the 7th and 8th.

Median = (20 + 25) ÷ 2 = 22.5

Class B: mode

25 appears 3 times, more often than any other value, so the mode is 25.

Class B: range

Range = largest − smallest = 45 − 5 = 40

Class B: quartiles and IQR (exclusive method)

With 14 values (an even number), split the sorted list into two halves of 7.

Lower half: 5, 10, 10, 15, 15, 20, 20

Q1 = median of the lower half = 15

Upper half: 25, 25, 25, 30, 35, 40, 45

Q3 = median of the upper half = 30

IQR = Q3 − Q1 = 30 − 15 = 15

Class B: five-number summary

Five-number summary
MinimumQ1MedianQ3Maximum
51522.53045

Class B: outliers (1.5 × IQR rule)

An outlier is a value more than 1.5 × IQR below Q1 or above Q3. A value exactly on a fence is not an outlier.

1.5 × IQR = 1.5 × 15 = 22.5

Lower fence = Q1 − 22.5 = 15 − 22.5 = −7.5

Upper fence = Q3 + 22.5 = 30 + 22.5 = 52.5

No value is below −7.5 or above 52.5, so there are no outliers.

The whiskers run to 5 and 45, the most extreme values that are not outliers.

Comparing the two groups

Medians: Class A 30, Class B 22.5; difference 7.5

Means: Class A 36.33 (rounded), Class B 22.86 (rounded); difference 13.48 (rounded)

IQRs: Class A 25, Class B 15

MADs: Class A 14.93 (rounded), Class B 9.29 (rounded)

The difference between the means (13.48 (rounded)) is 0.9 times the larger MAD (14.93 (rounded)). The bigger this multiple, the less the two groups overlap.

What a box plot shows

A box plot draws five numbers on a number line: the smallest value, the lower quartile (Q1), the median, the upper quartile (Q3) and the largest value. The box runs from Q1 to Q3, so it holds the middle half of the data, and a line across it marks the median. The whiskers reach out to the smallest and largest values, or, when outliers are marked, to the most extreme values that are not outliers, which are drawn as separate circles.

The length of the box is the interquartile range (IQR), a measure of spread that ignores the most extreme quarter at each end. That is why box plots are good at comparing groups and at showing skew and outliers, and why they hide detail: two very different data sets can share a five-number summary. US students meet them in grade 6 (Common Core 6.SP.B.4); in England they are part of GCSE Mathematics.

How to read a box plot

  • Centre: the line inside the box is the median. Half the values are at or below it, half at or above.
  • Spread: the box's length is the IQR, and the distance from one whisker end to the other is the range (unless there are outliers beyond them).
  • Quarters: each whisker and each half of the box holds about a quarter of the values. "About", because repeated values and the way the quartiles are found can move a value or two either side.
  • Shape: a longer right whisker or right half of the box means the data are skewed right; a symmetrical plot suggests a symmetrical spread of values.
  • Outliers: circles beyond the whiskers are values far from the rest. They are worth checking: some are mistakes, some are the most interesting values in the data.

How to make a box plot by hand

  1. Sort the data from smallest to largest and count them.
  2. Find the median. With an odd count it is the middle value; with an even count, the mean of the two middle values.
  3. Split the list into halves below and above the median. With an odd count, leave the median out of both halves (the method most US classes use) or put it in both (Tukey's hinges); ask which your class uses.
  4. Find Q1 and Q3, the medians of the lower and upper halves, and the IQR = Q3 − Q1.
  5. Check for outliers: anything below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR.
  6. Draw a number line that covers every value, with an even scale. Draw the box from Q1 to Q3, a line at the median, whiskers out to the smallest and largest values that are not outliers, and a circle at each outlier.

Worked example

Class A recorded how many minutes each student read last night: 30, 15, 45, 20, 95, 35, 25, 40, 10, 30, 50, 20, 60, 30, 40. There are 15 values, so the median is the 8th in the sorted list, 30 minutes. These are the tool's own steps for the data, worked out when this page was built:

Minutes spent reading last night: Class A102030459560101520253035404550556065707580859095Minutes
The tool's box plot of Class A's reading times, with 95 minutes marked as an outlier.

Sorted data

Sorted values (n = 15): 10, 15, 20, 20, 25, 30, 30, 30, 35, 40, 40, 45, 50, 60, 95

There are 15 values, from 10 to 95.

Quartiles and IQR (exclusive method)

With 15 values (an odd number), leave the median (the 8th value) out and split the rest into two halves of 7.

Lower half: 10, 15, 20, 20, 25, 30, 30

Q1 = median of the lower half = 20

Upper half: 35, 40, 40, 45, 50, 60, 95

Q3 = median of the upper half = 45

IQR = Q3 − Q1 = 45 − 20 = 25

By the inclusive method (median in both halves, the same as Tukey’s hinges), Q1 = 22.5, Q3 = 42.5 and IQR = 20. Check which method your class uses.

Five-number summary

Five-number summary
MinimumQ1MedianQ3Maximum
1020304595

Outliers (1.5 × IQR rule)

An outlier is a value more than 1.5 × IQR below Q1 or above Q3. A value exactly on a fence is not an outlier.

1.5 × IQR = 1.5 × 25 = 37.5

Lower fence = Q1 − 37.5 = 20 − 37.5 = −17.5

Upper fence = Q3 + 37.5 = 45 + 37.5 = 82.5

95 is above 82.5, so it is an outlier.

The whiskers run to 10 and 60, the most extreme values that are not outliers.

So the five-number summary is 10, 20, 30, 45 and 95, but the right whisker stops at 60: 95 is beyond the upper fence of 82.5, so it is drawn on its own.

Which quartile method?

For an even number of values the two halves methods agree. For an odd number they differ. With Class A's 15 values, leaving the median out of both halves gives Q1 = 20 and Q3 = 45 (IQR 25); putting it in both gives Q1 = 22.5 and Q3 = 42.5 (IQR 20). Neither is wrong. Putting the median in both halves gives Tukey's hinges. Leaving it out is what TI-83 and TI-84 calculators do, and it matches the Common Core glossary, which defines the first quartile as "the median of the data values less than M", where M is the median.

The tool, like those calculators, splits the sorted list by position. That gives the same quartiles as the glossary's wording unless other values tie with the median. When they do, reading the wording literally means taking only the values strictly below the median, which can change Q1: for 1, 2, 3, 3, 3, 4, 5, the lower half by position is 1, 2, 3, so Q1 = 2, but the values below 3 are 1 and 2, which gives 1.5. Teachers differ on this, so check which way your class does it.

Spreadsheets and statistics packages often use yet another rule that interpolates between values (the NIST/SEMATECH e-Handbook's own outlier example does this), so check the method before marking a student's answer wrong.

Common mistakes

  • Not sorting first. The median and quartiles come from positions in the sorted list.
  • Mixing quartile methods between the lesson, the calculator and the answer key.
  • Running a whisker out to an outlier. When outliers are marked, the whisker stops at the last value inside the fences.
  • Reading the box's height as meaningful. Only positions along the number line carry information; the box can be any height.
  • An uneven scale. Equal steps on the number line must stand for equal amounts, or the box and whiskers mislead.
  • Saying exactly 25% of values are in each part. It is about a quarter; ties and odd counts shift it.

Frequently asked questions

What is the 1.5 × IQR rule for outliers?

Work out the interquartile range (IQR = Q3 − Q1) and multiply it by 1.5. Anything more than that below Q1 or above Q3 is an outlier. In the example the IQR is 25, so the fences are 20 − 37.5 = −17.5 and 45 + 37.5 = 82.5, and 95 minutes is an outlier. The NIST/SEMATECH e-Handbook of Statistical Methods calls these the inner fences. A value exactly on a fence is not an outlier.

Why don’t my quartiles match my calculator or Excel?

There are several ways to find quartiles, and they disagree when the data have an odd number of values or when the quartile falls between two values. US classrooms and the TI-83/84 calculators leave the median out of both halves (the exclusive method, used here by default). Tukey's hinges put it in both halves (the inclusive method). Excel's QUARTILE.INC and QUARTILE.EXC interpolate between values and can give a third answer, despite their names. Switch the tool's quartile method to match your class; the working shows both whenever they differ.

Does a box plot show the mean?

No. A box plot is built from the five-number summary (minimum, Q1, median, Q3 and maximum), which uses positions in the sorted list, not the mean. Some software adds a marker for the mean, but the standard plot taught in school doesn't. The tool still works out the mean in the steps under the chart, so you can compare it with the median.

What does it mean if the median isn’t in the middle of the box?

The middle half of the data is lopsided. If the median sits nearer Q1 and the right-hand part of the box is longer, the values between the median and Q3 are more spread out than those between Q1 and the median: the data are skewed right, like reading times where most students read a little and a few read a lot. A long whisker on one side says the same about the outer quarters.

How do I compare two groups with box plots?

Draw them on the same scale, one above the other (tick "Compare two groups"), then compare the medians for the centre and the box lengths (IQRs) for the spread. In the tool's example, Class A has a median of 30 minutes and an IQR of 25, against 22.5 and 15 for Class B. Where the boxes overlap a lot, the difference in medians is small compared with the spread within each group.