Descriptive Statistics Data Visualization Exploratory Data Analysis 22 min read September 2026
BY: Statistics Fundamentals Team
Reviewed By: Minsa A (Senior Statistics Editor)

Stem and Leaf Plot: Interactive Generator and Step-by-Step Guide

A stem and leaf plot organizes numerical data by place value so you can see the full distribution while keeping every original data point. It is the fastest manual tool for finding the median and spotting outliers in a small dataset.

Paste your numbers into the generator below and the plot appears instantly. This guide also covers back-to-back plots, decimals, split stems, worked examples, and answers to every common exam question about stem plots.

What You'll Learn
  • ✓ How to read and build a stem and leaf plot from scratch
  • ✓ Finding the median, mode, mean, and range from the plot
  • ✓ Handling decimals, three-digit numbers, and empty stems
  • ✓ Back-to-back plots for comparing two datasets
  • ✓ When to use a stem plot versus a histogram or box plot
  • ✓ The most common mistakes students make (and how to avoid them)

Stem and Leaf Plot Generator

Enter numbers separated by commas, spaces, or new lines. All processing happens in your browser.

Stem and Leaf Plot

            

Generator engine last updated: September 2026. All data stays in your browser — nothing is sent to any server. Safe for sensitive academic or medical datasets.

What Is a Stem and Leaf Plot?

Definition

A stem and leaf plot is a table used in statistics that splits each data value into two parts: the stem (all digits except the last one) and the leaf (the final digit). Stems are listed vertically in a column; leaves are written horizontally beside their matching stem. The plot retains every exact original value while grouping them visually to show frequency and the shape of a distribution.

The simplest way to picture it: take the number 47. The stem is 4 (the tens digit) and the leaf is 7 (the ones digit). If several students scored in the forties on a test (41, 43, 47), all three leaves (1, 3, 7) would appear on the same stem row beside the 4.

4
Stem
Tens digit
5
Leaf
Ones digit
The Golden Rule: Every Plot Needs a Key
A key is mandatory on every stem and leaf plot. Without one, the reader has no way to know whether 3 | 2 means 32, 3.2, or 3,200. The key always takes the form: Key: 3 | 2 = 32. Include it every time, even on a quick homework sketch.

Why Use a Stem and Leaf Plot?

John Tukey, who introduced the technique in 1977 as part of exploratory data analysis (EDA), wanted a display that was fast to draw by hand and preserved the actual numbers — unlike histograms, which bin data and discard individual values.

📊

See Distribution Shape

Rotating the plot 90 degrees counter-clockwise reveals the same profile as a bar chart, instantly showing whether data is skewed, symmetric, or bimodal.

🎯

Find the Median Fast

All values are sorted automatically. Counting leaves from each end to the center takes seconds, with no separate sorting step needed.

🔍

Spot Outliers

Empty stem rows create visible gaps. A single leaf sitting far from the rest stands out immediately without needing a box plot or z-score.

🔢

Keep Exact Values

Every original number can be read back from the plot. This makes later calculations for mean or range completely accurate.

📌
Who Invented the Stem and Leaf Plot?

John Tukey, a mathematician at Princeton and Bell Labs, formalized the technique in his landmark 1977 book Exploratory Data Analysis. He designed it for a pre-computer era when analysts needed tools they could use with pencil and paper in seconds. The method is discussed in the NIST Engineering Statistics Handbook.

Source: Tukey, J.W. (1977). Exploratory Data Analysis. Addison-Wesley. Reference methodology also available via NIST Engineering Statistics Handbook.

How to Make a Stem and Leaf Plot Step-by-Step

Featured Snippet — How to Make a Stem and Leaf Plot

Sort your data from least to greatest. Write the stems (all digits except the last) vertically in a column. For each data value, write its final digit (the leaf) beside the matching stem. Ensure leaves on each row are also in ascending order. Finally, write a key such as Key: 3 | 7 = 37. Without the key, the plot is unreadable.

1

Sort the Data from Least to Greatest

This is the only preparation step. All values must be in ascending order before you start placing leaves, otherwise your leaves will not be sorted and the plot will be harder to read. Use the generator above to sort automatically.

2

Identify and List the Stems

Look at your sorted data. The stem is everything except the last digit. For two-digit numbers, the stem is the tens digit. For three-digit numbers (e.g., 145), the stem is 14. Write all stems vertically in a column, in ascending order, including any stems with no matching data points.

3

Add the Leaves

