Stem-and-Leaf Plots
Discounts, tax, tips, profit margins
A stem-and-leaf plot (also called a stemplot) is a way to organize numerical data so you can see every individual value and the overall shape of the distribution at the same time. It works best for small to medium datasets β roughly 10 to 50 values β where you want more detail than a histogram provides but still need a quick visual summary.
What Is a Stem-and-Leaf Plot?
In a stem-and-leaf plot, each data value is split into two parts:
- Stem β the leading digit(s). For two-digit numbers, the stem is the tens digit. For three-digit numbers, the stem is usually the hundreds digit (or the hundreds and tens digits, depending on the leaf unit).
- Leaf β the last digit. Each leaf represents one data point.
For example, the number 74 has a stem of 7 and a leaf of 4. The number 85 has a stem of 8 and a leaf of 5.
All the leaves for a given stem are written in a single row, sorted from smallest to largest. The result looks like a sideways histogram β but with real data values preserved.
Key rule: Always include a key (also called a legend) that explains the leaf unit. For example: β7 | 4 means 74.β
How to Build a Stem-and-Leaf Plot
Follow these steps to create a stem-and-leaf plot from raw data:
- Sort the data from smallest to largest.
- Identify the stems β list every stem value from the minimum to the maximum, even if a stem has no leaves.
- Write the leaves next to the correct stem, in order from smallest to largest.
- Add a key so the reader knows how to interpret the values.
Example 1: Test Scores
A class of 15 students received these test scores:
Step 1: Sort the data.
Step 2: Identify the stems. The scores range from 68 to 95, so the stems are 6, 7, 8, and 9.
Step 3: Write the leaves.
| Stem | Leaf |
|---|---|
| 6 | 8 9 |
| 7 | 1 2 4 7 9 |
| 8 | 1 3 5 6 8 |
| 9 | 1 2 5 |
Key: 7 | 2 means 72
Step 4: Read the plot. You can immediately see that the 70s and 80s are the most common score ranges (5 scores each), with fewer students in the 60s and 90s. The distribution is roughly symmetric.
Verification: Count the total leaves: . This matches the 15 students in the dataset.
Reading a Stem-and-Leaf Plot
Once a plot is built, you can extract key statistics directly:
- Minimum: The first leaf in the first row.
- Maximum: The last leaf in the last row.
- Count: Total number of leaves.
- Median: The middle value when leaves are read in order.
- Mode: The most frequently appearing leaf value (within its stem context).
- Shape: Look at the row lengths β longer rows indicate where data clusters.
Example 2: Employee Ages
A small company has 20 employees. Their ages are displayed in the following stem-and-leaf plot:
| Stem | Leaf |
|---|---|
| 2 | 1 3 5 7 8 |
| 3 | 0 2 2 4 6 8 9 |
| 4 | 1 3 5 7 |
| 5 | 0 2 4 6 |
Key: 3 | 2 means 32
Let us find the five-number summary.
Minimum: The first leaf under stem 2 is 1, so the minimum is 21.
Maximum: The last leaf under stem 5 is 6, so the maximum is 56.
Count: employees.
Median: With 20 values, the median is the average of the 10th and 11th values. Counting through the leaves in order:
- Stem 2 contains values 1 through 5 (positions 1-5)
- Stem 3 contains values 6 through 12 (positions 6-12)
The 10th value is the 5th leaf under stem 3: 38. The 11th value is the 6th leaf under stem 3: 38 β wait, let us recount. The leaves under stem 3 are 0, 2, 2, 4, 6, 8, 9.
- Position 6: 30
- Position 7: 32
- Position 8: 32
- Position 9: 34
- Position 10: 36
- Position 11: 38
- Position 12: 39
The 10th value is 36 and the 11th value is 38.
First Quartile (Q1): The median of the lower 10 values (positions 1-10). The middle of these is the average of positions 5 and 6: values 28 and 30.
Third Quartile (Q3): The median of the upper 10 values (positions 11-20). The middle is the average of positions 15 and 16: values 45 and 47.
Five-number summary: 21, 29, 37, 46, 56
Interquartile range:
The plot shows that the largest cluster of employees is in their 30s (7 employees), with the data spread fairly evenly across the other decades.
Back-to-Back Stem-and-Leaf Plots
A back-to-back stem-and-leaf plot places two datasets side by side, sharing the same stem column. One datasetβs leaves extend to the left, and the otherβs extend to the right. This makes it easy to compare two groups visually.
Example 3: Comparing Two Classes
Two classes took the same quiz (scored out of 50). Here are their results displayed back-to-back:
| Class A (left) | Stem | Class B (right) |
|---|---|---|
| 8 5 | 2 | 3 6 7 |
| 7 5 2 0 | 3 | 1 4 8 |
| 6 4 1 | 4 | 0 2 5 8 9 |
| 0 | 5 | 0 0 |
Key: For Class A, 5 | 2 means 25 (read right to left). For Class B, 2 | 3 means 23 (read left to right).
What this tells us:
- Class A has more scores in the 30s (4 students), and fewer high scores. The distribution clusters in the low-to-mid range.
- Class B has more scores in the 40s (5 students), suggesting the class performed better overall.
- Class Bβs median is higher than Class Aβs, which you can confirm by counting leaves and finding the middle values.
Back-to-back plots are especially useful for comparing test results, survey responses, or performance metrics between two groups.
Advantages and Limitations
| Feature | Stem-and-Leaf Plot | Histogram |
|---|---|---|
| Shows individual values | Yes β every data point is visible | No β only frequency counts |
| Shows distribution shape | Yes β row lengths form a shape | Yes β bar heights form a shape |
| Best dataset size | 10 to 50 values | Any size, especially large datasets |
| Precision | Exact values preserved | Values grouped into bins |
| Ease of finding median | Easy β count leaves directly | Requires additional calculation |
| Two-group comparison | Back-to-back plots | Side-by-side or overlapping histograms |
| Handles large datasets | Becomes cluttered above 50 values | Handles hundreds or thousands |
When to choose a stem-and-leaf plot: Use it when you have a small to medium dataset and want to preserve every individual value while still seeing the overall shape. It is ideal for classroom settings, quick analyses, and situations where you need to find the median, mode, or specific percentiles by hand.
When to choose a histogram: Use it for larger datasets where individual values are less important than the overall distribution pattern.
Real-World Application: Retail β Daily Transaction Counts
A store manager tracks the number of transactions per day over 15 business days to understand daily traffic patterns:
For three-digit numbers, we use the first two digits as the stem and the last digit as the leaf.
Step 1: Sort the data.
Step 2: Build the plot.
| Stem | Leaf |
|---|---|
| 11 | 9 |
| 12 | 4 7 8 |
| 13 | 3 4 7 8 |
| 14 | 1 3 5 8 |
| 15 | 1 2 6 |
Key: 13 | 4 means 134 transactions
Analysis:
- Minimum: 119 transactions. Maximum: 156 transactions. Range: .
- Median (8th value): 138 transactions.
- The store most commonly handles 130-149 transactions per day (8 out of 15 days).
- Only 1 day fell below 120, suggesting traffic is fairly consistent.
This information helps the manager plan staffing. Days with 150+ transactions (3 out of 15, or 20% of the time) may need extra cashiers.
Practice Problems
Test your understanding with these problems. Click to reveal each answer.
Problem 1: Build a stem-and-leaf plot for the following dataset of exam scores: 54, 67, 72, 78, 81, 83, 85, 91, 94, 72, 63, 88, 76. Include a key.
Sorted data: 54, 63, 67, 72, 72, 76, 78, 81, 83, 85, 88, 91, 94
| Stem | Leaf |
|---|---|
| 5 | 4 |
| 6 | 3 7 |
| 7 | 2 2 6 8 |
| 8 | 1 3 5 8 |
| 9 | 1 4 |
Key: 7 | 2 means 72
Total leaves: values.
Problem 2: Using the stem-and-leaf plot from Problem 1, find the median and the range.
With 13 values, the median is the 7th value.
Counting through: 54, 63, 67, 72, 72, 76, 78, 81, 83, 85, 88, 91, 94
Median = 78
Range
Problem 3: A stem-and-leaf plot is shown below. How many data values are in the set, and what is the mode?
| Stem | Leaf |
|---|---|
| 1 | 5 8 |
| 2 | 0 3 3 7 |
| 3 | 1 3 3 3 6 |
| 4 | 2 5 |
Key: 2 | 3 means 23
Count: values
Mode: 33 appears three times β more than any other value.
Answer: There are 13 data values, and the mode is 33.
Problem 4: Why would a stem-and-leaf plot be a poor choice for displaying the heights (in cm) of 200 adults? What would be a better alternative?
With 200 data values, a stem-and-leaf plot would be extremely long and cluttered. Each row could have dozens of leaves, making it difficult to read individual values or see the overall shape.
A better alternative: A histogram groups values into bins and handles large datasets cleanly. You would still see the distribution shape (likely a bell curve for adult heights) without the clutter of 200 individual leaf digits.
Problem 5: A back-to-back stem-and-leaf plot compares morning shift and evening shift customer counts at a cafe. The morning side has leaves 5, 3 under stem 4 and leaves 8, 6, 2 under stem 3. The evening side has leaves 1, 4, 7 under stem 4 and leaves 0, 5 under stem 3. Which shift tends to have more customers?
Morning values: 32, 36, 38, 43, 45 β Median (3rd value) = 38
Evening values: 30, 35, 41, 44, 47 β Median (3rd value) = 41
The evening shift tends to have more customers. Its median is higher (41 vs. 38), and it has more values in the 40s (3 values vs. 2 for morning).
Key Takeaways
- A stem-and-leaf plot splits each value into a stem (leading digits) and a leaf (last digit), preserving every data point while showing the distribution shape.
- Always sort leaves in ascending order within each row and include a key (e.g., β7 | 4 means 74β).
- Stem-and-leaf plots work best for datasets of roughly 10 to 50 values β for larger datasets, use a histogram instead.
- You can read the minimum, maximum, median, mode, and distribution shape directly from the plot by counting leaves.
- Back-to-back stem-and-leaf plots let you compare two groups side by side using a shared stem column.
- Always verify your total leaf count matches the number of data points in the original dataset.
Return to Statistics for more topics in this section.
Next Up in Statistics
All Statistics topicsLast updated: March 29, 2026