Understanding the stem-and-leaf plot maker — concept and principle
This tool turns a list of numbers into a stem-and-leaf plot (stemplot) and reports the median, count, smallest and largest values and range. Use it for statistics homework, to see the shape of a small data set quickly, and to present test scores, ages or measurements while keeping every value visible.
How it is calculated
- Choose the leaf unit: 0.1, 1, 10 or 100. The leaf is the digit in that place; the stem is everything to its left.
- Round values with more digits than the leaf unit (the page counts how many were rounded).
- Write the stems once, in a column from smallest to largest, keeping empty stems so gaps show.
- Add each value's leaf to its stem's row, in increasing order.
- The key line explains how to read a row, e.g. 3 │ 3 = 33.
The median is the middle value of the sorted data, or the mean of the two middle values when the count is even.
The principle
A stem-and-leaf plot is a sideways histogram built from the data themselves. Each row is a bin (for example, all values in the 60s), and the length of the row shows how many values fall there. Because the leaves are the actual digits, you can still read every value, find the median by counting, and spot clusters, gaps and outliers. The method was popularised by John Tukey as part of exploratory data analysis.
Worked example
Default data: 31 scores from 33 to 100, leaf unit 1.
- Stems run from 3 to 10; for example 42, 49, 49 become 4 │ 2 9 9.
- Rows: 3 │ 3; 4 │ 2 9 9; 5 │ 3 5 5; 6 │ 1 3 7 8 8 9 9; 7 │ 2 3 4 8; 8 │ 0 3 8 8 8; 9 │ 0 2 4 4 4 4 6; 10 │ 0.
- Count = 31, so the median is the 16th value. Counting leaves: 1 + 3 + 3 + 7 = 14 up to the 60s, then 72 and 73.
- Smallest 33, largest 100, range 67. No values needed rounding.
How to read the result
Long rows show where most values are; here the 60s and 90s are the busiest. A single leaf far from the rest, like 33, may be an outlier worth checking. If the shape has a long tail on one side, the data are skewed. If almost all values land on one or two stems, choose a smaller leaf unit; if every row has one leaf, choose a larger one.
Common mistakes
- Leaving out empty stems, which hides gaps in the data.
- Not sorting the leaves in each row.
- Forgetting the key, so readers do not know whether 4 │ 2 means 42 or 4.2.
- Using a stemplot for very large data sets, where a histogram is clearer.
Frequently asked questions
What is the stem and what is the leaf?
The leaf is the last digit shown; the stem is all digits before it. For 42 with leaf unit 1, the stem is 4 and the leaf is 2.
How do I find the median from a stem-and-leaf plot?
Count leaves from the top until you reach the middle position.
Can a stemplot show decimals?
Yes. With leaf unit 0.1, 9.3 is stem 9 and leaf 3.
Sources: OpenStax, Introductory Statistics 2e (2023), §2.1 Stem-and-Leaf Graphs (Stemplots), Line Graphs, and Bar Graphs