Work through your sorted list. For each number, write its ones digit to the right of its stem, separated by a vertical bar ( | ). Keep leaves on each row in ascending order from left to right. Each leaf is always exactly one digit.

4

Write the Key

Pick any representative value from your data (the first is standard) and show how stem + leaf reconstructs it. Write it clearly below or beside the plot: for example, Key: 4 | 5 = 45. This single line makes the entire plot interpretable by anyone.

Worked Example: Test Scores

Worked Example

A teacher records 15 test scores:

Raw data: 72, 65, 88, 91, 73, 65, 84, 77, 92, 68, 75, 88, 61, 79, 83

Step 1 — Sort:
61, 65, 65, 68, 72, 73, 75, 77, 79, 83, 84, 88, 88, 91, 92

Step 2 to 4 — Build the plot:

  6 | 1  5  5  8
  7 | 2  3  5  7  9
  8 | 3  4  8  8
  9 | 1  2

Key: 6 | 1 = 61

Median (8th value of 15): 77  |  Mode: 65 and 88 (both appear twice)  |  Range: 92 - 61 = 31

How to Find the Median in a Stem and Leaf Plot

Because leaves are already sorted, finding the median is a matter of counting to the center. Here is the two-pointer method that works every time:

  1. Count the total number of leaves (this is n, your sample size).
  2. Place one finger on the first (lowest) leaf. Place another on the last (highest) leaf.
  3. Move both fingers simultaneously one leaf inward at a time.
  4. When your fingers meet, that leaf is the median (odd n). When they are about to cross, average the two leaves they land on (even n).
⚠️
Even vs. Odd Count

For an odd number of data points (say, 15), the median is the 8th value. For an even count (say, 14), the median is the average of the 7th and 8th values. Always start by counting n.

Finding Mean, Mode, and Range

A stem and leaf plot gives you all three measures with no extra calculations beyond reading the leaves carefully.

  • Mode: Look across each leaf row for repeated digits. The stem-leaf pair that repeats most often is the mode. If two pairs tie, the dataset is bimodal.
  • Range: Subtract the first leaf on the top stem (the minimum) from the last leaf on the bottom stem (the maximum). In the test score example above: 92 - 61 = 31.
  • Mean: Reconstruct each full number from its stem and leaf, sum them all, then divide by n. A stem plot preserves exact values, so no precision is lost.

Creating a Stem and Leaf Plot with Decimals

The decimal point is dropped inside the plot itself. The key carries all the information needed to restore it. Here is how it works with patient body temperatures:

Dataset: 36.4, 36.7, 37.0, 37.1, 37.5, 38.2

 36 | 4  7
 37 | 0  1  5
 38 | 2

Key: 36 | 4 = 36.4

The stem here is the integer part of the number. The leaf is the single digit after the decimal. The key makes this unambiguous. This approach works for any decimal dataset where values have exactly one decimal place.

Stem and Leaf Plots for Three-Digit Numbers

Leaves are always exactly one digit. For a number like 145, the stem is 14 and the leaf is 5. A short example with marathon finish times in minutes:

Dataset: 143, 148, 151, 155, 162, 167

 14 | 3  8
 15 | 1  5
 16 | 2  7

Key: 14 | 3 = 143

The stems now have two digits, which is perfectly standard. The leaves remain single digits, just as with two-digit data.

What Is a Back-to-Back Stem and Leaf Plot?

Featured Snippet

A back-to-back stem and leaf plot compares two datasets on a single display. Stems run down the center column. Leaves for the left dataset are written to the left of the stems (in reverse order, reading outward from the stem). Leaves for the right dataset are written to the right of the stems in normal ascending order. This makes it easy to compare the shape, spread, and center of both distributions side by side.

Here is a comparison of male and female resting heart rates (beats per minute) in a small study:

   Male   |   | Female
          | 5 | 8  9
9  8  6   | 6 | 0  2  4  7
8  5  3  1| 7 | 1  3  5  8
  7  4  2 | 8 | 2  4  9
          | 9 | 0  3

Key: 6 | 2 = 62 bpm (Female)  |  Male: 2 | 6 = 62 bpm
Male leaves grow left
Female leaves grow right

Reading a back-to-back plot: male leaves on the 7-stem are 1, 3, 5, 8 (reading left to right away from the stem, so the values are 71, 73, 75, 78). The distribution of male rates is more concentrated in the 70s range compared to the female data, which spreads more evenly.

The Rule of Empty Stems and Outliers

🚨
Never Skip a Stem Row

