How to read and make a stemplot (stem-and-leaf)

By Jude Wallis · Updated

A stemplot splits each value into a stem (the leading digits) and a leaf (the final digit), then lists the ordered leaves beside their stem. Read it like a sideways histogram whose bars are made of digits: the shape shows in the row lengths, and every original value is still there.

AP Statistics: Unit 1 (topics 1.5 Graphical Representations for One Quantitative Variable, 1.9 Comparisons of the Distributions for One Quantitative Variable). Stemplots are Unit 1 topic 1.5 in the Fall 2026 course, where the CED defines the stem as the first digit or digits and the leaf as the digit that follows and requires both to be ordered smallest to largest; back-to-back stem-and-leaf plots appear in topic 1.9 as a display for comparing distributions.

How a stemplot splits each value

A stemplot, also called a stem-and-leaf plot, cuts every data value in two. The AP course puts it plainly: the stem is the first digit or digits, and the leaf is usually the single digit that follows. For two-digit data the stem is the tens digit and the leaf is the ones digit, so 47 becomes a stem of 4 and a leaf of 7.

Every value sharing a stem sits on one row, with the leaves listed side by side. Both stems and leaves are ordered from smallest to largest, so each row reads left to right in increasing order and the rows run top to bottom in increasing order. That ordering is what makes the plot a sorted list as well as a picture.

Repeated values become repeated leaves. If two swimmers both had a heart rate of 71, the 7 row shows 1 1, because a stemplot displays every individual value rather than a count.

The key is not optional

Every stemplot needs a key: one line showing how to reassemble a single value. Without it the plot is ambiguous, because a row reading 7 | 1 could mean 71, 7.1, or 710.

Write the key as one stem, the divider, one leaf, and the value it represents, with units. For example, 7 | 1 represents 71 beats per minute. Put it directly under the plot, and label the plot with the variable it shows.

The key also records what you did to the data before plotting. If you rounded 71.4 down to 71, or truncated it, the key is the only place a reader can find that out, because the digits you dropped are not on the page.

Building one from raw values

Five steps take you from an unsorted list to a finished plot.

  1. Pick the place value for the stem. For values from 15 to 63, the tens digit gives stems 1 through 6, which is a workable number of rows. Aim for roughly 5 to 12 rows.
  2. Write the stems in a column, smallest at the top, with a vertical line to their right. Include every stem in the range, even ones that end up with no leaves.
  3. Deal each leaf onto its row, working through the raw list once in whatever order it arrives.
  4. Rewrite each row in order, smallest leaf to largest. This second pass is what turns the plot into a sorted list.
  5. Add the key and a label naming the variable and its units.

Step 2 is the one people skip. A stem with no leaves is what makes a gap visible, and deleting the empty row hides the gap by pulling the data together.

Reading shape, center, and spread off the plot

Here are the minutes 12 students spent on one homework set.

StemLeaves
15 8
20 2 3 5 7
31 4 6
42
5
63

Key: 1 | 5 represents 15 minutes.

Shape. Turn the plot 90 degrees and the row lengths are the bars of a histogram. The rows run 2, 5, 3, 1, 0, 1, so there is a single peak in the 20s and a tail stretching toward the larger values, which makes the distribution skewed to the right. The empty 5 row is a gap, and 63 sits by itself beyond it.

Center. The leaves are already sorted, so counting to the middle is the whole job. With n=12n = 12 the median is the average of the 6th and 7th values. Counting leaves in order gives 15, 18, 20, 22, 23, 25, 27, so the 6th is 25 and the 7th is 27, and the median is (25+27)/2=26(25 + 27)/2 = 26 minutes.

Spread. The smallest value is the first leaf on the top row, 15, and the largest is the last leaf on the bottom row, 63, so the range is 6315=4863 - 15 = 48 minutes. Using the median-excluded (TI-84) rule this site follows, the first quartile Q1Q_1 is the median of the six values below the median, (20+22)/2=21(20 + 22)/2 = 21, and the third quartile Q3Q_3 is the median of the six above, (34+36)/2=35(34 + 36)/2 = 35, so the IQR is 14 minutes.

