Statistics
Stem-and-leaf plot calculator
Enter your data to build a stem-and-leaf display. Choose the leaf unit, split the stems, or add a second data set to compare the two back to back.
Separate values with commas, spaces or new lines. Decimals and negative numbers work.
Key: 4 | 7 = 47. Leaf unit 1.
Show the working, step by step
Sort the data.
47, 52, 55, 58, 61, 63, 63, 67, 68, 70, 72, 74, 75, 75, 78, 81, 83, 86, 89, 94
With a leaf unit of 1, the leaf is the last digit at that unit and the stem is everything before it.
47 → stem 4, leaf 7
List every stem from the smallest to the largest, including empty ones, so gaps in the data show.
4, 5, 6, 7, 8, 9
Write each leaf beside its stem in increasing order.
4 | 7
How values become stems and leaves
scaled value = value ÷ leaf unit (rounded to a whole number) leaf = last digit of the scaled value stem = scaled value with the last digit removed
With a leaf unit of 1, the value 63 has stem 6 and leaf 3. With a leaf unit of 0.1, the value 6.3 becomes 63 after scaling and gets the same stem and leaf, so the key is what tells the two apart. The automatic setting starts from the precision of your data and moves the leaf unit up by a factor of 10 until there are no more than 20 stems.
A worked example
The default data is 20 test scores:
47, 52, 55, 58, 61, 63, 63, 67, 68, 70, 72, 74, 75, 75, 78, 81, 83, 86, 89, 94
With a leaf unit of 1 the stems are the tens digits, 4 to 9:
4 | 7 5 | 2 5 8 6 | 1 3 3 7 8 7 | 0 2 4 5 5 8 8 | 1 3 6 9 9 | 4 Key: 4 | 7 = 47
The plot is also a sorted list, so the median is easy to find. With 20 values it is the average of the 10th and 11th. Counting leaves from the top (1, then 3 more is 4, then 5 more is 9), the 10th and 11th values are the first two leaves on stem 7: 70 and 72. The median is 71. The repeated leaves 3 3 on stem 6 and 5 5 on stem 7 show two modes, 63 and 75.
Reading the shape
Turn the plot on its side and the rows of leaves become bars. Here the longest rows are the 60s and 70s, with shorter rows above and below, so the scores are roughly symmetric and centred in the low 70s. There are no gaps between stems and no isolated leaf far from the others, so nothing looks like an outlier. Unlike a histogram, the plot keeps every original value, so you can read off the minimum (47) and the maximum (94) directly.
With split stems the same data gets 10 rows: the 60s become 6 | 1 3 3 and 6 | 7 8, for example. This helps when there are only a few stems; here it mostly spreads the picture out. To compare two groups, paste a second set into the optional box, and the leaves of the first set grow to the left of the shared stems.
Common mistakes
- Leaving out a stem that has no leaves. The empty row is what shows a gap in the data.
- Leaving out the key, so nobody can tell whether 4 | 7 means 47, 4.7 or 470.
- Writing leaves out of order, or with uneven spacing, which distorts the shape.
- Using two-digit leaves. Each leaf is one digit; change the leaf unit instead.
Common questions
How do you make a stem-and-leaf plot?
Sort the data. Split each value into a stem (all but the last digit) and a leaf (the last digit). List the stems from smallest to largest in a column, including any stems with no data, and write each leaf beside its stem in increasing order. Add a key such as 4 | 7 = 47 so the reader knows the place value.
What is the leaf unit?
The place value of the leaf. With a leaf unit of 1, 4 | 7 means 47. With 0.1 it means 4.7, and with 10 it means 470. Values with digits below the leaf unit are rounded to it, so with a leaf unit of 10 the value 473 is shown as 4 | 7.
When should I split the stems?
When most leaves pile up on a few stems and the shape is hard to see. Splitting in two puts leaves 0–4 on the first line of each stem and 5–9 on the second, doubling the number of rows. Splitting in five gives lines for 0–1, 2–3, 4–5, 6–7 and 8–9.
How do I read a back-to-back stem-and-leaf plot?
The stems run down the middle and are shared. The second data set's leaves are on the right, read normally. The first data set's leaves are on the left and are read from the stem outward, so the leaf nearest the stem is the smallest. In a row “8 5 2 | 5 |” the left-hand values are 52, 55 and 58.
How are negative numbers shown?
With negative stems, including a −0 stem for negative values whose stem digit is 0, such as −5 at a leaf unit of 1. The value −23 is −2 | 3 and −5 is −0 | 5. The negative stems come first, from the most negative upward.
Related calculators
-
Dot plot calculator
Every value as a stacked dot on a number line.
-
Median calculator
The middle value, with the working for odd and even n.
-
Histogram calculator
Group larger data sets into classes.