# Stem and Leaf Plot: How to Make and Read One

A stem plot (also written stemplot, or stem and leaf plot) is a quick way to display a small set of numbers so that the shape of the distribution and the individual values are both visible. You split each number into a stem, made of the leading digit or digits, and a leaf, made of the final digit. The stems run down a vertical line and the leaves sit in rows beside them.

## Quick Answer

- A stem plot splits each value into a stem (leading digits) and a leaf (last digit). For 23, the stem is 2 and the leaf is 3 [1].
- Stems go in a vertical column from smallest to largest, with a vertical line to their right, and leaves are written in increasing order next to their stem [1].
- It works best on small data sets, roughly under 50 values, because every value is kept and nothing is grouped away [1][2].
- The plot doubles as a sorted data list, so you can read the minimum, maximum, median and shape straight off it [2].
- A back to back stem plot shares one set of stems and puts two groups of leaves on the left and right, which is how you compare two samples [3].

## Before You Start

You need one column of numbers measured on an interval or ratio scale. Scores, weights, times, distances and counts all work. Categories do not, because there is no digit structure to split.

Decide how many digits the leaf should hold. The leaf is normally a single digit, so you pick a split point that leaves exactly one digit on the right [4]. For two-digit numbers the natural split is tens and ones. For 102, the stem is 10 and the leaf is 2 [3]. For 9.3, the stem is 9 and the leaf is 3 [1].

If your values have more digits than you need, round or truncate first. Rounding to two or three significant digits keeps the plot readable [5]. Truncating means dropping the rightmost digits instead of rounding them [4].

Sorting the data first is optional but makes the job easier and guarantees tidy rows [2]. If you would rather not sort, you can add leaves in the order you meet them and reorder each row at the end [4].

## Step by Step

1. Scan the data and find the smallest and largest values. This tells you which stems must appear.
2. Choose the split point so each leaf is one digit. Write down the rule, for example "stem is the tens digit, leaf is the ones digit."
3. Draw a vertical column of stems from smallest to largest. Include every stem in the range, even ones with no data, so gaps stay visible [5].
4. Draw a vertical line to the right of the stems.
5. Place each leaf next to its stem. One leaf per data value, so repeats appear as repeated digits [5].
6. Sort the leaves in each row from smallest to largest [1].
7. Add a key. A key such as "6 | 2 means 62" is what makes the plot readable to anyone else.

If a row gets too crowded, split the stem. Write each stem twice, once for leaves 0 through 4 and once for leaves 5 through 9 [5]. This doubles the number of rows and spreads the data out visually. The LibreTexts example does the same thing with fifths, where each row covers a five-unit band [6].

## Worked Example

The data are 20 exam scores from a statistics class, already sorted from lowest to highest.

| Score | | | | |
|---|---|---|---|---|
| 62 | 67 | 71 | 74 | 74 |
| 78 | 81 | 83 | 85 | 85 |
| 88 | 90 | 91 | 92 | 94 |
| 95 | 97 | 98 | 99 | 100 |

**Step 1. Sort the 20 scores.**

62, 67, 71, 74, 74, 78, 81, 83, 85, 85, 88, 90, 91, 92, 94, 95, 97, 98, 99, 100

**Step 2. Split each score into stem (tens) and leaf (ones).**

62 becomes stem 6, leaf 2. The score 100 becomes stem 10, leaf 0.

**Step 3. Group leaves by stem and sort each row.**

```
 6 | 2 7
 7 | 1 4 4 8
 8 | 1 3 5 5 8
 9 | 0 1 2 4 5 7 8 9
10 | 0
```

Key: 6 | 2 means 62.

**Step 4. Count the values.** n = 20.

**Step 5. Find the median position.** With n = 20 the count is even, so the median is the average of the 10th and 11th values, at position 10.5.

**Step 6. Read the median value.** The 10th and 11th values are 85 and 88, so the median is (85 + 88) / 2 = 86.5.

**Step 7. Read the extremes.** Minimum = 62, maximum = 100.

**Step 8. Compute the range.** 100 - 62 = 38.