If your data includes values in the 20s and 40s but nothing in the 30s, you must still write the stem "3" with an empty leaf side. Omitting it hides the gap, making the distribution look continuous when it is not. That gap could represent an important break or cluster in the data.

Dataset: 21, 24, 28, 41, 45, 49  (nothing in the 30s)

 2 | 1  4  8
 3 |              ← empty stem must appear
 4 | 1  5  9

Key: 2 | 1 = 21

How to Split Stems for Clustered Data

When most of your data falls in a narrow range, many leaves pile up on the same stem, making the plot look like a single tall column. Splitting a stem into two rows stretches the distribution so patterns become visible again.

The convention: the first row of a split stem holds leaves 0 to 4; the second holds leaves 5 to 9.

Original (cluttered):
 7 | 0  1  2  3  4  5  5  6  7  8  9

Split into two rows:
 7 | 0  1  2  3  4     ← leaves 0-4
 7 | 5  5  6  7  8  9  ← leaves 5-9

Key: 7 | 0 = 70

Stem and Leaf Plot vs. Histogram: Which Is Better?

Both tools show frequency distribution, but they have different strengths. The right choice depends on your dataset and what you need from the display.

Feature Stem and Leaf Plot Histogram
Retains exact data points Yes No (binned)
Works well for small datasets (n < 50) Ideal Possible but bins may be too wide
Works well for large datasets (n > 100) Gets cluttered Ideal
Can be drawn by hand quickly Yes Requires measurement / software
Shows median directly Yes, by counting No
Compare two datasets side-by-side Back-to-back plot Requires two overlapping histograms

Comparing with Box and Whisker Plots

A box plot summarizes a dataset into five numbers (minimum, Q1, median, Q3, maximum) and is far superior for comparing quartiles and the interquartile range across several groups. But it throws away individual data points.

The practical rule: use a stem plot when you need to see every value and n is below 50. Switch to a box plot when your audience needs quartile comparisons or you're working with multiple groups side by side. The two are complementary; statisticians often draw both when exploring a new dataset.

Can You Use Negative Numbers?

Yes. Negative stems work the same way, but they appear above zero in the plot (because they are smaller values) and their leaves are still the ones digit of the absolute value. Order: most negative at the top, most positive at the bottom.

Dataset: -23, -18, -12, -7, 0, 4, 11, 15

 -2 | 3
 -1 | 2  8
 -0 | 7
  0 | 0  4
  1 | 1  5

Key: -1 | 2 = -12   |   1 | 1 = 11

The stem -0 holds negative single-digit values (here, -7). Stem 0 holds zero and positive single-digit values (here, 0 and 4). This distinction matters: -7 and +7 must go on different stems.

Visualizing Distribution Shape

Rotate a stem and leaf plot 90 degrees counter-clockwise in your mind. The leaf rows now form horizontal bars. Their length at each stem value creates the silhouette of a bar chart, instantly revealing the distribution shape without drawing anything extra.

Left
Long left tail = left-skewed
Bell
Peaks in the middle = roughly normal
Right
Long right tail = right-skewed
Twin
Two peaks = bimodal distribution

Real-World Examples

Paste either of these datasets into the generator above to practice.

Dataset 1

Daily High Temperatures Over 14 Days (°F)

67, 71, 74, 68, 72, 79, 85, 82, 88, 90, 75, 83, 76, 69

Practice: Build the plot, find the median temperature, identify the mode, and describe the shape of the distribution.

Dataset 2

Heights of 20 Students (inches)

58, 61, 63, 63, 64, 65, 65, 66, 67, 67, 68, 68, 68, 69, 70, 71, 72, 73, 74, 78

Practice: Spot which stem row has the most leaves, find the median height, and note whether the distribution is symmetric or skewed.

Common Mistakes When Drawing Stem Plots

⚠️
Four Errors That Cost Points on Exams

Even students who understand the concept lose marks through avoidable errors. Run through this checklist before putting down your pencil.

  • Leaves not sorted: Leaves on each row must go in ascending order from left to right. An unsorted plot makes finding the median a coin flip.
  • Two-digit leaves: Every leaf must be a single digit (0 to 9). If you find yourself writing "12" as a leaf, you have the stem wrong. The leaf is always only the ones digit.
  • Missing key: A plot without a key is ambiguous. Always write Key: [stem] | [leaf] = [value].
  • Skipping empty stems: If no data falls on a particular stem, write the stem with a blank leaf side. Omitting it creates a false impression of continuous data.

