How To Create A Stem And Leaf Plot On Excel

5 min read

Of course. Here is a comprehensive, SEO-optimized article on how to create a stem-and-leaf plot in Excel.


How to Create a Stem-and-Leaf Plot in Excel: A Step-by-Step Guide

A stem-and-leaf plot is a fantastic tool for displaying the shape of a distribution, much like a histogram, but with the unique advantage of retaining the original data values. It’s an excellent way to present numerical data in a structured, easy-to-understand format, perfect for students, analysts, and anyone who works with data. While Excel doesn't have a direct "Stem-and-Leaf Plot" button, you can create one effectively using a combination of formulas and a simple bar chart. This guide will walk you through the process step-by-step, from preparing your data to formatting the final plot.

What is a Stem-and-Leaf Plot and Why Use It?

Before diving into the Excel steps, let's quickly define what this plot is. In a stem-and-leaf plot, each data point is split into a "stem" (the leading digit or digits) and a "leaf" (the final digit). Here's one way to look at it: the number 47 would have a stem of 4 and a leaf of 7.

  • Stem: Represents the tens place (or hundreds, etc., depending on the data).
  • Leaf: Represents the ones place.

The main advantages of this plot are:

  • Preserves Original Data: Unlike a histogram, which groups data into bins, you can see every single data value.
  • Easy to Read: It provides a quick, visual summary of the data's distribution, including its center, spread, and skewness.
  • Identifies Outliers: Individual unusual values stand out clearly.

Step 1: Prepare Your Data in Excel

First, enter your raw data into a single column in Excel. For this example, let's use a list of test scores out of 100.

A (Test Scores)
72
85
91
68
77
88
95
74
82
99
76
84
90
65
79

Step 2: Determine Your Stem and Leaf Split

The key decision is how to split your numbers. For two-digit numbers like our test scores, the most common method is:

  • Stem: The tens digit (e.Plus, g. Which means , 6 for 65, 7 for 72, 8 for 85, 9 for 91). And * Leaf: The ones digit (e. g., 5 for 65, 2 for 72, 5 for 85, 1 for 91).

Short version: it depends. Long version — keep reading.

For data with more digits, you might need to adjust. As an example, for the number 1234, you could use a stem of 123 and a leaf of 4, or a stem of 12 and a leaf of 34, depending on the range of your data and what you want to highlight.

Step 3: Create the Stem Column

In a new column, list all the unique stems in ascending order. For our data, the stems will be 6, 7, 8, and 9.

  • In cell D1, type "Stem".
  • In cell D2, type 6.
  • In cell D3, type 7.
  • In cell D4, type 8.
  • In cell D5, type 9.

Step 4: Create the Leaf Column Using Formulas

This is the core of the process. We will use a formula to collect all the leaves for each stem and list them in a single cell, separated by a space for clarity.

  1. In cell E1, type "Leaves".

  2. In cell E2 (next to the stem '6'), enter the following formula. This formula uses the TEXTJOIN function, which is available in Excel 2019 and Microsoft 365. If you have an older version of Excel, we'll cover an alternative method later.

    =TEXTJOIN(" ", TRUE, IF(($A$2:$A$16/10)=D2, $A$2:$A$16 - (D2*10), ""))

    Let's break down this formula:

    • TEXTJOIN(" ", TRUE, ...): This function joins text strings together. The first argument " " specifies that we want a space between each leaf. TRUE tells it to ignore empty cells.
    • IF(($A$2:$A$16/10)=D2, ...): This is the condition. It checks if the value in the data range divided by 10 (e.g., 65/10 = 6.5) is equal to the stem in cell D2 (which is 6). We are essentially checking if the tens digit matches. Note: This works because 6.5, 6.8, etc., all round down to 6 when compared to the integer 6 in a logical test. A more precise method is to use INT($A$2:$A$16/10)=D2, which is better for exact matching. Let's use the more solid version:
    • Revised Formula: =TEXTJOIN(" ", TRUE, IF(INT($A$2:$A$16/10)=D2, $A$2:$A$16 - (INT($A$2:$A$16/10)*10), ""))
    • INT($A$2:$A$16/10): This part calculates the stem for each value. INT(65/10) gives INT(6.5), which is 6.
    • $A$2:$A$16 - (INT($A$2:$A$16/10)*10): This calculates the leaf. For 65, it's 65 - (6*10) = 65 - 60 = 5.
    • "": If the condition is not met, it returns an empty string, which TEXTJOIN will ignore.
  3. Enter this formula as an array formula. In older versions of Excel (pre-365), you must press Ctrl + Shift + Enter instead of just Enter. Excel will automatically place curly braces {} around the formula to show it's an array formula. In Excel 365 or 2019, you can simply press Enter Turns out it matters..

  4. Copy this formula down from cell E2 to E3, E4, and E5. You should now see the leaves for each stem.

Your sheet should now look something like this:

Stem Leaves
6 5 8
7 2 4 6 7 9
8 2 4 5 8
9 0 1 5 9

And yeah — that's actually more nuanced than it sounds.

Step 5: Create the Stem-and-Leaf Plot Using a Bar Chart

Now we'll use a bar chart to create the visual representation.

  1. Select the range containing your stems and leaves
Brand New

Hot and Fresh

Others Liked

More to Chew On

Thank you for reading about How To Create A Stem And Leaf Plot On Excel. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home