Statistics & probability

Stem-and-leaf plot generator

Preserve repeated observations in an ordered plot with an explicit leaf unit and negative-value key.

Your numbers

Up to 1,000 finite numbers separated by commas, spaces or semicolons. No missing-value markers. Values must be within ±1 trillion.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Try it, understand it

Explore the result

Preserve repeated values and compare how the leaf unit and negative-value convention affect the display.

Worked example comparison
ExampleOutputWhat to notice
Repeated whole numbersObservation count7Seven observations create seven leaves, including the repeated 14.
Values on both sides of zeroObservation count7Negative stems use signed magnitude. −0 | 5 represents −5 when the leaf unit is 1.
Tenths as the leaf unitObservation count4With unit 0.1, 1 | 2 means 1.2. Four leaves preserve the four entered observations.

Check your understanding

Before checking: does 1 | 2 always mean 12?

Only when the leaf unit is 1. With unit 0.1 it means 1.2, so retain the key when copying the display.

Does a repeated observation appear only once?

No. Every observation has a leaf; repeated values retain repeated leaves and contribute to the count.

Behind the numbers

How this calculation works

Split each aligned observation into a signed-magnitude stem and one leaf digit. Sort stems by numerical value and keep duplicates. Negative leaves descend so their reconstructed values remain in numerical order. The printed key defines the convention.

THE FORMULAvalue = sign × (10 × |stem| + leaf) × leaf unit

A worked example

The observations 12,14,14,18,21,25,29 produce stem 1 with leaves 2 4 4 8 and stem 2 with leaves 1 5 9. Seven leaves preserve all seven observations.

Good to know

At most 1,000 observations, 80 occupied stems and values within ±1,000,000. Every value must align with the selected leaf unit within floating-point tolerance. No intentional rounding. Empty stems are omitted; negative stems use signed magnitude including −0. Read the key before interpreting the display.

A compact plot can retain the individual observations

A grouped frequency table replaces observations with bin counts. A stem-and-leaf display instead retains each aligned value as a leaf. Repeated values create repeated leaves, so a cluster of identical observations remains visible.

With leaf unit 1, 2 | 5 represents 25. With leaf unit 0.1, the same printed digits represent 2.5. The key is part of the plot, not an optional decoration. Copying the display without its unit can change its meaning by a factor of ten or more.

The median can be located by counting through the sorted leaves. The plot also shows gaps and clusters, but this implementation omits empty stems. A jump from stem 1 to stem 8 therefore signals a gap rather than adjacent ranges of equal spacing.

Negative stems need an explicit reading convention

This tool uses signed magnitude. A negative sign applies to the full stem-and-leaf value: −1 | 4 means −14 leaf units. A separate −0 | 5 represents −5 leaf units. Negative leaves descend so that the reconstructed values increase numerically.

Choose a leaf unit that preserves the precision you intend to display. A value of 1.25 cannot be represented with unit 0.1 without rounding, so the calculator asks for a smaller unit. It does not silently change the observations to make a plot fit.

A display with many occupied stems becomes difficult to scan. Above 80 occupied stems, use a suitable coarser unit when values align with it, or switch to grouped frequencies. A frequency table can handle broad ranges without pretending to preserve every individual value.

A few questions, answered

Why are some stems missing?

Only occupied stems are shown. Read numerical stem labels rather than treating every row as an equally spaced adjacent interval.

Why are negative leaves descending?

For a negative signed-magnitude stem, a larger leaf gives a more negative number. Descending digits therefore preserve numerical order.

Can I choose a unit that rounds my data?

No intentional rounding is performed. Enter explicitly rounded data if that is your chosen analysis, or select a unit that represents the original precision.

Find your calculator

Start typing to explore the library.