Statistics

Stem-and-Leaf Plots

Last updated: March 2026 · Beginner
Before you start

You should be comfortable with:

Real-world applications
πŸ’°
Retail & Finance

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:

  1. Sort the data from smallest to largest.
  2. Identify the stems β€” list every stem value from the minimum to the maximum, even if a stem has no leaves.
  3. Write the leaves next to the correct stem, in order from smallest to largest.
  4. 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:

72,β€…β€Š85,β€…β€Š91,β€…β€Š68,β€…β€Š74,β€…β€Š88,β€…β€Š95,β€…β€Š71,β€…β€Š83,β€…β€Š79,β€…β€Š92,β€…β€Š86,β€…β€Š77,β€…β€Š81,β€…β€Š6972, \; 85, \; 91, \; 68, \; 74, \; 88, \; 95, \; 71, \; 83, \; 79, \; 92, \; 86, \; 77, \; 81, \; 69

Step 1: Sort the data.

68,β€…β€Š69,β€…β€Š71,β€…β€Š72,β€…β€Š74,β€…β€Š77,β€…β€Š79,β€…β€Š81,β€…β€Š83,β€…β€Š85,β€…β€Š86,β€…β€Š88,β€…β€Š91,β€…β€Š92,β€…β€Š9568, \; 69, \; 71, \; 72, \; 74, \; 77, \; 79, \; 81, \; 83, \; 85, \; 86, \; 88, \; 91, \; 92, \; 95

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.

StemLeaf
68 9
71 2 4 7 9
81 3 5 6 8
91 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: 2+5+5+3=152 + 5 + 5 + 3 = 15. 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:

StemLeaf
21 3 5 7 8
30 2 2 4 6 8 9
41 3 5 7
50 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: 5+7+4+4=205 + 7 + 4 + 4 = 20 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.

Median=36+382=37\text{Median} = \frac{36 + 38}{2} = 37

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.

Q1=28+302=29Q_1 = \frac{28 + 30}{2} = 29

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.

Q3=45+472=46Q_3 = \frac{45 + 47}{2} = 46

Five-number summary: 21, 29, 37, 46, 56

Interquartile range: IQR=Q3βˆ’Q1=46βˆ’29=17IQR = Q_3 - Q_1 = 46 - 29 = 17

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)StemClass B (right)
8 523 6 7
7 5 2 031 4 8
6 4 140 2 5 8 9
050 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

FeatureStem-and-Leaf PlotHistogram
Shows individual valuesYes β€” every data point is visibleNo β€” only frequency counts
Shows distribution shapeYes β€” row lengths form a shapeYes β€” bar heights form a shape
Best dataset size10 to 50 valuesAny size, especially large datasets
PrecisionExact values preservedValues grouped into bins
Ease of finding medianEasy β€” count leaves directlyRequires additional calculation
Two-group comparisonBack-to-back plotsSide-by-side or overlapping histograms
Handles large datasetsBecomes cluttered above 50 valuesHandles 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:

134,β€…β€Š128,β€…β€Š145,β€…β€Š152,β€…β€Š137,β€…β€Š141,β€…β€Š119,β€…β€Š148,β€…β€Š133,β€…β€Š156,β€…β€Š127,β€…β€Š143,β€…β€Š138,β€…β€Š151,β€…β€Š124134, \; 128, \; 145, \; 152, \; 137, \; 141, \; 119, \; 148, \; 133, \; 156, \; 127, \; 143, \; 138, \; 151, \; 124

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.

119,β€…β€Š124,β€…β€Š127,β€…β€Š128,β€…β€Š133,β€…β€Š134,β€…β€Š137,β€…β€Š138,β€…β€Š141,β€…β€Š143,β€…β€Š145,β€…β€Š148,β€…β€Š151,β€…β€Š152,β€…β€Š156119, \; 124, \; 127, \; 128, \; 133, \; 134, \; 137, \; 138, \; 141, \; 143, \; 145, \; 148, \; 151, \; 152, \; 156

Step 2: Build the plot.

StemLeaf
119
124 7 8
133 4 7 8
141 3 5 8
151 2 6

Key: 13 | 4 means 134 transactions

Analysis:

  • Minimum: 119 transactions. Maximum: 156 transactions. Range: 156βˆ’119=37156 - 119 = 37.
  • 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

StemLeaf
54
63 7
72 2 6 8
81 3 5 8
91 4

Key: 7 | 2 means 72

Total leaves: 1+2+4+4+2=131 + 2 + 4 + 4 + 2 = 13 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 =94βˆ’54=40= 94 - 54 = 40

Problem 3: A stem-and-leaf plot is shown below. How many data values are in the set, and what is the mode?
StemLeaf
15 8
20 3 3 7
31 3 3 3 6
42 5

Key: 2 | 3 means 23

Count: 2+4+5+2=132 + 4 + 5 + 2 = 13 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.

Last updated: March 29, 2026