Stem and Leaf Plot Calculator
Free stem-and-leaf plot calculator. Create stem-and-leaf displays, back-to-back plots, split stems.
Why This Statistical Analysis Matters
Why: Statistical calculator for analysis.
How: Enter inputs and compute results.
Stem-and-Leaf Display โ Preserve Every Value with Back-to-Back Comparison
Organize data by stems and leaves. See distribution shape, compare two groups with back-to-back, and compute summary statistics.
Real-World Scenarios โ Click to Load
Inputs
Stem-and-Leaf Plot
Key: 5|2 means 52
Frequency by Stem
Dataset 1 (n=20)
For educational and informational purposes only. Verify with a qualified professional.
Key Takeaways
- Stem-and-leaf displays show distribution while preserving every original value
- Stem = leading digits; Leaf = last digit. 5|2 means 52 (or 5.2 with key)
- Split stems: each stem twice โ leaves 0โ4, then 5โ9 for finer resolution
- Back-to-back: two datasets share stems; Group A leaves left, Group B right
- Summary: min, Q1, median, Q3, max, range, IQR, mean, SD
- Shape: symmetric, left-skewed, right-skewed, bimodal
- For decimals: round to int, or multiply by 10/100 and note the key
Did You Know?
How Stem-and-Leaf Works
1. Stem
All digits except the last. For 52, stem = 5. For 123, stem = 12.
2. Leaf
Last digit only. For 52, leaf = 2. Sorted left to right.
3. Split stems
Each stem appears twice: first for leaves 0โ4, then for 5โ9.
4. Back-to-back
Two datasets share stems. Group A leaves on left (reversed), Group B on right.
5. Key
Always include: e.g., "5|2 means 52" or "10|3 means 10.3" for decimals.
Expert Tips
Decimal data
Multiply by 10 or 100, build plot, then add key: 10|3 = 10.3
Too few stems
Use split stems to get more resolution.
Too many stems
Round data or use fewer significant digits.
Comparing groups
Back-to-back stem-and-leaf is ideal for side-by-side comparison.
Shape Analysis
| Shape | Description |
|---|---|
| Symmetric | Mean โ median. Bell-like. Leaves balanced on both sides of stem. |
| Right-skewed | Long tail right. Mean > median. Common for income, house prices. |
| Left-skewed | Long tail left. Mean < median. Less common. |
| Bimodal | Two peaks. May indicate two subgroups. |
Frequently Asked Questions
What is a stem-and-leaf plot?
A display that organizes data by splitting each value into a stem (leading digits) and a leaf (last digit). Preserves all values while showing distribution.
When to use split stems?
When data is clustered and you need finer resolution. Each stem appears twice: 0โ4 and 5โ9.
How do I handle decimals?
Multiply by 10 or 100 to make integers, build the plot, then add a key (e.g., 10|3 = 10.3).
What is back-to-back stem-and-leaf?
Two datasets share the same stems. One group's leaves go on the left (reversed), the other on the right. Great for comparing groups.
Stem-and-leaf vs histogram?
Stem-and-leaf preserves exact values; histogram bins and loses detail. Stem-and-leaf is better for small datasets.
Can I use stem-and-leaf for negative numbers?
Yes. Use a separate stem for negative values (e.g., -5, -4) or a split display. Some software handles this automatically.
What if I have too many leaves on one stem?
Use split stems to spread them across two rows (0โ4 and 5โ9), or round/truncate data to reduce precision.
Summary Statistics
Worked Example
For data: 52, 58, 62, 65, 68, 70, 72, 74, 75, 76, 78, 80, 82, 84, 85, 86, 88, 90 (test scores)
Stem-and-leaf:
5 | 2 8 6 | 2 5 8 7 | 0 2 4 5 6 8 8 | 0 2 4 5 6 8 9 | 0
Key: 7|4 means 74
Min: 52, Max: 90, Range: 38
Median: (75+76)/2 = 75.5 (middle two values)
Shape: Roughly symmetric; mean โ median
Stem-and-Leaf vs Other Displays
| Feature | Stem-and-leaf | Histogram | Box plot | Dot plot |
|---|---|---|---|---|
| Preserves exact values | โ | โ | โ | โ |
| Shows distribution shape | โ | โ | โ ๏ธ | โ |
| No software needed | โ | โ ๏ธ | โ ๏ธ | โ ๏ธ |
| Back-to-back comparison | โ | โ | โ | โ ๏ธ |
| Best for small n | โ | โ ๏ธ | โ | โ |
| Quick to construct | โ | โ | โ | โ |
Constructing by Hand
- List all values and identify the range (min to max).
- Choose stem: typically tens digit. For 52โ98, stems are 5, 6, 7, 8, 9.
- For each value, write the leaf (ones digit) next to its stem.
- Sort leaves within each stem (ascending).
- For back-to-back: put Group A leaves on the left (reversed), Group B on the right.
- Add a key: e.g., "7|4 means 74" or "10|3 means 10.3" for decimals.
Decimal Data Examples
One decimal place (e.g., 10.2, 10.3, 10.5)
Multiply by 10: 102, 103, 105. Stem=10, leaves=2,3,5. Key: 10|2 means 10.2
Two decimal places (e.g., 1.23, 1.45, 1.67)
Multiply by 100: 123, 145, 167. Stem=12,13,14,15,16. Key: 12|3 means 1.23
Rounding
Alternatively, round to nearest integer. 10.2โ10, 10.5โ11. Simpler but loses precision.
Interpreting the Plot
- Concentration: Many leaves on one stem โ data clustered in that range.
- Spread: Leaves spread across many stems โ wide distribution.
- Gaps: Empty stems between non-empty ones โ possible outliers or natural gaps.
- Skewness: Long tail of leaves on one side โ skewed distribution.
- Bimodality: Two distinct clusters of stems with many leaves โ bimodal.
- Outliers: Isolated stems with few leaves far from the main cluster.
R and Python Equivalents
# R: stem()
stem(data)
# With scale for decimals
stem(data, scale = 0.5)
# Python: no built-in stem-and-leaf; use pandas/statsmodels or custom
from statsmodels.graphics.api import stem_graph
# Or manual: stems = [int(x//10) for x in data], leaves = [int(x%10) for x in data]
Best Practices
- Always include a key so readers know how to interpret stem|leaf.
- Sort leaves within each stem for easier reading and pattern recognition.
- For back-to-back, use consistent stem ranges; pad with empty cells if needed.
- Choose stem width to get 5โ20 stems; too few or too many reduces usefulness.
- For presentation, consider truncating very long leaf rows or using split stems.
- Report n (sample size) alongside the plot.
Common Mistakes to Avoid
When to Use Stem-and-Leaf
Stem-and-leaf is ideal when:
- You have a small to moderate dataset (roughly 15โ150 values).
- You need to preserve exact values (no binning).
- You want a quick, hand-drawn display without software.
- You are comparing two groups (back-to-back).
- Data are integers or easily converted (ร10, ร100 for decimals).
For very large datasets (500+), consider a histogram instead.
Split Stems Explained
With split stems, each stem appears twice:
- 5* (or first row): leaves 0, 1, 2, 3, 4
- 5. (or second row): leaves 5, 6, 7, 8, 9
This doubles the number of stems and gives finer resolution when data are clustered (e.g., many values in the 50s).
Frequency Bar Chart
The frequency-by-stem bar chart shows how many values fall in each stem. It complements the stem-and-leaf by giving a quick visual of the distribution shape.
Tall bars indicate stems with many leaves. Use it to spot peaks (modes), gaps (empty stems), and overall spread at a glance. The bar chart is useful when presenting to audiences who may find the stem-and-leaf less familiar.
Keyboard & Usage Tips
- Paste data from Excel or CSV โ comma or space separated values work.
- Use the comparison preset for back-to-back; enter two datasets.
- Toggle split stems when data are clustered in a narrow range.
- For decimals, select ร10 or ร100 and update the key description.
History & Pedagogy
John Tukey introduced stem-and-leaf displays in his 1977 book Exploratory Data Analysis. The technique was designed for hand computation and quick insight โ no computer required.
Today it remains a staple in introductory statistics courses because it preserves data, reveals shape, and teaches place value. Many textbooks use it before introducing histograms. The back-to-back variant is especially useful for comparing two groups (e.g., treatment vs control, before vs after) in a compact format.
Summary Statistics Formulas
Mean: xฬ = (1/n) ฮฃxแตข
Median: middle value when sorted (or average of two middle values)
Q1, Q3: 25th and 75th percentiles
IQR = Q3 โ Q1
SD: s = โ[ฮฃ(xแตข โ xฬ)ยฒ / (nโ1)]
These are computed from your data and displayed in the summary statistics panel.
Official Sources
Disclaimer: Stem-and-leaf works best with integer or rounded data. For many decimal places, consider multiplying by 10 or 100 and noting the key. This tool is for educational and professional reference.
Related Calculators
Box Plot Calculator
Generate box-and-whisker plots from data. Quartiles, IQR, fences, outlier detection with Tukey method.
StatisticsOutlier Calculator
Detect outliers using IQR (Tukey), Z-score, Modified Z-score (MAD), Grubbs' test, and Dixon's Q test. Highlights which points are outliers.
StatisticsFive Number Summary Calculator
Compute the five-number summary (Min, Q1, Median, Q3, Max) from raw data. Includes IQR, fences, range, outlier detection, and box plot visualization.
StatisticsUpper and Lower Fence Calculator
Dedicated fence calculator for outlier boundaries. Computes inner and outer fences using IQR method with customizable multiplier.
StatisticsIQR Calculator (Interquartile Range)
Compute Q1, Q2, Q3, IQR. Identify outliers using 1.5รIQR and 3รIQR rules. Shows fences and modified box plot data.
StatisticsFrequency Polygon Calculator
Create frequency polygons from grouped data. Plots midpoints vs frequencies. Supports overlaying multiple datasets for comparison. Raw data or frequency...
Statistics