Stem-and-Leaf Plot Calculator
Unlike a histogram, a stem-and-leaf plot shows the shape of a distribution without losing the individual observations. Each number is split into a stem (the leading digits) and a leaf (the last digit); writing the leaves that share a stem side by side produces what looks like a histogram on its side, while every raw value remains readable.
This calculator picks the leaf unit automatically from the range of your data (you can also set it yourself), lists the stems including the empty ones, and shows the frequency and cumulative count of each row. It also interprets whether the distribution is symmetric, skewed, unimodal, or multimodal, and draws a histogram for comparison.
How a Stem-and-Leaf Plot Is Built
Leaf unit: b = 10ᵏ (chosen from the data range) Scaled value: yᵢ = round(xᵢ / b) Stem: gᵢ = int(yᵢ / 10) Leaf: lᵢ = yᵢ − 10·gᵢ (0 ≤ lᵢ ≤ 9) Stem unit: 10·b Range of a row: [gᵢ·10·b , (gᵢ+1)·10·b) Reading: g | l = g·10·b + l·b Check: Σ (row frequencies) = n
The leaf unit is chosen as the most detailed power of ten that produces fewer than 15 stems. The leaves in each row are sorted in ascending order, and empty stems are kept as rows so that the diagram preserves its scale.
How to Calculate
- Paste your data values into the box; commas, spaces, and line breaks are all accepted.
- Leave the leaf unit on automatic, or pick a power of ten that suits your data.
- Read each table row as "stem | leaves"; the range-covered column tells you which values that row represents.
- Check that the frequency column sums to the number of observations.
- Look at the stem where the leaves pile up and at the length of the tails to judge whether the distribution is symmetric or skewed.
- Compare the same data with the histogram: the shape should be the same, but the stem-and-leaf plot also keeps the raw values.
Worked Examples
A plot of two-digit measurements
Since the range of the 30 measurements is 74 − 23 = 51, the automatic setting makes the leaf unit 1 and the stem unit 10, producing 6 stems from 2 to 7. The busiest row is 4 | 1 2 3 4 5 6 7 8: 8 observations in the 40–50 range, that is 26.7%. The median is the midpoint of the 15th and 16th leaves, 44.50; with a mean of 45.67 and a skewness of 0.343 the distribution is approximately symmetric.
Number of stems: 6 · Leaf unit: 1 · Stem unit: 10
Decimal data with a leaf unit of 0.1
When a leaf unit of 0.1 is chosen for decimal data, the stem unit becomes 1 and the row 3 | 2 stands for the value 3.2. The 20 measurements spread across 5 stems from 3 to 7; the busiest row is the 5.0–6.0 range (7 observations, 35%). With a median of 5.05 and a mean of 5.07, the distribution is unimodal and approximately symmetric.
Number of stems: 5 · Leaf unit: 0.1 · Stem unit: 1
A wide range with a leaf unit of 10
When the range is 865 − 125 = 740, the leaf unit becomes 10 and the stem unit 100: the row 8 | 7 represents the value 870 (865 rounded). The 20 observations spread across 8 stems from 1 to 8, and the busiest row is the 200–300 range (5 observations, 25%). The mean of 410.25 is clearly larger than the median of 359; with a skewness of 0.619 the distribution is mildly right-skewed.
Number of stems: 8 · Leaf unit: 10 · Stem unit: 100