A stem-and-leaf plot is a way of displaying a small dataset that shows its shape like a histogram while keeping every original value visible. Each number is split into a stem (the leading digit or digits) and a leaf (the final digit). Because no information is lost, the median, mode, range, and quartiles can all be read straight off the display, which is why the plot remains a staple of school and introductory statistics courses and a quick tool for exploring small samples by hand.
- How to build a stem-and-leaf plot and write its key
- How to read the median, mode, and range from the plot
- How a back-to-back plot compares two groups
- When to split stems, and when this display is the wrong choice
Building the Plot
Problem: A teacher records the test scores of 15 students in Class A: 43, 47, 52, 55, 58, 61, 62, 64, 64, 67, 71, 73, 75, 78, 84.
Step 1 β Choose stems and leaves. Scores are two-digit numbers, so the tens digit is the stem and the units digit is the leaf. The stems run from 4 to 8.
Step 2 β Write the stems in a column in ascending order, including any stem with no data so gaps stay visible.
Step 3 β Attach each leaf beside its stem, then rewrite each row with the leaves in increasing order.
| Stem | Leaves |
|---|---|
| 4 | 3 7 |
| 5 | 2 5 8 |
| 6 | 1 2 4 4 7 |
| 7 | 1 3 5 8 |
| 8 | 4 |
Step 4 β Add a key. Without one, a reader cannot tell whether "6 | 4" means 64, 6.4, or 640. Here the key is 6 | 4 = 64 points. Always include it.
Reading Statistics From the Plot
Rotate the plot mentally a quarter turn and the rows become the bars of a histogram with class width 10. The rows with the most leaves mark the mode class, here the 60s with five leaves. But unlike a histogram, the exact values survive:
- Range: the largest value minus the smallest, 84 β 43 = 41.
- Mode: the value whose leaf repeats within a row. The 6 row contains "4 4," so the mode is 64.
- Median: with 15 values, the median is the 8th. Counting leaves from the top gives 2 in the 40s, 3 in the 50s (5 so far), and then 61, 62, 64. The 8th value is 64.
- Quartiles: using the median-of-halves method described in percentiles and quartiles, the lower half (43 to 62) has median 55 and the upper half (67 to 84) has median 73, so Q1 = 55, Q3 = 73, and the IQR is 18.
- Mean: adding the leaves is still needed for this, giving 954 Γ· 15 = 63.6, close to the median, which fits the roughly symmetric shape.
Shape is read the way it is for any histogram. This plot rises to a peak in the 60s and tapers on both sides, with the long tails in the 40s and 80s roughly balanced. A cluster of leaves far from the rest, or a stem with nothing on it between two occupied stems, flags a gap or possible outlier, useful as a first pass before applying the fence rule in outlier detection.
Back-to-Back Plots for Comparing Two Groups
Two groups can share a single column of stems, with one group's leaves running to the left and the other's to the right. Class B's 15 scores are 51, 56, 59, 63, 65, 66, 68, 69, 70, 72, 74, 76, 77, 81, 88. Putting them beside Class A gives:
| Class A leaves | Stem | Class B leaves |
|---|---|---|
| 7 3 | 4 | |
| 8 5 2 | 5 | 1 6 9 |
| 7 4 4 2 1 | 6 | 3 5 6 8 9 |
| 8 5 3 1 | 7 | 0 2 4 6 7 |
| 4 | 8 | 1 8 |
Key: 6 | 4 on the left means 64 in Class A; 6 | 3 on the right means 63 in Class B. On the left, leaves are written outward from the stem in decreasing order so each row still reads in order from the middle.
The comparison is immediate. Class B's scores sit higher: its median is the 8th value, 69, against 64 for Class A, and its mean is exactly 69.0 against 63.6. Class B is also more tightly bunched. Its range is 88 β 51 = 37 versus 41, its IQR is 13 (Q1 = 63, Q3 = 76) versus 18, and its sample standard deviation is about 9.7 against 11.5. Class A has two low scores in the 40s that Class B has no counterpart to. Class B has no repeated score, so it has no mode, while Class A's mode is 64. Everything here comes from one small picture, without any calculation beyond counting.
Splitting Stems for Finer Detail
When the data crowd onto only a few stems, the plot looks like a few long rows and hides the shape. Splitting stems gives each stem two rows: one for leaves 0 to 4 and one for leaves 5 to 9. Class B with split stems becomes:
| Stem | Leaves |
|---|---|
| 5 (0β4) | 1 |
| 5 (5β9) | 6 9 |
| 6 (0β4) | 3 |
| 6 (5β9) | 5 6 8 9 |
| 7 (0β4) | 0 2 4 |
| 7 (5β9) | 6 7 |
| 8 (0β4) | 1 |
| 8 (5β9) | 8 |
Now the row widths correspond to classes of width 5, and the plot reveals that the scores concentrate in the upper 60s and lower 70s, a detail the unsplit version smoothed over. As with histogram bin widths, no split is always right, and it is worth trying both.
Decimals and Larger Numbers
The same method works whenever the data have a natural leading and trailing part. Heights such as 1.62, 1.68, and 1.75 metres can use the first two digits as the stem and the last as the leaf, with a key like "1.6 | 2 = 1.62 m." For three-digit values such as 142, the stem is 14 and the leaf is 2. Long values are usually truncated or rounded to a single leaf digit first, and the key states which was done.
When Not to Use One
The plot is a tool for small datasets, roughly 15 to 100 values. Beyond that, rows become unwieldy and a histogram or box plot is clearer. It is also awkward for data with a huge range, since dozens of stems make the display sprawl, and for data with no natural digit structure. On the other hand it beats a histogram for small samples, because it preserves every value and requires no decisions about class boundaries.
Real-World Uses
Classroom analysis: teachers and students use stem-and-leaf plots to see grade distributions instantly and compare classes without software.
Quick data exploration: a plot drawn by hand on a small sample is a fast first look at shape, spread, and outliers, in the spirit of exploratory data analysis.
Small experiments: in fieldwork or lab settings with a few dozen measurements, the plot doubles as a recorded dataset and a picture of it.
Common Mistakes
Forgetting the key. Without it, the plot is ambiguous. Every stem-and-leaf plot needs one.
Leaving leaves unordered. Unsorted leaves make the median and quartiles hard to find, and they defeat the plot's main advantage.
Uneven spacing of leaves. Leaves should be evenly spaced in a column so row length reflects the number of values, as a bar's length does in a histogram. Crowding some rows makes them look shorter than they are.
Skipping empty stems. Omitting a stem with no data hides a gap in the distribution. Include it with an empty row.
What is the difference between a stem-and-leaf plot and a histogram?
How do I choose the stems?
Can the plot show negative numbers?
How does it relate to the five-number summary?
Share this article
Written by
Statistics Fundamentals Editorial Team
Written and reviewed by our team of statistics educators. Content is aligned with GCSE, A-Level, AP Statistics, and undergraduate curricula.
About Statistics Fundamentals β