How to make a boxplot (five-number summary)

By Jude Wallis · Published

To make a boxplot, find the five-number summary (minimum, first quartile Q1, median, third quartile Q3, maximum), draw a box from Q1 to Q3 with a line at the median, then extend whiskers to the smallest and largest values. A modified boxplot plots outliers as separate points.

AP Statistics: Unit 1 (topics 1.7 Summary Statistics for One Quantitative Variable, 1.8 Graphical Representations of Summary Statistics for One Quantitative Variable, 1.9 Comparisons of the Distributions for One Quantitative Variable). Boxplots are Unit 1 topic 1.8 in the Fall 2026 AP course; the CED defines the boxplot, with whiskers extending to the most extreme non-outliers, in topic 1.8 (1.8.A.2), and the 1.5 times IQR outlier rule in topic 1.7 (1.7.D.1.i).

What a five-number summary is

A five-number summary describes a data set with five values listed in order: the minimum, the first quartile, the median, the third quartile, and the maximum. Together they mark where the data begins and ends and how the middle is divided into quarters.

The median is the middle value once the data is sorted. It splits the data into a lower half and an upper half. The first quartile, written Q1Q_1, is the median of the lower half, and the third quartile, written Q3Q_3, is the median of the upper half. About 25% of the data is at or below Q1Q_1, 50% at or below the median, and 75% at or below Q3Q_3.

The distance between the quartiles is the interquartile range, or IQR, defined as IQR=Q3Q1\text{IQR} = Q_3 - Q_1. The IQR measures the spread of the middle 50% of the data, and you will use it to flag outliers. A boxplot is built from the median and quartiles rather than the mean, so it is resistant to a few extreme values.

How to make a boxplot step by step

To make a boxplot, turn the five-number summary into a box with two whiskers. Here is the procedure for a basic boxplot.

  1. Sort the data from smallest to largest. Every quartile depends on the data being in order.
  2. Find the five-number summary. Locate the minimum, Q1Q_1, the median, Q3Q_3, and the maximum. For an odd number of values, the median is one data point, so leave it out when you find Q1Q_1 and Q3Q_3 from the two halves.
  3. Draw and scale an axis that covers the minimum through the maximum, with even spacing.
  4. Draw the box from Q1Q_1 to Q3Q_3, and draw a line inside it at the median. The box shows the middle 50% of the data.
  5. Draw the whiskers as lines from the box out to the minimum and the maximum.

The box always spans the IQR, and the line inside it is the median, not the mean. Each whisker represents about 25% of the data, and the box holds the middle 50%.

Modified boxplots plot outliers as separate points

A modified boxplot is the version to draw whenever the data might contain outliers, and it is the version the AP course expects. Instead of stretching the whiskers all the way to the minimum and maximum, a modified boxplot plots outliers as separate points and pulls the whiskers back to the most extreme values that are not outliers.

To decide which points are outliers, use the 1.5 times IQR rule. A value is an outlier if it is more than 1.5×IQR1.5 \times \text{IQR} above Q3Q_3 or more than 1.5×IQR1.5 \times \text{IQR} below Q1Q_1. The two fences are:

Q11.5×IQRandQ3+1.5×IQRQ_1 - 1.5 \times \text{IQR} \quad \text{and} \quad Q_3 + 1.5 \times \text{IQR}

Any value beyond a fence is plotted as its own point, often marked with an asterisk or a dot. The whisker on that side then stops at the largest or smallest value that is still inside the fence. The 1.5 IQR rule for outliers works through the fences in more detail.

A modified boxplot carries more information than a basic one, because a single far-off value is shown for what it is instead of being hidden at the end of a long whisker.

How to read skew from a boxplot

A boxplot shows the shape of a distribution through the position of the median and the length of the two sides. Compare the two halves of the box and the two whiskers to read the skew.

  • Roughly symmetric: the median sits near the center of the box, and the two whiskers are about the same length.
  • Skewed right: the median sits closer to Q1Q_1 on the left, and the right whisker or a high outlier stretches farther. The longer tail points toward the larger values.
  • Skewed left: the median sits closer to Q3Q_3 on the right, and the left whisker stretches farther. The longer tail points toward the smaller values.

The mean gives a second clue when you know it. The AP course notes that a right-skewed distribution usually has a mean larger than its median, because the high tail pulls the mean up, while a left-skewed distribution usually has a mean smaller than its median. For a roughly symmetric distribution the mean and median are close together.

What a boxplot cannot show you

A boxplot summarizes a distribution with just five numbers, so it hides some features. Two data sets with the same five-number summary can look very different in a histogram or dotplot.

