Stem-and-Leaf Plot Calculator & Cohort Display

Paste one or two groups of observations and display them on shared stems. Read decimals and negative values without losing digits, split crowded stems, and see gaps without creating hundreds of empty rows.

Exploratory data worksheet

Compare groups with a stem-and-leaf plot

16 observations shown across 4 shared stems.
Edit observations and leaf unit

Paste observations separated by commas, spaces, tabs or newlines. Use the same measurement unit for both groups.

Group A

12.95

Median of 8 observations

Minimum 12.1 · maximum 15.1

Group B

14.35

Median of 8 observations

Minimum 12.8 · maximum 15.8

One row per populated stem

Back-to-back stem-and-leaf plot

Key · 1 | 2 means 1.2. −0 | 2 means -0.2.

Read Group A from the stem toward the left and Group B toward the right.

Observed values in numerical stem order
Group AStemGroup B
12
13
14
15

Read the values in one row

Group A · 4 values

12.1, 12.3, 12.3, 12.8

Group B · 1 value

12.8

Export all observations and empty stems

How to use this calculator

  1. Paste observations for Group A and optionally Group B. Use the same measurement units.
  2. Choose a leaf unit small enough to retain every digit.
  3. Use the shared stem to compare both groups and turn on Split stems for crowded rows.
  4. Select a row to inspect original readings, or export all observations and empty-stem ranges.

The Formula

The mathematical logic powering this calculation is:

Choose a leaf unit u from 100, 10, 1, 0.1, 0.01 or 0.001. Divide each observation by u to obtain an integer n. The stem contains all except the last digit of the absolute integer, and its sign is negative for negative n. The leaf is the remaining digit. A negative integer with magnitude less than 10 uses the stem −0, while numeric zero uses the stem 0. The signed combination of stem and leaf times u reconstructs the original value. Choose a finer unit when any observation would lose digits.

Both groups share the same ordered stems. Individual leaves in each group retain duplicates and run in numeric order outward from the stem. In split mode, leaves 0–4 and 5–9 occupy separate rows for each populated stem. Negative stems place the 5–9 row before 0–4 to preserve numeric order. Consecutive empty whole stems become one gap row with their count and endpoints.

Enter 1–120 observations in Group A and optionally 1–120 in Group B. Numbers range from −1,000,000 through 1,000,000 with up to three decimals. Pasted values accept commas, semicolons, tabs, spaces and line breaks. The calculation stores thousandths as integers. The median is the middle value, or the average of the two middle values for an even count. Use one measurement unit and scale across both groups.

Worked Example

If you input:

  • Group A: 12.1, 12.3, 12.3, 12.8, 13.1, 13.4, 13.9, 15.1
  • Group B: 12.8, 13, 13.5, 14.2, 14.5, 15.2, 15.8, 15.8
  • Leaf unit: 0.1

Result:

All 16 observations appear on four shared stems. Group A has median 12.95 and Group B has median 14.35. The two Group A readings of 12.3 appear as two leaves labeled 3 on stem 12.

Frequently Asked Questions

How do I read a stem and leaf plot?

Use its key to combine stem and leaf. With a leaf unit of 0.1, stem 1 and leaf 2 give 1.2. With a leaf unit of 1, the same digits give 12.

Can a stem-and-leaf plot show negative decimals?

Yes. The minus sign applies to the entire value. With a leaf unit of 0.01, a −0 stem and leaf 7 give −0.07.

What happens to repeated values?

Each observation contributes a leaf. Two identical values appear as two leaves on the same row.

When should I split stems?

A split places digits 0–4 and 5–9 on separate rows. It can make concentrations easier to see when a stem has many leaves.

What do empty-stem rows mean?

They count consecutive stems with zero readings in either group. The range stays visible in the table and CSV without an individual row for each empty stem.

Similar Calculators