statcompute

Charts

Stem and Leaf Plot Maker

A histogram that keeps every digit — the shape of the data with none of the values discarded.

Updated August 2026Runs in your browser — nothing is uploadedVerified against R
One value per line, or separated by commas, tabs or spaces. A header row is ignored.
Leave empty to choose automatically. 1 means each leaf is a unit digit; 10 means each leaf is a ten.
Doubles the resolution when the data crowd onto few stems.

The calculation runs in your browser, so this box needs JavaScript. The formula, the worked example and the interpretation below do not.

01

How to read this result

Read it as a sideways histogram. The stems are the leading digits, the leaves the trailing ones, and the length of each row is that interval's frequency. Turn the page ninety degrees and it is a histogram — with the original numbers still legible.

That is the whole advantage. A histogram tells you eight values fell between 20 and 30; a stem-and-leaf plot tells you they were 21, 22, 22, 24, 27, 28, 28 and 29. You can read the median and the quartiles straight off it.

And the whole limitation. Past about a hundred values the rows become unreadable and a histogram is better. It is a small-sample tool.

Split stems when the data crowd. If everything lands on three stems, splitting each into a 0–4 half and a 5–9 half doubles the resolution without changing the data.

02

The formula

value=(stem×10+leaf)×leafunit

The leaf unit must be stated or the plot is ambiguous: a stem of 4 with a leaf of 2 could be 4.2, 42 or 420.

03

Worked example

Fifteen test scores

Fifteen scores between 52 and 98. A stem-and-leaf plot with a leaf unit of 1 puts the tens digit in the stem and the units digit in the leaf.

52, 58, 61, 63, 67, 71, 72, 74, 78, 79, 83, 85, 88, 91, 98

  1. Split each value into a stem (tens) and a leaf (units).
    52 → stem 5, leaf 2
  2. Group by stem and sort the leaves.
    5 | 2 8 6 | 1 3 7 7 | 1 2 4 8 9 8 | 3 5 8 9 | 1 8
  3. The row lengths are the frequencies.
    2, 3, 5, 3, 2
  4. Read the median straight off: the 8th of 15 values.
    median = 74
stems 5n 15median 74busiest stem 70s, with 5 values

Every one of the fifteen original scores is still readable, and the shape — a peak in the seventies, tailing off both ways — is visible at a glance. That combination is what the plot exists for.

Checked against a direct construction, checked against R's stem.

The calculator above is loaded with these numbers by the Load the worked example button.

04

Assumptions, and when to use something else

The data need to share a digit structure for the plot to be readable. Values spanning several orders of magnitude — 3, 47, 1,200 — produce a plot with mostly empty stems and are better served by a histogram on a log scale.

The leaf unit must be stated, and this calculator always states it. Without it the plot cannot be read back into numbers.

  • You have more than about a hundred valuesHistogram makerStem-and-leaf plots stop being readable; histograms scale.
  • You want to compare groupsBox plot makerSeveral distributions on a shared scale.
  • You want counts rather than a pictureFrequency tableThe same information as a table.
05

Questions people ask

What is a leaf unit?

The value of one leaf digit. With a leaf unit of 1, stem 4 and leaf 2 means 42; with a leaf unit of 0.1 it means 4.2. Every stem-and-leaf plot must state its leaf unit — the calculator does so automatically and shows a worked reading.

When should I split the stems?

When the data crowd onto a handful of stems and the rows get long. Splitting each stem into 0–4 and 5–9 halves doubles the resolution and often reveals structure that was hidden.

Is a stem-and-leaf plot better than a histogram?

For small data sets, often yes: it shows the same shape and keeps every value, so you can read the median and quartiles directly. Past about a hundred observations the histogram wins on readability.