ForHosting KIT · Math

Stem-and-leaf plot calculator

Seven scores from 12 to 31 become three rows, and stem 2 holds the leaves 1, 3, 3 and 5 for the values in the twenties. Paste your numbers to get an aligned plot with its key, with every value still visible. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon

A stem-and-leaf plot keeps every observation visible while grouping values by place value, so the shape of a sample appears as text instead of as a bar chart that hides the raw digits. This stem-and-leaf plot calculator accepts a list of finite numbers, optionally a positive leaf unit, and returns aligned text rows together with a key that states what a sample stem and leaf mean. Students use it to check homework stemplots; lab instructors use it to produce answer keys; analysts use it when they want the distribution and the actual values in one glance.

How the stem-and-leaf plot is built and how to read the key

A stem-and-leaf plot, also called a stemplot, splits each observation into a stem (the leading place-value digits) and a one-digit leaf (the next place). The last digit of that integer is the leaf; the remaining digits are the stem. With the default unit, 23 becomes stem 2 and leaf 3, and the published key always reads in the form 1 | 2 means 12 times the leaf unit, so a unit of 0.1 yields 1 | 2 means 1.2 and a unit of 10 yields 1 | 2 means 120.

Leaves on the same stem are listed from smallest to largest and repeats are kept, because a stemplot is a display of the sample, not a set of unique digits. Negative observations keep a signed stem, including a distinct -0 stem for values whose magnitude is only a leaf digit, so -5 does not collide with +5. Empty stems between the smallest and largest observed stem are retained so a gap in the data remains a blank row instead of disappearing.

Each row is a text line with stems right-aligned to a common bar, which is the form teachers copy onto a worksheet and the form scripts can log. The response also echoes n, min, max, the leaf unit actually used, a structured stems table, and the full plot as a single newline-joined string. There is no random jitter, no current-date seed, and no network step: the same list and the same unit always produce the same rows.

Where a stem-and-leaf plot belongs in study, labs, and exploratory work

Students meet stem-and-leaf plots when a textbook asks them to keep every exam score visible while still seeing the distribution, when a lab report wants a compact display of repeated measurements, or when they need to check that a chart library did not drop a value because a bin edge was half-open. Teachers can generate answer keys whose rows match the classroom convention of a key plus aligned stems, including the -0 stem that many computer printouts get wrong.

Analysts reach for a stemplot when a histogram would hide the trailing digits they still need, for example a small set of waiting times, plant heights, or quiz marks where the actual numbers matter as much as the shape. Product and operations teams can log the plot string in a ticket or a notebook because the output is deterministic for a given list and unit.

This page is not a histogram, a box plot, or a five-number summary: those tools bin, fence, or reduce the sample, while this one keeps every leaf. Pair it with a histogram when you already want class frequencies, and with a five-number summary when you need quartiles. On this page the work runs entirely in your browser.

Homework and exam stemplots

Turn a textbook series into aligned stem-and-leaf rows with a key, including repeated leaves, so a handwritten plot can be checked without drawing bars.

Lab measurements that must stay visible

Display small samples of times, lengths, or scores as text rows that keep every observation while still showing gaps, clusters, and the shape of the batch.

How does this stem-and-leaf plot calculator split a number?

The key always explains 1 | 2 in that same unit.

What happens if a value is not a number?

Non-numeric tokens, Infinity, and NaN are never coerced to zero, and failed validation is not billed.

How are negative numbers shown?

They keep a signed stem. Values such as -5 appear on a distinct -0 stem so they do not mix with +5 on 0. Empty stems between the lowest and highest stem stay in the plot so gaps remain visible.

How do I choose the leaf unit?

Leave it at 1 for whole numbers, so 23 becomes stem 2 and leaf 3. Use 0.1 for tenths, where 1 | 2 means 1.2, or 10 for tens, where 1 | 2 means 120. The key under the plot always states the unit used.

What happens to stems with no values?

They stay in the plot as blank rows between the smallest and largest stem, so a gap in your data remains visible instead of disappearing from the display.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/stat/stem-and-leaf-plot

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/stat/stem-and-leaf-plot \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data":[12,15,21,23,23,25,31]}'
{
  "data": [
    12,
    15,
    21,
    23,
    23,
    25,
    31
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "stat.stem_and_leaf_plot",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_n10000
max_abs1000000000000000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

If any entry is not a finite number the task fails with invalid_input, so a stray label cannot become a silent zero. The same deterministic algorithm runs free in the browser and through the API at $0.002 per successful call.

How the stem-and-leaf plot is built and how to read the key

This calculator first divides every value by leaf_unit, which defaults to 1, and rounds the quotient to an integer with half-away-from-zero rounding so a classroom example such as 12.5 units becomes 13 units rather than depending on a host rounding mode.

Input contract, non-numeric rejection, and the limits the engine enforces

Each token must be a finite decimal, with an optional sign and optional scientific exponent; empty tokens, booleans, objects, Infinity, and NaN fail. If any element is not a finite number the message names the index, for example data[2], so a stray word in a pasted column is visible instead of becoming a silent zero. Computation is a single parse pass, a scale-and-split pass, a sort of the leaves on each stem, and a format pass that pads stems so the vertical bar lines up. Optional output fields are omitted rather than set to null. The required field is data, an array of finite numbers, with aliases values, numbers, x, and series so notebooks and forms can reuse the same contract. A comma-separated, semicolon-separated, or whitespace-separated string of numbers is also accepted when a text box cannot post a JSON array. The optional field leaf_unit, aliases unit and scale, must be a positive finite number when sent; omitting it selects 1, which is the usual ones-place classroom plot. A non-positive unit, a missing or empty list, a list longer than the published maximum n, a value outside the magnitude ceiling, or a combination of value and unit that would overflow a safe integer stem all raise invalid_input and are not billed. Nothing is stored after the response returns, and failed validation is not charged.

Where a stem-and-leaf plot belongs in study, labs, and exploratory work

Through the API each successful lookup costs $0.002; invalid input is not billed, and the numbers are discarded after the response.

Deterministic plot fixtures

Lock the plot string and the stem table in tests so a notebook, ticket, or answer key cannot drift when a chart default later changes.

What does leaf_unit change?

leaf_unit is the place value of one leaf digit. 1 plots the ones place, 0.1 plots tenths, and 10 plots tens. Omit it to use 1. The returned key states the meaning for the unit actually used.

What does the stem-and-leaf plot calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →