Mathwords logoMathwords

Boxplot — Definition, Five-Number Summary & Examples

Boxplot
Modified Boxplot

A data display that shows the five-number summary. The whiskers, stretching outward from the first quartile and third quartile as shown below, are no longer than 1.5 times the interquartile range (IQR). Outliers beyond that are marked separately.

Note: Beginners are sometimes taught to draw box-and-whisker plots, which do not show outliers. Modified boxplot is a name sometimes used for boxplots to distinguish them from box-and-whisker plots.

 

Modified boxplot showing minimum, 1st quartile, median, 3rd quartile, largest non-outlier, and a separate outlier point.

 

See also

Median, stemplot

Key Formula

Lower fence=Q11.5×IQRUpper fence=Q3+1.5×IQR\text{Lower fence} = Q_1 - 1.5 \times \text{IQR} \qquad \text{Upper fence} = Q_3 + 1.5 \times \text{IQR}
Where:
  • Q1Q_1 = First quartile (25th percentile) of the data set
  • Q3Q_3 = Third quartile (75th percentile) of the data set
  • IQR\text{IQR} = Interquartile range, equal to Q₃ − Q₁
  • 1.5×IQR1.5 \times \text{IQR} = The maximum whisker length from each quartile; any data point beyond this distance is classified as an outlier

Worked Example

Problem: Draw a boxplot for the data set: 2, 5, 7, 8, 10, 12, 13, 15, 18, 35. Identify any outliers.
Step 1: Order the data (already sorted) and find the median. With 10 values, the median is the average of the 5th and 6th values.
Median=10+122=11\text{Median} = \frac{10 + 12}{2} = 11
Step 2: Find Q₁ (median of the lower half: 2, 5, 7, 8, 10) and Q₃ (median of the upper half: 12, 13, 15, 18, 35).
Q1=7,Q3=15Q_1 = 7, \quad Q_3 = 15
Step 3: Compute the interquartile range.
IQR=Q3Q1=157=8\text{IQR} = Q_3 - Q_1 = 15 - 7 = 8
Step 4: Calculate the fences to determine where the whiskers end and where outliers begin.
Lower fence=71.5(8)=5Upper fence=15+1.5(8)=27\text{Lower fence} = 7 - 1.5(8) = -5 \qquad \text{Upper fence} = 15 + 1.5(8) = 27
Step 5: Any data point below −5 or above 27 is an outlier. The value 35 exceeds 27, so it is an outlier. The lower whisker extends to the minimum data value within the fences (2), and the upper whisker extends to the largest non-outlier value (18). The value 35 is plotted as an individual point.
Answer: The boxplot has: lower whisker at 2, Q₁ = 7, median = 11, Q₃ = 15, upper whisker at 18, and one outlier at 35.

Another Example

This example shows a data set with no outliers, so the whiskers simply reach the minimum and maximum values — illustrating that outliers are not always present.

Problem: Construct a boxplot for: 20, 22, 24, 25, 26, 28, 30, 32, 34. Are there any outliers?
Step 1: The data has 9 values. The median is the 5th value.
Median=26\text{Median} = 26
Step 2: Lower half is 20, 22, 24, 25. Upper half is 28, 30, 32, 34. Find Q₁ and Q₃ as the medians of these halves.
Q1=22+242=23,Q3=30+322=31Q_1 = \frac{22 + 24}{2} = 23, \quad Q_3 = \frac{30 + 32}{2} = 31
Step 3: Compute the IQR and the fences.
IQR=3123=8Lower fence=2312=11Upper fence=31+12=43\text{IQR} = 31 - 23 = 8 \qquad \text{Lower fence} = 23 - 12 = 11 \qquad \text{Upper fence} = 31 + 12 = 43
Step 4: All data values fall between 11 and 43, so there are no outliers. The whiskers extend to the actual minimum (20) and maximum (34).
Answer: The boxplot has: lower whisker at 20, Q₁ = 23, median = 26, Q₃ = 31, upper whisker at 34, with no outliers.

Frequently Asked Questions

What is the difference between a boxplot and a box-and-whisker plot?
A basic box-and-whisker plot always extends its whiskers to the minimum and maximum data values, regardless of how extreme they are. A boxplot (sometimes called a modified boxplot) caps its whiskers at 1.5 × IQR from the quartiles and marks any values beyond that as individual outlier points. In most statistics courses and software, 'boxplot' refers to the version that identifies outliers.
How do you read a boxplot?
The left (or bottom) edge of the box is Q₁, the line inside the box is the median, and the right (or top) edge is Q₃. The width of the box represents the IQR, which contains the middle 50% of the data. Whiskers extend to the most extreme non-outlier values, and any dots beyond the whiskers are outliers.
When should you use a boxplot instead of a histogram?
Boxplots are especially useful when you want to compare the spread and center of two or more groups side by side. They also make outliers immediately visible. Histograms are better for seeing the detailed shape of a single distribution, such as whether it is bimodal. Use a boxplot for quick comparison and outlier detection; use a histogram for a fuller picture of distribution shape.

Boxplot (Modified Boxplot) vs. Box-and-Whisker Plot

Boxplot (Modified Boxplot)Box-and-Whisker Plot
Whisker lengthCapped at 1.5 × IQR from Q₁ and Q₃Always extends to the minimum and maximum data values
Outlier displayOutliers plotted as individual points beyond the whiskersNo outlier identification; extreme values are included in whiskers
Key formulaFences at Q₁ − 1.5·IQR and Q₃ + 1.5·IQRNo fence calculation needed
Common usageStandard in AP Statistics, college courses, and statistical softwareOften taught as an introduction in middle school or pre-statistics courses

Why It Matters

Boxplots appear throughout AP Statistics and introductory college statistics courses whenever you need to compare distributions or identify outliers quickly. Many standardized tests present boxplots and ask you to compare medians, spreads, or skewness across groups. Understanding how fences and outliers work is also essential for data cleaning in real-world applications like science experiments and business analytics.

Common Mistakes

Mistake: Extending the whiskers to the fence values (Q₁ − 1.5·IQR and Q₃ + 1.5·IQR) instead of to the most extreme actual data point within those fences.
Correction: The fences are boundaries, not data points. The whisker must end at a real data value. Find the smallest data value ≥ lower fence and the largest data value ≤ upper fence, and draw the whiskers to those values.
Mistake: Confusing the median with the mean when reading a boxplot.
Correction: The line inside the box always represents the median (middle value), not the mean. Boxplots do not display the mean. If the median line is not centered in the box, the data is skewed.

Related Terms