Stem and Leaf Plot Generator

Paste a dataset to generate a stem-and-leaf plot with summary stats. Supports back-to-back plots for comparing two datasets side by side.

A stem-and-leaf plot organises data by splitting each number into a stem (all digits except the last) and a leaf (the last digit). Unlike a histogram, it preserves every original value while still showing the shape of the distribution. Paste or type your numbers into this tool and the plot builds instantly, complete with summary statistics.

Ad
Ad

About Stem and Leaf Plot Generator

How to Read a Stem-and-Leaf Plot

The stem is listed on the left of a vertical bar, and the leaves are listed in order on the right. Each leaf represents one data point. To reconstruct a value, combine the stem with the leaf.

Example dataset: 12, 15, 17, 21, 23, 23, 25, 28, 31, 32, 35, 36, 38, 41, 45

StemLeavesValues Represented
12 5 712, 15, 17
21 3 3 5 821, 23, 23, 25, 28
31 2 5 6 831, 32, 35, 36, 38
41 541, 45

You can immediately see that the 20s and 30s are the most populated ranges, and the data is roughly symmetric with a slight right tail. The leaf count in each row acts like a horizontal bar chart - the longer the row of leaves, the more data points in that range.

How to Construct a Stem-and-Leaf Plot by Hand

  1. Sort the data from smallest to largest.
  2. Decide on stems. For two-digit numbers, the tens digit is the stem and the units digit is the leaf. For three-digit numbers, the first two digits form the stem.
  3. List all stems from the minimum to maximum in order, even if some have no leaves (this shows gaps in the data).
  4. Write each leaf next to its stem in ascending order.
  5. Add a key: "1 | 5 means 15" so the reader knows the scale.

This tool handles all of these steps automatically. It also handles decimal data by adjusting the stem-leaf split appropriately.

Stem-and-Leaf Plot vs Histogram

FeatureStem-and-Leaf PlotHistogram
Shows individual valuesYes - every data point is visibleNo - values are grouped into bins
Shows distribution shapeYes - turn it sideways and it looks like a histogramYes - bars show frequency
Handles large datasetsGets unwieldy above ~50-100 valuesWorks well for any size
Finding the medianEasy - count leaves to the middleCan only estimate from bars
Comparing two groupsBack-to-back plot on shared stemsSide-by-side or overlapping bars
PrecisionExact values preservedPrecision lost within bins
Best forSmall to medium datasets, courseworkLarge datasets, publications

What Is a Back-to-Back Stem-and-Leaf Plot?

A back-to-back plot places two datasets on the same set of stems. One dataset's leaves go to the right (as usual), and the other's go to the left (in reverse order). This makes it easy to compare distributions visually.

Example: Compare test scores from two classes.

Class A (leaves)StemClass B (leaves)
8 5 251 4 7
9 7 3 162 5 6 8
8 6 4 2 070 3 5 7 9
5 3 181 4 6 8 9
290 3 5

Reading this: Class A has a leaf of 8 on stem 5, meaning a score of 58. Class B has a leaf of 1 on stem 5, meaning 51. You can see at a glance that Class B has more students scoring in the 80s and 90s, while Class A clusters more in the 70s. Switch to back-to-back mode in this tool to create these comparison plots.

Finding the Median from a Stem-and-Leaf Plot

Since all values are visible and in order, finding the median is straightforward. Count the total number of leaves (n), then locate the middle value.

If n is...Median positionExample
Odd(n+1)/2 th value15 values: median is the 8th
EvenAverage of n/2 and (n/2)+1 th values14 values: average of 7th and 8th

Using the earlier example (12, 15, 17, 21, 23, 23, 25, 28, 31, 32, 35, 36, 38, 41, 45): n = 15, so the median is the 8th value = 28. Count through the leaves: stem 1 has 3 leaves (positions 1-3), stem 2 has 5 leaves (positions 4-8). The 8th value is the last leaf on stem 2, which is 8 - giving 28.

The Mean Median Mode Calculator computes all three central tendency measures directly from raw data if you prefer a numeric approach.

Split Stems for Crowded Plots

When many values share the same stem, the plot becomes hard to read. Split stems solve this by dividing each stem into two (or five) lines:

Stem TypeLeaves on Each LineWhen to Use
RegularAll digits 0-9Data spread across many stems
Split (2 lines)0-4 on first line, 5-9 on secondFew stems with many leaves
Split (5 lines)0-1, 2-3, 4-5, 6-7, 8-9Very concentrated data

For example, if all your data falls between 40 and 59, a regular plot would have just two stems (4 and 5). Splitting each stem into two lines gives four rows, showing the distribution shape more clearly.

What the Summary Statistics Tell You

This tool displays several statistics below the plot:

StatisticWhat It MeasuresHow to Interpret
MinSmallest valueLower boundary of the data
MaxLargest valueUpper boundary of the data
RangeMax - MinTotal spread of the data
MedianMiddle value when sortedTypical value, resistant to outliers
MeanSum / CountArithmetic average, sensitive to outliers
ModeMost frequent valueMost common observation
CountNumber of data pointsSample size

For deeper spread analysis including variance and standard deviation, the Variance Calculator takes the same kind of raw data input. For percentile breakdowns, the Percentile Calculator shows quartiles and the five-number summary.

When to Use a Stem-and-Leaf Plot

