Five-Number Summary and Box Plots

Get the five-number summary (min, Q1, median, Q3, max), draw a box-and-whisker plot from it, mark outliers, and read skew and spread from the plot.

You have a data set and need to produce a box plot, or you have a box plot and need to read the five-number summary from it. The answer is the five-number summary: minimum, first quartile (Q1), median, third quartile (Q3), and maximum. Those five values are the skeleton of every box plot. Find them by hand, draw the plot, spot outliers with a modified box plot, and read skew and spread. The method follows OpenStax Introductory Statistics 2e, section 2.4 Box Plots.

The Five Numbers

The five-number summary describes a data set's centre, spread, and extremes. To find it, sort your data from smallest to largest. The minimum is the smallest value. The maximum is the largest. The median is the middle value. If your data set has an odd number of points, the median is the single middle number. If it has an even count, the median is the average of the two middle numbers.

The first quartile, Q1, is the median of the lower half of the sorted data. Do not include the overall median if you have an odd number of data points. The third quartile, Q3, is the median of the upper half, also excluding the overall median for odd counts. The interquartile range (IQR) is Q3 minus Q1. The IQR and median are robust measures, meaning they hold up well when your data contains extreme values. That makes them the preferred pair for skewed distributions, where mean and standard deviation can mislead.

Worked example: take the data set 2, 5, 6, 8, 12, 15, 18. Sorted, it is 2, 5, 6, 8, 12, 15, 18. Minimum is 2. Maximum is 18. With seven points, the median is the fourth value, 8. The lower half is 2, 5, 6. Its median, Q1, is 5. The upper half is 12, 15, 18. Its median, Q3, is 15. The five-number summary is 2, 5, 8, 15, 18.

How to Make a Box Plot

Draw a number line that covers your data range. Above it, draw a box from Q1 to Q3. Inside the box, draw a vertical line at the median. From the box, draw lines to the minimum on the left and to the maximum on the right. That is a basic box plot.

For the worked example above, the box goes from 5 to 15. The median line is at 8. The left line goes to 2. The right line goes to 18. The IQR is 15 minus 5, which is 10. Half of your data lies inside the box, between Q1 and Q3. The lines show the full spread.

This construction is the same for any data set. The box plot gives you a visual summary of the five-number summary. Compare distributions quickly by stacking box plots on the same number line. That is how you compare groups side by side.

Modified Box Plots With Outliers

A standard box plot draws lines to the minimum and maximum. A modified box plot uses the 1.5 times IQR rule to flag potential outliers. Outliers are data points that fall below Q1 minus 1.5 times the IQR or above Q3 plus 1.5 times the IQR. These points get plotted as individual dots or asterisks. The lines then extend only to the most extreme data point that is NOT an outlier.

Take a data set: 1, 4, 5, 6, 7, 8, 20. Sorted. Minimum 1, Q1 4, median 6, Q3 7, maximum 20. IQR is 7 minus 4, which is 3. The lower fence is 4 minus (1.5 times 3) equals 4 minus 4.5 equals minus 0.5. No data point falls below that. The upper fence is 7 plus 4.5 equals 11.5. The value 20 is above 11.5, so 20 is an outlier. Plot the box from 4 to 7 with a median line at 6. Draw the right line to 8, the largest value inside the fence. Then plot a dot at 20.

The 1.5 times IQR rule is a heuristic from John Tukey (1977). It flags points for review, not for automatic removal. An outlier may be a legitimate extreme value or an error. The modified box plot shows you where to look.

Reading Skew and Spread

The box plot shows skew and spread. Skew is the asymmetry in the data. If the median is closer to Q1 than to Q3, the data is right-skewed: the tail is on the right. If the median is closer to Q3, the data is left-skewed: the tail is on the left. If the median is roughly centred in the box, the distribution is symmetric.

Spread is the overall range and the IQR. A long box means high variability in the middle 50 percent of data. Long lines mean extreme values are far from the centre. Compare two groups by their box plots side by side. The group with the larger IQR has more spread in its central half. The group with the longer lines has more extreme values. The group with the median pulled to one side has more skew.

The empirical rule (68-95-99.7) applies only to normal distributions. For non-normal data, use Chebyshev's inequality: at least 75 percent of data falls within two standard deviations of the mean. The box plot gives you a direct look without assuming normality.

Comparing Groups Side by Side

Place two or more box plots on the same number line to compare groups. For example, compare test scores from two classes. Class A: 55, 60, 65, 70, 75, 80, 85. Class B: 40, 50, 60, 70, 80, 90, 100. The five-number summary for Class A: min 55, Q1 60, median 70, Q3 80, max 85. For Class B: min 40, Q1 50, median 70, Q3 90, max 100.

The box plots show that Class A has less spread: its IQR is 20, versus 40 for Class B. Class A's lines are shorter, meaning less extreme spread. Both medians are 70, but Class B has a wider range and more spread. The box plot comparison tells you that the centres are similar but the variability is different.

When comparing, look for overlap in the boxes. If the box of one group does not overlap the box of another, the groups likely have different centres. If the boxes overlap but the lines do not, the groups may have different extremes. This visual method is faster than running a statistical test.

Diagram: Modified Box Plot

Number line from 0 to 22. Box from 4 to 7 with a vertical line at 6. Left line from 4 to 1. Right line from 7 to 8. A dot above 20.

This diagram shows the modified box plot for the outlier example: data set 1, 4, 5, 6, 7, 8, 20. The box contains the middle 50 percent. The median is at 6. The left line goes to the minimum, 1. The right line goes to 8, the largest value within the upper fence. The dot at 20 marks the outlier. The IQR is 3. The lower fence is minus 0.5. The upper fence is 11.5.

Common Questions

What is the five-number summary?

The five-number summary is the minimum, first quartile (Q1), median, third quartile (Q3), and maximum of a data set. It is the standard skeleton for a box plot.

How do you find Q1 and Q3 by hand?

Sort the data. Q1 is the median of the lower half of the data, excluding the overall median if you have an odd number of points. Q3 is the median of the upper half, also excluding the overall median for odd counts.

What is a modified box plot?

A modified box plot uses the 1.5 times IQR rule to flag outliers. Lines extend to the most extreme data point within the fences. Outliers are plotted as individual dots.

How do you read skew from a box plot?

If the median is closer to Q1 than to Q3, the data is right-skewed. If closer to Q3, left-skewed. If centred, symmetric.

Can you compare two groups with box plots?

Yes. Place box plots on the same number line. Compare IQR for spread, median for centre, and lines for extremes. Overlap in the boxes suggests similar centres.