A boxplot cannot show:

  • Gaps and clusters inside the box or whiskers, because the space between quartiles is drawn as a solid box.
  • Multiple peaks, since there is no way to mark where values pile up into a bimodal shape.
  • The sample size, since the picture looks the same for 20 values or 2,000.

When those details matter, pair the boxplot with a histogram or dotplot. Boxplots earn their keep when you compare several groups side by side, where the shared five-number structure makes centers and spreads easy to line up.

Check your work with a calculator

On the AP exam a graphing calculator with statistical capabilities is expected, and its one-variable statistics output reports the five-number summary directly. Read the labels for minX, Q1, Med, Q3, and maxX.

To get the five numbers for any small data set, enter it in the five-number summary calculator. To watch a boxplot change shape as you drag points and add outliers, open the descriptive statistics sandbox. Boxplots are Unit 1 topic 1.8 in the AP Statistics course.

Building a modified boxplot from raw data

A teacher records how many minutes each of 11 students spent on a homework assignment: 12, 7, 24, 5, 30, 8, 60, 15, 6, 10, 19. Find the five-number summary, check for outliers with the 1.5 times IQR rule, and describe the modified boxplot.

  1. Sort the 11 values from smallest to largest: 5, 6, 7, 8, 10, 12, 15, 19, 24, 30, 60.

  2. Find the median. With n=11n = 11 values, the median is the 6th value, which is 12 minutes. This splits the data into a lower half (5, 6, 7, 8, 10) and an upper half (15, 19, 24, 30, 60), leaving the median out of both.

  3. Find the quartiles. The first quartile Q1Q_1 is the median of the lower half, the 3rd of those five values, so Q1=7Q_1 = 7. The third quartile Q3Q_3 is the median of the upper half, so Q3=24Q_3 = 24. The minimum is 5 and the maximum is 60, giving the five-number summary 5, 7, 12, 24, 60.

  4. Find the IQR: IQR=Q3Q1=247=17\text{IQR} = Q_3 - Q_1 = 24 - 7 = 17.

  5. Build the fences using 1.5×IQR=1.5×17=25.51.5 \times \text{IQR} = 1.5 \times 17 = 25.5. Upper fence: Q3+25.5=24+25.5=49.5Q_3 + 25.5 = 24 + 25.5 = 49.5. Lower fence: Q125.5=725.5=18.5Q_1 - 25.5 = 7 - 25.5 = -18.5.

  6. Compare each end to its fence. The maximum, 60, is above 49.5, so 60 is an outlier. The minimum, 5, is above -18.5, so there are no low outliers.

  7. Set the whiskers. The lower whisker runs to the minimum, 5. The upper whisker stops at the largest value that is not an outlier, which is 30. The value 60 is plotted separately as an outlier.

  8. Read the shape. The median (12) sits closer to Q1Q_1 (7) than to Q3Q_3 (24), and the high outlier stretches the right side, so the distribution is skewed right. As a check, the mean is 196/1117.82196 / 11 \approx 17.82 minutes, larger than the median of 12, which is consistent with right skew.

The five-number summary is minimum 5, Q1=7Q_1 = 7, median 12, Q3=24Q_3 = 24, maximum 60 minutes. With IQR=17\text{IQR} = 17 and fences at -18.5 and 49.5, the value 60 is an outlier. The modified boxplot has a box from 7 to 24 with the median line at 12, a lower whisker to 5, an upper whisker to 30, and 60 plotted as a separate point. The distribution is skewed right.

Frequently asked questions

What is a five-number summary?

A five-number summary is the minimum, first quartile Q1Q_1, median, third quartile Q3Q_3, and maximum of a data set, listed in order. These five values mark the ends of the data and split the middle into quarters, and they are exactly what a boxplot draws.

What is the difference between a boxplot and a modified boxplot?

A basic boxplot runs its whiskers all the way to the minimum and maximum. A modified boxplot first checks for outliers with the 1.5 times IQR rule, plots any outliers as separate points, and pulls the whiskers back to the most extreme values that are not outliers. The AP course expects the modified version.

How do you find outliers for a boxplot?

Compute IQR=Q3Q1\text{IQR} = Q_3 - Q_1, then multiply by 1.5. A value is an outlier if it is more than 1.5×IQR1.5 \times \text{IQR} above Q3Q_3 or more than 1.5×IQR1.5 \times \text{IQR} below Q1Q_1. In the worked example the fences are -18.5 and 49.5, so the value 60 is an outlier.

Can you read the mean from a boxplot?

No. A boxplot is built from the median and quartiles, so it shows no mean and no standard deviation. You can judge skew from where the median sits and how long the whiskers are, but to compare the mean and median you need those numbers separately.