
When you’re staring at a long column of numbers, spotting patterns can feel impossible. A box and whisker plot — also called a box plot — solves that problem by transforming raw data into a compact visual summary that reveals the story hidden inside your dataset.
Developed by statistician John Tukey in the 1970s, this chart type displays five key values at once: the minimum, first quartile, median, third quartile, and maximum. In a single glance, you can see how your data is distributed, where most values cluster, and whether any outliers are skewing the picture.
What Is a Box and Whisker Plot?
A box and whisker plot is a standardized way of displaying the distribution of data based on five summary statistics. The “box” represents the middle 50% of your data, while the “whiskers” are lines that extend outward to show the spread of the remaining values. Together, they give you an honest, high-level picture of your data’s center, spread, and symmetry — making this chart especially powerful when comparing multiple datasets side by side.
Key Components
A box and whisker plot is built from five core values, collectively known as the five-number summary:
- Minimum: The smallest value in your dataset that isn’t considered an outlier. This is where the left whisker ends.
- First Quartile (Q1): The median of the lower half of your data. Twenty-five percent of all values fall at or below this point. It marks the left edge of the box.
- Median (Q2): The true middle value of your dataset — half the values sit above it, and half sit below. It appears as a vertical line drawn inside the box.
- Third Quartile (Q3): The median of the upper half of your data. Seventy-five percent of all values fall at or below this point. It marks the right edge of the box.
- Maximum: The largest value in your dataset that isn’t considered an outlier. This is where the right whisker ends.
The Box
The rectangular box stretches from Q1 to Q3, spanning a range called the interquartile range (IQR), calculated as Q3 − Q1. The IQR represents the middle 50% of your data and is one of the most reliable measures of spread because it isn’t thrown off by extreme values. A narrow box means your data is tightly packed around the median; a wide box signals greater variability.
The Whiskers
The whiskers extend from each end of the box out toward the minimum and maximum values. In the most common method, a whisker stretches to the furthest data point that still falls within 1.5 times the IQR from the edge of the box. Any values beyond that boundary are considered outliers and are plotted individually as dots or asterisks rather than being included in the whisker.
Reading the Plot at a Glance
Once you know what to look for, a box and whisker plot communicates a lot very quickly. If the median line sits close to the center of the box, your data is roughly symmetric. If it’s pushed toward one side, the distribution is skewed in the opposite direction. Long whiskers suggest the data has a wide spread, while a long box with a short whisker on one end is a clear sign that your values are bunched up on that side. Outlier dots immediately draw attention to unusual values that may warrant a closer look.
When to Use a Box Plot
Comparing Multiple Groups
Box plots are arguably most powerful when placed side by side to compare two or more groups. Because every plot condenses an entire distribution into a clean, consistent shape, your eye can instantly scan across groups and spot differences in center, spread, and symmetry. A researcher comparing exam scores across three classrooms, for example, can line up three box plots and immediately see which group performed most consistently and which had the widest range of results. Bar charts can tell you which group had the higher average, but they won’t show you whether one group had far more variability than another.
Summarizing Large Datasets
When you’re working with hundreds or thousands of data points, plotting every individual value quickly becomes cluttered and hard to read. A box plot compresses that volume into five key numbers without losing the essential shape of the data. This makes it a practical choice any time you need a clean summary of a large dataset without sacrificing statistical depth.
Identifying Outliers
Because outliers are plotted explicitly as individual points beyond the whiskers, a box plot makes them impossible to overlook. This is especially useful in fields like finance, medicine, and quality control, where a single anomalous value can carry significant meaning. A line chart might bury an outlier in the noise; a box plot puts it on display.
Assessing Distribution Shape
Box plots are an efficient way to check whether data is symmetric, left-skewed, or right-skewed. If you’re preparing data for statistical analysis — particularly methods that assume a normal distribution — a quick box plot can flag potential problems before you go any further.
When a Box Plot May Not Be the Best Choice
Box plots do have limitations. Because they summarize data rather than display it in full, they can obscure features that matter. A box plot won’t reveal whether your data has two distinct clusters, for instance — both a bimodal distribution and a normal distribution can produce identical-looking box plots. For smaller datasets where every data point tells a story, a dot plot or strip chart may give a clearer picture. And for audiences unfamiliar with statistics, a simpler chart like a bar graph may communicate your message more effectively without requiring explanation.
Step-by-Step: How to Make a Box and Whisker Plot
Our Example Dataset
Imagine you recorded the following test scores for a class of 12 students:
52, 61, 67, 70, 72, 74, 75, 78, 81, 85, 90, 97
Step 1: Sort Your Data in Ascending Order
Always start by arranging your values from smallest to largest. This makes every subsequent step straightforward. Our dataset is already sorted:
52, 61, 67, 70, 72, 74, 75, 78, 81, 85, 90, 97
Step 2: Find the Median (Q2)
The median is the middle value of your dataset. With 12 values, there is no single middle number, so you take the average of the 6th and 7th values.
- 6th value: 74
- 7th value: 75
- Median (Q2) = (74 + 75) ÷ 2 = 74.5
Step 3: Find the First Quartile (Q1)
Q1 is the median of the lower half of your data — every value below the median. Our lower half is:
52, 61, 67, 70, 72, 74
The median of these six values is the average of the 3rd and 4th:
- 3rd value: 67
- 4th value: 70
- Q1 = (67 + 70) ÷ 2 = 68.5
Step 4: Find the Third Quartile (Q3)
Q3 is the median of the upper half of your data — every value above the median. Our upper half is:
75, 78, 81, 85, 90, 97
The median of these six values is the average of the 3rd and 4th:
- 3rd value: 81
- 4th value: 85
- Q3 = (81 + 85) ÷ 2 = 83
Step 5: Calculate the Interquartile Range (IQR)
The IQR measures the spread of the middle 50% of your data.
IQR = Q3 − Q1 = 83 − 68.5 = 14.5
Step 6: Determine the Whisker Boundaries and Identify Outliers
To find where the whiskers end, calculate the outlier fences using the standard 1.5 × IQR rule:
- Lower fence: Q1 − (1.5 × IQR) = 68.5 − 21.75 = 46.75
- Upper fence: Q3 + (1.5 × IQR) = 83 + 21.75 = 104.75
Any data point below 46.75 or above 104.75 is an outlier and gets plotted separately. In our dataset, all values fall within these boundaries, so there are no outliers.
- Minimum (whisker start): 52
- Maximum (whisker end): 97
Step 7: Record Your Five-Number Summary
You now have everything you need to draw the plot:
| Statistic | Value |
|---|---|
| Minimum | 52 |
| Q1 | 68.5 |
| Median (Q2) | 74.5 |
| Q3 | 83 |
| Maximum | 97 |
Step 8: Draw the Plot
- Draw a horizontal number line that comfortably spans your data range — in this case, from roughly 45 to 100.
- Draw a vertical line at Q1 (68.5), the median (74.5), and Q3 (83).
- Connect the Q1 and Q3 lines to form a rectangle. This is your box.
- Draw a horizontal line from Q1 left to the minimum (52). Draw another from Q3 right to the maximum (97). These are your whiskers.
- If any outliers existed, you would plot them as individual dots beyond the appropriate whisker.
Your box and whisker plot is complete.
What the Finished Plot Tells Us
With the chart in hand, a few things stand out right away. The median line sits slightly left of center inside the box, suggesting a very mild right skew — meaning a small number of higher scores pull the distribution upward. The right whisker is noticeably longer than the left, confirming that scores are more spread out at the top end of the range. Overall, though, the distribution is fairly balanced, with most students clustered in the 68.5 to 83 range.