Generating Stem Plots in Python and R

For larger datasets or reproducible analysis, both Python and R provide stem plot functions.

Python

Using the stemgraphic library

pip install stemgraphic
import stemgraphic
data = [67, 71, 74, 68, 72, 79, 85, 82, 88, 90]
stemgraphic.stem_graphic(data)
R

Using the built-in stem() function

data <- c(67, 71, 74, 68, 72, 79, 85, 82, 88, 90)
stem(data)
stem(data, scale = 2)  # scale=2 splits stems

How to Make a Stem and Leaf Plot in Excel

Excel has no native stem and leaf chart type. The two most practical workarounds are:

  1. Sort your data in a column. Use the INT(A2/10) formula to extract stems and MOD(A2,10) to extract leaves. Format results with a monospaced font and add a dividing line manually.
  2. Use the REPT("l",COUNTIF(...)) function to simulate leaf rows visually in cells — though this produces a pictograph rather than a true plot.

For anything beyond a very quick check, the generator on this page is faster and more accurate. R's stem() function and Python's stemgraphic are the professional tools for reproducible work.

Best Practices for Stem and Leaf Plots

Exam checklist for students and a reminder list for analysts:

Exam Checklist
  • Sort your data before you begin.
  • List all stems from smallest to largest, including any stems with no leaves.
  • Write leaves in ascending order on each row.
  • Use only one digit per leaf.
  • Draw the vertical divider line between stems and leaves.
  • Write the key before you declare the plot finished.
  • Label the plot title and dataset source for formal submissions.
  • Remember: stem plots work best for n under 50. For larger datasets, use a histogram.

Frequently Asked Questions

How do you find the median in a stem and leaf plot?
Count the total number of leaves to get n. For odd n, the median is leaf number (n + 1) / 2. For even n, the median is the average of leaves n/2 and (n/2) + 1. The fastest method: start at both ends and cross off one leaf at a time from each side until you reach the center. That leaf (or average of two leaves) is your median.
What do you do if a stem has no numbers?
Write the stem with nothing to its right and move on. For example, if your stems run 1, 2, 3, 4 but no data values fall in the 30s range, your plot should still include the line "3 |" with a blank leaf side. Omitting it distorts the apparent distribution and hides a real gap in the data.
Can a leaf have two digits?
No, never. A leaf is always exactly one digit (0 through 9). If you find yourself wanting to write two digits in the leaf position, your stem is wrong. The stem absorbs all digits except the very last one. For the number 145, the stem is 14 and the leaf is 5.
How do you do a stem and leaf plot with decimals?
Strip the decimal point from the data when building the plot. Use the digit(s) before the decimal as the stem and the digit immediately after the decimal as the leaf. Then write a key that restores the decimal: for example, Key: 4 | 5 = 4.5. This works cleanly for data with one decimal place.
What is the key in a stem and leaf plot?
The key is a line that tells readers how to decode the plot by showing one example. It takes the form: Key: [stem] | [leaf] = [full value]. For instance, Key: 3 | 2 = 32 tells you that any stem of 3 combined with a leaf of 2 represents the number 32. Every stem and leaf plot must include a key, without exception.
When does a stem and leaf plot become impractical?
Once you have more than roughly 50 data points, leaf rows become very long and the visual advantage disappears. For datasets with more than 50 to 100 values, a histogram or box plot communicates the distribution far more clearly.
How is a stem and leaf plot different from a frequency distribution table?
A frequency distribution table counts how many values fall in each interval but loses the individual data points. A stem and leaf plot keeps every exact value, letting you recover the full dataset from the plot alone. The tradeoff: stem plots become unwieldy with large n, where a frequency table is cleaner.

How to Cite This Tool

APA 7th Edition

Statistics Fundamentals. (2026). Stem and leaf plot generator. Retrieved September 21, 2026, from https://statisticsfundamentals.com/descriptive-statistics/stem-and-leaf-plot/

MLA 9th Edition

Statistics Fundamentals. "Stem and Leaf Plot Generator." Statistics Fundamentals, 21 Sept. 2026, statisticsfundamentals.com/descriptive-statistics/stem-and-leaf-plot/.

📋
Educational Disclaimer

This generator is designed for educational purposes and exploratory data analysis. For large datasets or formal publication graphics, use dedicated statistical software such as R, Python, SPSS, or SAS. Methodology follows Tukey, J.W. (1977). Exploratory Data Analysis. Addison-Wesley.