Unusual features. The 1.5 IQR rule puts the upper fence at 35+1.5(14)=5635 + 1.5(14) = 56 minutes, so 63 is an outlier. Naming shape, center, spread, and unusual features in context is the full job; how to describe a distribution has the checklist.

Splitting stems when the rows get too long

When nearly all the data shares one or two stems, the plot compresses into a couple of long rows and the shape vanishes. Splitting stems fixes that: write each stem twice, putting leaves 0 through 4 on the first copy and leaves 5 through 9 on the second.

Twelve quiz scores of 61, 63, 64, 66, 67, 68, 70, 71, 73, 74, 75, and 78 fill only two rows unsplit. Split, they fill four.

StemLeaves
61 3 4
66 7 8
70 1 3 4
75 8

Key: 6 | 1 represents 61 points. Each row now covers 5 points instead of 10, which is the same move as narrowing the bins of a histogram. You can also split a stem five ways (leaves 0 and 1, then 2 and 3, and so on) when the data is tighter still.

Splitting has a limit. Too many rows and the plot becomes a thin scatter of single leaves, which hides the shape just as effectively as too few rows did. Somewhere between 5 and 12 rows is usually readable.

Back-to-back stemplots compare two groups

To compare two groups on the same variable, share one column of stems and hang each group's leaves off one side. The AP course lists back-to-back stem-and-leaf plots as a display for comparing center, variability, shape, outliers, clusters, or gaps between distributions.

The left group's leaves are written right to left, so both sides increase as you move away from the stems. Here are the minutes six students in each of two classes took to finish a lab.

Blue class leavesStemGold class leaves
8 5 236 9
7 4 142 5 8
53

Key: reading outward from the stem, 2 | 3 | 6 represents 32 minutes for the Blue class and 36 minutes for the Gold class.

Read it by weight. The Blue leaves sit higher in the plot and the Gold leaves reach a row further down, so the Gold class took longer overall. Both sides cover about the same width, so the two groups vary by similar amounts. The second worked example below attaches numbers to that comparison.

Shared stems only work when both groups fall in roughly the same range, since a stem far from one group's values leaves that side of the row empty. For three or more groups, use side-by-side boxplots or histograms instead.

What a stemplot keeps that a histogram throws away

The tradeoff is simple. A histogram tells you how many values landed in each bin. A stemplot tells you which values they were.

From the homework plot above you can read the exact median (26 minutes), the exact maximum (63 minutes), and every individual value. A histogram of the same data with bins of width 10 would show bars of height 2, 5, 3, 1, 0, and 1, and those six counts are everything it has: the 15, the 26, and the 63 are not on the page anywhere. Once the data is binned the original numbers are gone, so the median and the mean can no longer be computed exactly from the picture.

What you pay for that:

  • Size. Every value needs its own digit, so stemplots stay readable for roughly 15 to 50 values. A histogram handles thousands.
  • Bin width. Stems are place values, so the row width follows the place value you pick and how far you split the stems: 10 for a tens-digit stem, 5 or 2 once you split it, 1 for a ones-digit stem. A histogram can use any width you like, including widths no place value produces.
  • Precision. Long or decimal values have to be rounded or truncated to one leaf digit, and the key has to disclose it.

Use a stemplot for a small data set where the individual values matter and the sorted list is worth having. Use a histogram when the set is large or the exact values do not matter. The comparison of dotplots, histograms, and stemplots lines up all three side by side.

Building a stemplot from 15 resting heart rates

