Stem-and-Leaf Plot Maker
Paste your data and get a stem-and-leaf plot with its key, leaves in order and every stem shown, including empty ones. Split the stems, change the leaf unit for decimals or larger numbers, or compare two groups back to back. The median, mode, range and quartiles are worked out underneath.
Data
Chart and downloads
The PDF has the chart and every step of the working on Letter paper. Print it at 100% or Actual size. Your data stay in this browser.
Titles and labels
Stem-and-leaf plot settings
Working and PDF
Worked statistics
Stems and leaves
Leaf unit: 1. Write each value in whole units; the last digit is the leaf and the digits before it are the stem.
Key: 5 | 2 means 52.
Sorted data
Sorted values (n = 25): 52, 58, 61, 63, 64, 67, 67, 70, 71, 72, 74, 75, 75, 75, 78, 81, 82, 84, 86, 88, 90, 91, 93, 96, 99
There are 25 values, from 52 to 99.
Mean
Add the values, then divide by how many there are.
Sum of the 25 values = 1912
Mean = 1912 ÷ 25 = 76.48
Median
With 25 values (an odd number), the median is the middle one: the 13th value in the sorted list.
Median = 75
Mode
75 appears 3 times, more often than any other value, so the mode is 75.
Range
Range = largest − smallest = 99 − 52 = 47
Quartiles and IQR (exclusive method)
With 25 values (an odd number), leave the median (the 13th value) out and split the rest into two halves of 12.
Lower half: 52, 58, 61, 63, 64, 67, 67, 70, 71, 72, 74, 75
Q1 = median of the lower half = (67 + 67) ÷ 2 = 67
Upper half: 75, 78, 81, 82, 84, 86, 88, 90, 91, 93, 96, 99
Q3 = median of the upper half = (86 + 88) ÷ 2 = 87
IQR = Q3 − Q1 = 87 − 67 = 20
By the inclusive method (median in both halves, the same as Tukey’s hinges), Q1 = 67, Q3 = 86 and IQR = 19. Check which method your class uses.
What a stem-and-leaf plot shows
A stem-and-leaf plot, a staple of exploratory data analysis since the 1970s, is a sorted list and a picture at the same time. Each value is split into a stem (its leading digits) and a leaf (its last digit). The stems are written once, in order, down the left; each value's leaf goes in the row of its stem. Turn the page on its side and the rows of leaves are bars, so the shape shows as a histogram would show it, but every value can still be read back exactly.
How to make one by hand
- Choose the leaf unit. For whole numbers from 10 to 99, the leaf is the units digit and the stem the tens digit.
- Write every stem from the smallest value's to the largest's, in a column, with a line to the right. Include stems with no leaves.
- Add each value's leaf to its stem's row, then rewrite each row with its leaves in order.
- Add a key, such as "5 | 2 means 52", so a reader knows what the digits stand for.
Worked example
These are 25 science test scores out of 100: 75, 84, 61, 93, 70, 58, 88, 75, 67, 99, 72, 81, 64, 90, 75, 52, 78, 86, 67, 96, 71, 82, 63, 91, 74. The tool's plot and working, from when this page was built:
Stems and leaves
Leaf unit: 1. Write each value in whole units; the last digit is the leaf and the digits before it are the stem.
Key: 5 | 2 means 52.
Median
With 25 values (an odd number), the median is the middle one: the 13th value in the sorted list.
Median = 75
Mode
75 appears 3 times, more often than any other value, so the mode is 75.
Range
Range = largest − smallest = 99 − 52 = 47
Reading off the plot: the leaves are already in order, so the median is the 13th leaf counting from the top (75), the most repeated leaf in a row gives the mode (75), and the first and last leaves give the range (99 − 52 = 47).
Split stems
With most scores in the 60s, 70s and 80s, the rows are long. Splitting each stem into a 0–4 line and a 5–9 line doubles the rows and shows the shape in more detail:
Back-to-back plots
To compare two groups, share the stems. Period 1's scores read leftwards from the stem and Period 2's (20 scores, median 73) read rightwards, so the two shapes sit side by side and their centres and spreads can be compared at a glance.
Decimals and larger numbers
Change the leaf unit to fit the data: tenths for values such as 2.4 seconds, tens for values in the hundreds. The tool picks one automatically, choosing the finest unit that keeps the plot to about 15 stems, and writes it into the key. For these reaction times the leaf unit is 0.1 and the key reads "2 | 4 means 2.4".
Common mistakes
- No key, so nobody can tell whether 4 | 7 means 47, 4.7 or 470.
- Leaves out of order, which hides the median and the mode.
- Leaving out empty stems, which closes up gaps in the data.
- Uneven leaf spacing: the leaves are bars, so each digit needs the same width.
- Two digits in a leaf: a leaf is always a single digit.
Frequently asked questions
Why does a stem-and-leaf plot need a key?
Because the same digits can mean different values. "4 | 7" is 47 when the leaves are units, 4.7 when they are tenths and 470 when they are tens. The key, such as "5 | 2 means 52", tells the reader which, and a plot without one can't be read.
What are split stems?
Each stem is written twice: the first line takes leaves 0 to 4, the second leaves 5 to 9. Use them when most values share a few stems, so the plot would otherwise be a handful of very long rows. Tick "Split stems" in the tool to try it.
How do I read a back-to-back stem-and-leaf plot?
The stems run down the middle. One group's leaves go to the right, as usual; the other group's go to the left, read from the stem outwards, so the smallest leaf is nearest the stem. With a key such as "2 | 5 | 1 means 52 and 51", the left leaf belongs to the first group and the right leaf to the second.
What happens to digits after the leaf?
They are cut off (truncated), not rounded: with a leaf unit of 10, the value 123 shows as 1 | 2, just as 128 would. Truncating is the usual convention because it keeps every value in the row its leading digits belong to. The tool says so under the plot when it happens, and the working still uses the exact values.
When should I use a stem-and-leaf plot instead of a histogram?
When the data set is small enough to list, up to about fifty values, and you want to keep every value while still seeing the shape. It also makes the median and mode easy to find, because the leaves are already in order. For hundreds of values, use a histogram.