The plot uses 5 stems. The row for stem 9 holds 8 of the 20 scores, so the data pile up in the high 80s and 90s and thin out below 80. That is a left-skewed (negatively skewed) shape, like the negatively skewed example in the LibreTexts discussion where values trail off toward the low end [3].

Here is the same construction in Python.

```python
import statistics
scores = [62, 67, 71, 74, 74, 78, 81, 83, 85, 85, 88, 90, 91, 92, 94, 95, 97, 98, 99, 100]
stems = {}
for s in scores:
    stems.setdefault(s // 10, []).append(s % 10)
for k in stems:
    stems[k].sort()
median = statistics.median(scores)
print(median, max(scores) - min(scores))
```

Output:

```
86.5 38
```

The median is 86.5 and the range is 38, matching what you read off the plot by hand.

## Other Ways to Do It

You do not have to build one by hand. A stem and leaf plot generator or stem plot maker takes a pasted column of numbers and returns the plot, which saves time when the data set is larger than about 30 values. Search for "stem and leaf plot maker" and check that the tool lets you set the leaf unit, since the default split is not always the one you want.

Statistical software does it too. In SPSS, the path is Analyze, then Descriptive Statistics, then Explore, and you select the variable in the Dependent List box [5]. MINITAB produces a stemplot with the STEM command, and its output adds a left column that counts values from the top down and the bottom up toward the median, with the count for the median row in parentheses [6].

If you want a picture of the same distribution with more control over the axis, a histogram or a box plot is the usual next step. Our guide to [making and reading a box plot](/blog/research-skills/how-to-make-a-box-plot) covers quartiles and outliers, and the [Box Plot Maker](/tools/box-plot-maker) will draw one from the same numbers. When you need to compare two groups side by side, a [side-by-side boxplot guide](/blog/data-analysis/side-by-side-boxplots-guide) shows the layout that replaces a back to back stem plot at larger sample sizes.

## Troubleshooting

**A stem has no leaves.** Keep the empty stem in the column. It shows a real gap in the data, and removing it makes the distribution look smoother than it is.

**One row is far longer than the others.** Split the stem into two rows, 0 to 4 and 5 to 9, or into fifths if the row is still crowded [5][6].

**The values have decimals.** Multiply everything by 10 or 100 first, or move the decimal point in the key. The key must state the unit, for example "stem 12, leaf 3 means 12.3."

**The values have different numbers of digits.** Pad with leading zeros so the split is consistent, or round to a fixed number of significant digits before you start [5].

**You cannot tell where the middle is.** Count the leaves from the top and from the bottom until the two counts meet. That meeting point is the median position, which is what the MINITAB count column does for you [6].

## Common Mistakes

- **Forgetting the key.** Without a line like "6 | 2 means 62," a reader cannot know whether the stem is tens, hundreds or something else. Always write the key.
- **Sorting the leaves incorrectly.** Leaves must increase left to right within each row [1]. A row reading 8 1 3 5 5 hides the order the plot is supposed to reveal.
- **Dropping empty stems.** Skipping a stem with no data compresses the scale and distorts the shape. List every stem in the range [5].
- **Using too few or too many stems.** Three stems for 200 values squashes everything into blocks. Thirty stems for 20 values leaves a row of single digits. Aim for 5 to 15 rows.
- **Mixing rounded and unrounded values.** If you round some values and not others, the leaves no longer line up with the original data. Apply one rule to every value [5].
- **Reading the leaf as a separate number.** The leaf is part of the value, not a count. In the row "9 | 0 1 2 4 5 7 8 9," the eight digits are eight scores, not eight points added to 9.

## Limitations

A stem plot only works when the numbers have a sensible decimal structure to split on. That structure sometimes constrains how well the plot shows where the data lie, because the row width is fixed by the digits instead of by the data [4]. Values like 1.02 and 1.03 need a different split from values like 102 and 103, and a data set spanning 0.5 to 800 will produce either a uselessly tall column of stems or a uselessly compressed one.