A coach records the resting heart rate, in beats per minute, of 15 swimmers: 71, 62, 88, 55, 74, 67, 79, 60, 73, 82, 65, 71, 58, 76, 68. Build a stemplot, then read the median and the range off it.

  1. Choose the stems. The values run from 55 to 88, so the tens digits 5, 6, 7, and 8 give four rows, and the leaf is the ones digit.

  2. Deal each value onto its row in the order given. Row 5 collects the leaves 5 and 8 (from 55 and 58). Row 6 collects 2, 7, 0, 5, 8. Row 7 collects 1, 4, 9, 3, 1, 6. Row 8 collects 8 and 2.

  3. Order the leaves within each row: row 5 becomes 5 8, row 6 becomes 0 2 5 7 8, row 7 becomes 1 1 3 4 6 9, and row 8 becomes 2 8. Note the two 1 leaves in row 7, since 71 appears twice.

  4. Count the leaves as a check: 2+5+6+2=152 + 5 + 6 + 2 = 15, which matches the 15 recorded rates. Add the key: 5 | 5 represents 55 beats per minute.

  5. Find the median. With n=15n = 15 the median is the 8th value. Row 5 holds values 1 and 2, row 6 holds values 3 through 7, so the 8th value is the first leaf of row 7, which is 71 beats per minute.

  6. Find the range. The smallest value is the first leaf on the top row, 55, and the largest is the last leaf on the bottom row, 88. The range is 8855=3388 - 55 = 33 beats per minute.

  7. Read the shape while the plot is in front of you. Row counts of 2, 5, 6, and 2 give one peak, in the 70s, with no empty rows and no isolated leaf, so the distribution is roughly symmetric with no apparent outliers.

The rows are 5 with leaves 5 8, 6 with leaves 0 2 5 7 8, 7 with leaves 1 1 3 4 6 9, and 8 with leaves 2 8, under the key 5 | 5 represents 55 beats per minute. The median is 71 beats per minute and the range is 33 beats per minute. The distribution is unimodal and roughly symmetric.

Comparing two classes with a back-to-back stemplot

In the back-to-back stemplot above, the Blue class finish times are 32, 35, 38, 41, 44, and 47 minutes, and the Gold class times are 36, 39, 42, 45, 48, and 53 minutes. Compare the two distributions.

  1. Both groups have n=6n = 6, an even count, so each median is the average of the 3rd and 4th ordered values.

  2. Blue class median: the ordered times are 32, 35, 38, 41, 44, 47, so the median is (38+41)/2=39.5(38 + 41)/2 = 39.5 minutes.

  3. Gold class median: the ordered times are 36, 39, 42, 45, 48, 53, so the median is (42+45)/2=43.5(42 + 45)/2 = 43.5 minutes.

  4. Blue class range: 4732=1547 - 32 = 15 minutes. Gold class range: 5336=1753 - 36 = 17 minutes.

  5. Compare centers: the Gold median is 43.539.5=443.5 - 39.5 = 4 minutes higher, so the Gold class typically took longer to finish the lab.

  6. Compare variability: the ranges of 15 and 17 minutes are close, so the two classes were about equally variable.

  7. Check for unusual features. Neither side shows an empty row or a leaf standing alone. With only six values per group, stop short of naming a shape and say instead that neither display shows a gap or an outlier.

The Gold class typically took longer (median 43.5 minutes) than the Blue class (median 39.5 minutes), a difference of 4 minutes. The two groups were about equally variable, with ranges of 17 and 15 minutes, and neither display shows a gap or an outlier.

Frequently asked questions

What is the difference between a stem and a leaf?

The stem is the leading digit or digits shared by every value on a row, and the leaf is the final digit, one leaf per data value. For 47 the stem is 4 and the leaf is 7. A row reading 4 with leaves 1, 4, and 7 holds the three values 41, 44, and 47.

Do I have to include a stem that has no leaves?

Yes. The empty row is what makes a gap visible. Delete it and the values on either side appear to sit next to each other, which changes how a reader describes the shape and can hide an outlier.

How do you make a stemplot for decimals or three-digit numbers?

Pick the place value that gives a workable number of rows and say so in the key. For values like 3.7 and 4.2, use the ones digit as the stem and the tenths as the leaf, with the key 3 | 7 represents 3.7 seconds. For three-digit values, either use the first two digits as the stem or round to the nearest ten first, and let the key record what you did.

Can you find the mean from a stemplot?

Yes, because every original value is still on the page. Read the values off the rows, add them, and divide by nn. You cannot do that from a histogram, where only the bin counts survive, which is the main advantage a stemplot has over one.