How to Make a Box Plot Using Tools
Excel has included a native box and whisker chart type since Excel 2016, making this straightforward. Enter your data in a column, select it, then go to Insert → Charts → Statistical Chart → Box and Whisker. Excel automatically calculates all five values and draws the plot. You can right-click the chart to access formatting options, add axis labels, and adjust how outliers are displayed. For older versions of Excel that lack the built-in chart type, you can replicate a box plot by building a stacked bar chart and manually formatting it — though the native option is far simpler.
Google Sheets does not have a dedicated box plot option, but you can produce a functionally equivalent chart using a candlestick chart. First, calculate your five-number summary using Sheets’ built-in functions: =MIN(), =QUARTILE(range, 1), =MEDIAN(), =QUARTILE(range, 3), and =MAX(). Arrange those values in a row, then go to Insert → Chart and change the chart type to Candlestick. The result looks nearly identical to a standard box plot and communicates the same information.
Matplotlib is the most widely used Python plotting library and includes a dedicated boxplot() function. A minimal example:
python
import matplotlib.pyplot as plt
data = [52, 61, 67, 70, 72, 74, 75, 78, 81, 85, 90, 97]
plt.boxplot(data)
plt.title("Test Scores")
plt.ylabel("Score")
plt.show()
Matplotlib handles outlier detection, whisker calculation, and rendering automatically using the standard 1.5 × IQR rule.
Seaborn builds on Matplotlib and offers a higher-level interface for statistical graphics, integrating closely with Pandas DataFrames. It requires slightly less setup than raw Matplotlib and produces more polished results by default: Analytics Vidhya
python
import seaborn as sns
import matplotlib.pyplot as plt
data = [52, 61, 67, 70, 72, 74, 75, 78, 81, 85, 90, 97]
sns.boxplot(data=data)
plt.title("Test Scores")
plt.show()
Seaborn becomes especially valuable when comparing multiple groups — you can pass a DataFrame and map columns to x and y axes to generate side-by-side box plots with minimal code.
Plotly is set up to work natively with DataFrames and produces interactive charts — hover over any part of the plot to see exact values, zoom in on a region, or toggle data series on and off. This makes it a strong choice for dashboards and presentations: Sharp Sight
python
import plotly.express as px
data = [52, 61, 67, 70, 72, 74, 75, 78, 81, 85, 90, 97]
fig = px.box(y=data, title="Test Scores")
fig.show()
R has a built-in boxplot() function that requires no additional packages:
r
scores <- c(52, 61, 67, 70, 72, 74, 75, 78, 81, 85, 90, 97)
boxplot(scores, main = "Test Scores", ylab = "Score", col = "lightblue")
Base R box plots are quick and clean, well suited for exploratory analysis when you just need a fast look at your data’s distribution.
For publication-quality visuals, ggplot2 is the preferred option in R. The geom_boxplot() function is used to build the chart, with options for customizing outlier color, shape, and size, and adding notches to compare group medians. STHDA
r
library(ggplot2)
scores <- data.frame(value = c(52, 61, 67, 70, 72, 74, 75, 78, 81, 85, 90, 97))
ggplot(scores, aes(x = "", y = value)) +
geom_boxplot(fill = "steelblue") +
labs(title = "Test Scores", y = "Score", x = "") +
theme_minimal()
ggplot2’s layered syntax makes it easy to extend the chart — add individual data points, overlay a mean marker, or facet by group — all by adding extra lines to the same code block.
Which Tool Should You Use?
The right choice depends on your context. Excel and Google Sheets are ideal if you’re working with a small dataset and don’t code. Python with Matplotlib or Seaborn is the go-to for data scientists who want reproducible, scriptable analysis. Plotly is the best pick when you need interactivity or are embedding charts in a web application. R with ggplot2 is the standard in academic research and statistics, where fine-grained control over chart appearance matters.