A stem-and-leaf plot is a quick way to organise a small data set while keeping every original value. Each number is split into a stem – all digits except the last – and a leaf – the last digit. The stems are written once in a column, and the leaves for each stem are listed in order beside them. Turned on its side, the plot looks like a histogram, but you can still read off each individual value.
The leaf unit sets which digit becomes the leaf. With a leaf unit of 1, 47 is stem 4, leaf 7; with a leaf unit of 0.1, 4.7 is stem 4, leaf 7; with a leaf unit of 10, 470 is stem 4, leaf 7 (and 473 is truncated to 470). The automatic setting chooses the finest unit that keeps the plot to about 15 rows. Every plot needs a key such as “4 | 7 = 47” so the reader knows the scale.
When most values fall under a few stems, split each stem into two lines (leaves 0–4 and 5–9) or five lines to spread the plot out. A back-to-back plot puts a second data set’s leaves on the left of the same stems – a neat way to compare two classes or two years.
How to use the Stem and Leaf Plot Generator
- Data set
- Leaf unit
- Rows per stem
- Plot type
- Second data set (left side)
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
Each value is divided by the leaf unit and truncated to an integer; the last digit of that integer is the leaf and the rest is the stem. Stems from the smallest to the largest are listed (including empty ones), leaves are sorted, and split stems divide each stem’s leaves into two or five rows. Negative values get negative stems, with −0 used for values between −1 and 0 stem units.
Worked example
Twenty quiz scores – 41, 43, 47, 52, 55, 55, 58, 61, 62, 64, 64, 67, 69, 70, 73, 75, 78, 81, 86, 92 – give stems 4 to 9 with leaf unit 1:
4 | 1 3 7 5 | 2 5 5 8 6 | 1 2 4 4 7 9 7 | 0 3 5 8 8 | 1 6 9 | 2
Key: 4 | 1 = 41. The 60s row is the longest, the 10th and 11th values are both 64 so the median is 64, Q1 = 55 and Q3 = 73.5, and the modes are 55 and 64 (each twice). The range is 92 − 41 = 51.
Choosing the leaf unit
| Data look like | Leaf unit | Example | Key |
|---|---|---|---|
| 0.53, 0.61, 0.78 | 0.01 | 0.53 → 5 | 3 | 5 | 3 = 0.53 |
| 3.8, 4.2, 5.6 | 0.1 | 3.8 → 3 | 8 | 3 | 8 = 3.8 |
| 41, 52, 67 | 1 | 67 → 6 | 7 | 6 | 7 = 67 |
| 128, 135, 142 | 1 | 135 → 13 | 5 | 13 | 5 = 135 |
| 1,250, 1,480, 2,310 | 100 | 1,480 → 1 | 4 | 1 | 4 = 1,400 |
Tips
- Check the support of the distribution: counts are whole numbers, waiting times are positive.
- Use P(X ≤ x) for “at most”, P(X ≥ x) for “at least” and P(X = x) for “exactly”.
- For continuous distributions P(X = x) is zero – ask for a range instead.
- Charts and tables are drawn in your browser from the numbers you enter.
Common mistakes to avoid
- Mixing up the rate per interval and the length of the interval.
- Using a normal approximation when n·p or n·(1 − p) is below about 10.
- Entering a standard deviation where the variance is asked for (or the other way round).
Formula
Value = (stem × 10 + leaf) × leaf unit · e.g. leaf unit 1: 47 → stem 4 | leaf 7; leaf unit 0.1: 3.8 → stem 3 | leaf 8Worked example
Inputs — Data set: 41, 43, 47, 52, 55, 55, 58, 61, 62, 64, 64, 67, 69, 70, 73, 75, 78, 81, 86, 92; Leaf unit: Automatic; Rows per stem: One row per stem; Plot type: Single data set.
Results — Stem-and-leaf plot = 4 | 1 3 7
5 | 2 5 5 8
6 | 1 2 4 4 7 9
7 | 0 3 5 8
8 | 1 6
9 | 2
Key: 4 | 1 = 41 (leaf unit 1, stem unit 10); Key = Key: 4 | 1 = 41 (leaf unit 1, stem unit 10); Median = 64; First quartile (Q1) = 55; Third quartile (Q3) = 73.5; Mode = 55, 64 (2 times each).
Key terms
- Stem
- All digits of a value except the last (after scaling by the leaf unit).
- Leaf
- The last digit of a value.
- Leaf unit
- The place value of a leaf, e.g. 1, 0.1 or 10.
- Key
- A note such as 4 | 7 = 47 that shows how to read the plot.
Frequently asked 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), write the stems in a column and list each stem's leaves in order to its right. Add a key.
How do you read a stem-and-leaf plot?
Join the stem and the leaf and apply the key: with "4 | 1 = 41", the row 6 | 1 2 4 means 61, 62 and 64.
How do I show decimals?
Use a leaf unit of 0.1: 3.8 becomes stem 3, leaf 8. For 0.53, a leaf unit of 0.01 gives stem 5, leaf 3 with the key 5 | 3 = 0.53.
What about three-digit numbers?
With leaf unit 1, 128 is stem 12, leaf 8. With leaf unit 10, 128 is stem 1, leaf 2 (the 8 is dropped, which the key notes).
How do I find the median from a stem-and-leaf plot?
Count leaves from the top until you reach the middle position. With 20 values the median is the average of the 10th and 11th – 64 and 64 in the default example.
What are split stems?
Each stem is listed twice, once for leaves 0–4 and once for leaves 5–9, which spreads out data crowded under a few stems.
What is a back-to-back stem-and-leaf plot?
Two data sets share one column of stems; the second set's leaves are written to the left and read from right to left.
How are negative numbers shown?
With negative stems. Values between −1 and 0 stem units go on a "−0" stem, so −0.4 appears as −0 | 4 with a leaf unit of 0.1.
What formula does the Stem and Leaf Plot Generator use?
Value = (stem × 10 + leaf) × leaf unit · e.g. leaf unit 1: 47 → stem 4 | leaf 7; leaf unit 0.1: 3.8 → stem 3 | leaf 8.