The plot also gets unwieldy as n grows. Past roughly 50 values the rows become long strings of digits that are hard to scan, and a histogram communicates the shape better. A stem plot shows no smoothed density, no fitted curve and no confidence interval. It is a first look at the data, not a final figure, and it is a poor choice for publication when a histogram or box plot would carry the same information more clearly.

## Frequently Asked Questions

### What is the difference between a stem plot and a histogram?

A histogram groups values into bins and shows only the counts per bin. A stem plot keeps every original value as a digit, so you can recover the exact data set from the display [2]. That is why a stem plot is described as both a graph and a data list, and why it suits small data sets where losing individual values would matter [2].

### How do I make a back to back stem plot?

Put one shared column of stems in the middle. Write the leaves for the first group to the left of the stems, increasing as they move outward from the stem, and the leaves for the second group to the right, also increasing outward [3]. Both groups must use the same leaf unit, otherwise the two sides are not comparable. This format is the small-sample version of a side-by-side boxplot.

### What does the key in a stem plot mean?

The key states how to read one row. "6 | 2 means 62" tells the reader that the stem holds the tens digit and the leaf holds the ones digit. If you split the stem or changed the leaf unit, the key has to say so, for example "stem 12, leaf 3 means 12.3" or "leaf unit = 0.1."

### Can a stem plot show outliers?

Yes, in the sense that a value sitting alone on a distant stem is visible as an outlier. In the OpenStax distance example, the value 12.3 stands apart from the rest and is flagged as a possible outlier [1]. The plot does not compute a formal outlier rule the way a box plot does, so treat it as a visual signal and confirm with a numeric test.

### When should I use a stem plot instead of a box plot?

Use a stem plot when the data set is small and you want to see every value, the shape and the spread in one display [1][2]. Use a box plot when you need quartiles, a formal outlier rule or a compact comparison across several groups. For two groups at small n, a back to back stem plot works well. For many groups, box plots scale better.

## References

1. [2.1 Stem-and-Leaf Graphs (Stemplots), Line Graphs, and Bar Graphs - Introductory Statistics 2e | OpenStax](https://openstax.org/books/introductory-statistics-2e/pages/2-1-stem-and-leaf-graphs-stemplots-line-graphs-and-bar-graphs)
2. [6.3: Stem-and-Leaf Plots - Mathematics LibreTexts](https://math.libretexts.org/Courses/Orange_Coast_College/math_in_plain_sight__mathematics_for_the_liberal_arts/06%3A_Statistics/6.03%3A_Stem-and-Leaf_Plots)
3. [2.5.1: Stem and Leaf Plots - Statistics LibreTexts](https://stats.libretexts.org/Bookshelves/Introductory_Statistics/Inferential_Statistics_and_Probability_-_A_Holistic_Approach_(Geraghty)/02%3A_Displaying_and_Analyzing_Data_with_Graphs/2.05%3A_Graphs_of_Numeric_Data/2.5.01%3A_Stem_and_Leaf_Plots)
4. [Stem-andLeaf Plots and Histograms](https://www.math.uni.edu/~campbell/mdm/slhist.html)
5. [2: Stem-&Leaf Plots, Frequency Tables, and Histograms](https://www.sjsu.edu/faculty/gerstman/StatPrimer/freq.htm)
6. [Stemplot](http://www.stat.yale.edu/Courses/1997-98/101/stem.htm)

## Related Articles

- [Side-by-Side Boxplots: How to Read and Create Them](/blog/data-analysis/side-by-side-boxplots-guide)
- [How to Make a Box and Whisker Plot (Step by Step)](/blog/data-analysis/how-to-make-box-and-whisker-plot)
- [Residual Plots: How to Interpret Them with Examples](/blog/data-analysis/residual-plots-how-to-interpret)
- [How to Make and Read a Box Plot: Quartiles, Whiskers and Outliers](/blog/research-skills/how-to-make-a-box-plot)
- [ggplot2 Tutorial for Beginners: Publication-Ready Plots for Lab Data](/blog/research-skills/how-to-make-publication-ready-plots-with-ggplot2)
- [How to Read a Forest Plot in a Meta-Analysis](/blog/research-skills/how-to-read-a-forest-plot)