Good Use CasesPoor Use Cases
Homework and exams (easy to draw by hand)Datasets over 100 values (too many leaves)
Quick visual of small datasetsData with many decimal places
Comparing two groups (back-to-back)Data spanning many orders of magnitude
Finding median and mode visuallyPublication-quality graphics
Identifying outliers at a glanceContinuous probability distributions

Copying the Plot for Assignments

Click the copy button to get a plain-text version of your plot that pastes cleanly into word processors, Google Docs, or assignment submissions. The output uses monospace formatting so the leaves align properly. Include the key line (e.g., "1 | 5 = 15") to make the plot self-explanatory.

Where Did the Stem-and-Leaf Plot Come From?

The modern stem-and-leaf plot was introduced by American statistician John Tukey in his 1977 book Exploratory Data Analysis, published by Addison-Wesley. Tukey designed it as a quick pencil-and-paper technique that preserves raw values while revealing shape - a middle ground between a sorted list and a histogram. The American Statistical Association still cites Tukey's EDA framework as the origin of the form, and it remains on GCSE, A-Level, AP Statistics, and IB curricula for this reason: it rewards careful data-handling without needing software. The Australian Bureau of Statistics and the UK's Office for National Statistics both use stem-and-leaf displays in introductory training material for new analysts.

Tukey's wider goal was to push statisticians toward looking at data before fitting models. A stem-and-leaf plot does exactly that: you see every value, spot typos instantly, and notice gaps or clusters that a summary statistic would hide. The Standard Deviation Calculator is a natural next step once you are comfortable with the shape of your dataset.

Common Mistakes Students Make

MistakeWhat Goes WrongFix
Not sorting the leavesMarks lost on exams - leaves must be in ascending order on each rowSort the full dataset first, then transfer to the plot in order
Skipping empty stemsThe distribution shape looks wrong - gaps in the data are invisibleList every stem from min to max, even rows with zero leaves
Forgetting the keyReader cannot tell if "3 | 2" means 32 or 3.2Always include a key line such as "3 | 2 = 32"
Using multi-digit leavesValues like 12 as a leaf break the one-digit convention and confuse the readerRound or truncate so leaves are single digits
Reversing the right side on back-to-backLeaves read inward from the stem - left side is right-to-left, right side is left-to-rightOn the left dataset, smallest leaf sits closest to the stem

Exam boards such as AQA, Edexcel, and the College Board (AP Statistics) all deduct marks for these errors even when the plot is otherwise correct. The ordering convention for back-to-back plots is the trickiest: both sides read outward, so the smallest leaf in each row sits next to the stem.

Handling Decimals and Very Spread Data

Stem-and-leaf plots work best on integers or numbers with one decimal. For decimals, the stem is the whole-number part and the leaf is the tenths digit. For example, 4.2, 4.5, 4.7 give a stem of 4 with leaves 2, 5, 7. The key then reads "4 | 2 = 4.2".

When a dataset spans several orders of magnitude (say, 3 to 3,000), a plain stem-and-leaf plot is the wrong choice - you end up with hundreds of mostly-empty stems. Options include rounding the data to a common scale, using a log transformation before plotting, or switching to a histogram or quartile/percentile breakdown. The Royal Statistical Society's guidance for school teachers recommends capping stem-and-leaf use at about 50 values per dataset - above that the plot becomes harder to read than a histogram.

Using Stem-and-Leaf Plots to Spot Outliers

Outliers stand out clearly on a stem-and-leaf plot: they appear as isolated leaves on stems far from the main cluster. The standard statistical rule, described in NIST's Engineering Statistics Handbook, flags any value more than 1.5 times the interquartile range (IQR) below the first quartile or above the third quartile as a potential outlier. On a stem-and-leaf plot you do not need to calculate anything - you can see the isolated values at a glance.

Worked example: Dataset 14, 15, 17, 18, 21, 22, 23, 24, 25, 89. The 89 sits alone on stem 8 while all other values cluster on stems 1 and 2. Q1 = 17, Q3 = 24, IQR = 7, upper fence = 24 + 1.5 x 7 = 34.5. The value 89 is well above 34.5, confirming it is an outlier worth investigating before running further statistics. For automated detection, the Z-Score Calculator gives a numeric measure of how far each point sits from the mean.

Sources

All processing runs in your browser. No data is sent to any server.

Frequently Asked Questions

What is a stem-and-leaf plot?

A stem-and-leaf plot organizes data by splitting each number into a stem (all digits except the last) and a leaf (the last digit). It shows the distribution shape while preserving the original values, unlike a histogram.

How do I enter my data?

Paste or type numbers separated by commas, spaces, or newlines. The tool automatically parses them and builds the plot. It handles integers and numbers with one decimal place.

What is a back-to-back stem-and-leaf plot?

It puts two datasets on the same stem, with one dataset's leaves going left and the other going right. This makes it easy to compare two groups visually, like test scores from two classes.

What statistics does it show?

The tool shows minimum, maximum, median, mode, range, count, and mean for each dataset. These summary statistics appear below the plot.

Can I copy the plot for my homework?

Yes. Use the copy button to get a plain-text version of the plot that pastes cleanly into documents or assignments. The formatting works well in monospaced fonts.

Link to this tool

Copy this HTML to link to this tool from your website or blog.

<a href="https://toolboxkit.io/tools/stem-and-leaf-plot/" title="Stem and Leaf Plot Generator - Free Online Tool">Try Stem and Leaf Plot Generator on ToolboxKit.io</a>