How to Find Range in Math – Real-Life Examples & Zero-Stress Steps

Find the range of a data set and test how edits to the endpoints affect the result.

Quick Answer

In statistics, range is a measure of dispersion that tells you the difference between the largest and smallest values in a data set.

Number tiles arranged in order with highlighted endpoints

How to Find Range in Math Tool

What is Range?

In statistics, range is a measure of dispersion that tells you the difference between the largest and smallest values in a data set.

Range = Maximum Value − Minimum Value

Enter 1 to 1,000 numbers separated by commas. Use a dot for decimals; scientific notation such as 1e-6 is supported. Do not include units or thousands separators. One value, or all equal values, gives a range of 0. Calculations use approximate floating-point arithmetic; results are usually shown to 12 significant digits. Extremely close values may exceed this calculator’s precision.

Examples

Example 1: For the data set 10, 15, 8, 12, 20

  • Maximum value = 20
  • Minimum value = 8
  • Range = 20 - 8 = 12

Example 2: For the data set -5, 0, -10, 5, -2

  • Maximum value = 5
  • Minimum value = -10
  • Range = 5 - (-10) = 15

The statistical range measures the spread from the smallest observation to the largest: maximum minus minimum. It is one number, not the whole number line. This lesson concerns a dataset’s range; the range of a function means its set of output values.

Speed-Run Cheat Sheet

Need it now? Do this
Formula Range = Highest value – Lowest value
Mental check The range is never negative. It can exceed every data value: −9, −4, −1 has range 8. If all values are equal, the range is 0.
Works for… Whole numbers, negatives, decimals, even cricket scores.

Why Bother? A Tiny Story

Imagine coffee spending of $2, $5 and $0 on three days. The range is $5 − $0 = $5.
This tells you the gap between the highest and lowest daily spending, not the average spending. Include a genuine $0 observation; do not replace a missing observation with zero.


Step-by-Step Walk-Through ♂

  1. List Your Data
    Example: 14, 18, 21, 12, 17
    (Tip: sorting is optional but makes the extremes easier to spot.)

  2. Spot the Extremes

    • Lowest (min): 12

    • Highest (max): 21

  3. Subtract
    Range = 21 – 12 = 9

That’s it. No quadratic drama, no calculator meltdown.


Quick Visual

Think of a number line: mark the minimum and maximum. The range is the distance between those two marks, measured in the same units as the data.


Watch-Out #1: Negative Numbers

Data: −4, −1, −9

  • Max = −1

  • Min = −9
    Range = −1 – (−9) = 8

Subtracting a negative = adding a positive. Your wallet will thank you later.


Watch-Out #2: Outliers

Imagine daily steps: 4 k, 5 k, 4.5 k, 19 k (crazy hike)
Range = 19 k – 4 k = 15 k.
Here k means 1,000 steps, so the range is 15,000 steps. This describes the full spread of these four observations, not a typical daily difference. An extreme value can strongly affect the range. The interquartile range (IQR = Q3 − Q1) describes the middle 50% and is less sensitive to extremes; state the quartile convention when calculating it.


Real-World Examples

Scenario Data Snippet Range So What?
Illustrative player heights (cm) 188, 203, 211, 206 211 – 188 = 23 cm The tallest player is 23 cm taller than the shortest; range alone cannot predict team performance.
Illustrative temperatures (°C) 16, 18, 21, 29 29 – 16 = 13 °C The highest observation is 13 °C above the lowest.
Illustrative pizza prices ($) 1, 2.75, 5, 7 7 – 1 = $6 The highest listed price exceeds the lowest by $6.

Common “Math Panic” Questions

Q: Do I need algebra?
A: Nope—subtraction rules the day.

Q: How big is too big a range?
A: It depends on the units, scale, purpose and number of observations. There is no universal cutoff for a “large” range.

Q: Can Excel do it?
A: Type =MAX(A1:A10)-MIN(A1:A10) for a range containing numerical observations. Check that the intended values are stored as numbers; an empty dataset has no defined range.


Nerdy Deep Dive (Optional, Promise)

  • Population Range vs. Sample Range – Both use maximum minus minimum. A sample describes only its observed values and may miss the population extremes. A one-value dataset has range 0; an empty dataset has no maximum or minimum.

  • Mid-Range – (Minimum + maximum) ÷ 2. This measures a midpoint, not spread, and is generally different from the mean of all observations.

  • Range Rule of Thumb – Standard deviation ≈ range ÷ 4 is only a rough heuristic under suitable distribution and sample-size assumptions, not a general formula. Compute standard deviation from the full data when accuracy matters.


My 60-Second Challenge

Choose five numerical observations of the same quantity and in the same units. Find their minimum, maximum and range. Check your method with −9, −4, −1, 0, 5: the range is 5 − (−9) = 14. Then add 3 to every value; the range stays 14. Why? Both extremes increased by the same amount.

The range describes the gap between the extremes; it does not describe how all the observations are distributed.

Advertisement

Predict the effect of editing the data before recalculating

Enter the temperatures negative four, negative one, three and eight in degrees Celsius. The distance from negative four up to zero is four degrees and the distance from zero to eight is another eight. The range is twelve degrees. Replace the interior value three by six. The maximum and minimum remain eight and negative four, so the range stays twelve. Now replace eight by six. The maximum becomes six and the range drops to ten. This experiment separates a change to the data from a change to the particular summary you are measuring.

The Range

Our first measure of dispersion is the range, or the difference between the maximum and minimum values in the set. It’s the measure we used in the standardized test example above.
Let’s look at a couple of examples.

Finding the Range

You survey some of your friends to find out how many hours they work each week. Their responses are: 5, 20, 8, 10, 35, 12. What is the range?
Solution
The maximum value in the set is 35 and the minimum is 5, so the range is 35-5=30.
For large datasets, finding the maximum and minimum values can be daunting. There are two ways to do it in a spreadsheet. First, you can ask the spreadsheet program to sort the data from smallest to largest, then find the first and last numbers on the sorted list. The second method uses built-in functions to find the minimum and maximum.
In either method, once you’ve found the maximum and minimum, all you have to do is subtract to find the range.

Finding the Range with Google Sheets

The data in “AvgSAT” contains the average SAT score for students attending every institution of higher learning in the US for which data is available. What is the range of these average SAT scores?
Solution
Step 1: To find the maximum, click on an empty cell in the spreadsheet, type “=MAX(”, and then click on the letter that marks the top of the column containing the AvgSAT data. That inserts a reference to the column into our function. Then we close the parentheses and hit the enter key. The formula is replaced with the maximum value in our data: 1566. Step 2: Using the same process (but with “MIN” instead of “MAX”), we find the minimum value is 785. Step 3: So, the range is 1566-785=781.
The range is very easy to compute, but it depends only on two of the data values in the entire set. If there happens to be just one unusually high or low data value, then the range might give a distorted measure of dispersion. Our next measure takes every single data value into account, making it more reliable.

The Standard Deviation

The standard deviation is a measure of dispersion that can be interpreted as approximately the average distance of every data value from the mean. (This distance from the mean is the “deviation” in “standard deviation.”)
To compute the standard deviation using the formula, we follow the steps below:
  1. Compute the mean of all the data values.
  2. Subtract the mean from each data value.
  3. Square those differences.
  4. Add up the results in step 3.
  5. Divide the result in step 4 by n-1
  6. Take the square root of the result in step 5.
Let’s see that process in action.

Computing the Standard Deviation

You surveyed some of your friends to find out how many hours they work each week. Their responses were: 5, 20, 8, 10, 35, 12. What is the standard deviation?
Solution
Let’s follow the six steps mentioned previously to compute the standard deviation.
Step 1: Find the mean: x¯=5+20+8+10+35+126=15.
Step 2: Subtract the mean from each data value. To help keep track, let’s do this in a table. In the first row, we’ll list each of our data values (and we’ll label the row x); in the second, we’ll subtract x¯=15 from each data value.
x 5 20 8 10 35 12
x−x¯ −10 5 –7 –5 20 –3
Step 3: Square the differences. Let’s add a row to our table for those values:
x 5 20 8 10 35 12
x−x¯ −10 5 –7 –5 20 –3
(x−x¯)2 100 25 49 25 400 9
Step 4: Add up those squares: 100 + 25 + 49 + 25 + 400 + 9 = 608.
Step 5: Divide the sum by n-1. Since we have 6 data values, that gives us 6086-1=121.6.
Step 6: Take the square root of the result: 121.6≈11.027.
Thus, the standard deviation is s≈11.027.
The computation for the standard deviation is complicated, even for just a small dataset. We’d never want to compute it without technology for a large dataset! Luckily, technology makes this calculation easy.

Finding the Standard Deviation with Google Sheets

The data in “AvgSAT” contains the average SAT score for students attending every institution of higher learning in the US for which data is available. What is the standard deviation of these average SAT scores?
Solution
To find the standard deviation, we click in an empty cell in our spreadsheet and then type “=STDEV(”. Next, click on the letter at the top of the column containing our data; this will put a reference to that column into our formula. Then close the parentheses with and hit the enter key. The formula is replaced with the result: 125.517.

The Mode

In our discussion of average heights, the first possible definition we offered was the height that more people share than any other. This is the mode, or the value that appears most often. If there are two modes, the data are bimodal.
Let’s look at some examples.

Finding the Mode Using a Stem-and-Leaf Plot

In source illustration or discussion, we looked at a stem-and-leaf plot of the sale prices (in dollars) of a particular collectible trading card:
0 5 8 9
1 0 0 0 3 4 4 5 5 5 5 6 9 9
2 0 0 0 0 5 5 9 9
3 0 0 0 5 5
4 0 0 5
5
6 0
What is the mode price?
Solution
The mode is the price that appears most often. Both 15 and 20 appear 4 times, more than any other values. So, they are the modes (and we can conclude that this set of data is bimodal).
When we have a complete list of the data or a stem-and-leaf plot, it’s pretty straightforward to find the mode; we just need to find the number that appears most often. If we’re given a frequency distribution instead, the technique is different (but just as straightforward): we’re looking for the number with the highest frequency.

Finding the Mode Using a Frequency Distribution

In source illustration or discussion, we created a frequency distribution of the number of siblings of conflict resolution class attendees.
Number of Siblings Frequency
0 5
1 13
2 6
3 3
4 2
5 1
What is the mode of the number of siblings?
Solution
The mode is the value that appears the most often, which means it has the greatest frequency. Thirteen of the respondents have one sibling, more than any other number. So, the mode is 1.
What happens if there is no number in the data that appears more than once? In that case, by our definition, every data value is a mode. But according to some other definitions, the data would have no mode. In practice, though, it doesn’t really matter; if no data value appears more than once, then the mode is not helpful at all as a measure of centrality.

The Median

Let's revisit our example of trying to identify the height of the “average” person. If we lined everyone up in order by height and found the person right in the middle, that person’s height is called the median, or the value that is greater than no more than half and less than no more than half of the values.
Let’s look at a really simple example. Consider the following list of numbers: 11, 12, 13, 13, 14. Is the first number on the list, 11, the median? There are no values less than 11 (that’s 0%), and there are four values greater than 11 (that’s 80%). Since more than 50% of the data are greater than 11, the definition is violated; it’s not the median. Here’s a chart with the rest of the data, with red shading to show where the definition is violated:
Data Value Number of Values Below Percentage of Values Below Number of Values Above Percentage of Values Above
11 0 0% 4 80%
12 1 20% 3 60%
13 2 40% 1 20%
14 4 80% 0 0%
Only 13 has no violations, so it’s the median according to the definition. In practice, we find the median just like we described in the average height example: by lining up all the data values in order from smallest to largest and picking the value in the middle. For our easy example (with data values 11, 12, 13, 13, 14), that first 13 is right in the middle; there are two values to the left and two values to the right. If there’s not one value right in the middle, we pick the two closest, then choose the number exactly between them. For example, let’s say we have the data 41, 44, 46, 53. Since there are an even number of data values in our list, we can’t pick the one right in the middle. The two closest to the middle are 44 and 46, so we’ll choose the number halfway between those to be the median: 45. As this example shows, the median (unlike the mode) doesn’t have to be a number in our original set of data.
In the examples we’ve looked at so far, it’s been pretty easy to identify which number is right in the middle. If we had a very large dataset, though, it might be harder. Fortunately, we have some formulas to help us with that.
Let’s put those formulas to work in an example.

Finding the Median Using a Stem-and-Leaf Plot

In worked example, we looked at a stem-and-leaf plot that contained 33 sale prices (in dollars) of a particular collectible trading card:
0 5 8 9
1 0 0 0 3 4 4 5 5 5 5 6 9 9
2 0 0 0 0 5 5 9 9
3 0 0 0 5 5
4 0 0 5
5
6 0
What is the median price?
Solution
Step 1: Since 33 is odd, the median is the data value at position n+12, where n is the number of values in the dataset. There are 33 total values, so our formula becomes 33+12=17. That means we want to look for the 17th number in the dataset.
Step 2: We'll want to count from the lowest value to the 17th number. We can use our stem and leaf plot to do this.
1 2 3
0 5 8 9
4 5 6 7 8 9 10 11 12 13 14 15 16
1 0 0 0 3 4 4 5 5 5 5 6 9 9
17
2 0 0 0 0 5 5 9 9
3 0 0 0 5 5
4 0 0 5
5
6 0
The seventeenth number is 20, so the median is 20.
Now, let’s tackle an example with an even number of values.

Finding the Median

In source illustration or discussion, we looked at the number of times different crickets (of differing species, genders, etc.) chirped in a one-minute span. That data is again provided below:
89 97 82 102 84 99
115 105 89 109 107 89
101 109 116 103 100 91
93 103 120 91 85 104
104 82 106 92 104 106
Find the median.
Solution
Step 1: In order to find the median, we first need to sort the data so that they’re in order, smallest to largest:
82 82 84 85 89 89
89 91 91 92 93 97
99 100 101 102 103 103
104 104 104 105 106 106
107 109 109 115 116 120
Step 2: Next, we figure out how many data values we have. Counting them up, we see there are 30, which is even.
Step 3: Since we have an even number of data values, we need to find the values in positions 302=15 and 302+1=16. These are 101 and 102.
Step 4: We use the formula to compute the median: 101+1022=101.5.

Finding the Median Using a Frequency Distribution

In worked example, we created a frequency distribution of the number of siblings of the people who attended a conflict resolution class. Let's review that data again:
Number of Siblings Frequency
0 5
1 13
2 6
3 3
4 2
5 1
What is the median of the number of siblings?
Solution
There are 30 data values total, so the median is between the 15th and 16th values in the ordered list. There are five 0s and thirteen 1s according to the frequency distribution, so items one through five are all 0s and items six through eighteen are all 1s. Since both items fifteen and sixteen are 1s, the median is 1.

The Mean

Recall our example of ways we could identify the “average” height of an individual. The last method we discussed was also the most complicated. It involved a game where the player guesses a height, then figures out how far off that guess is from every single person’s height. Those differences get squared and added together to get a score. Our next measure of centrality gives the lowest possible score: No other guess would beat it in the game. Given a dataset containing n total values, the mean of the dataset is the sum of all the data values, divided by n.
This is a computation you have likely done before. In many places, including spreadsheet programs like Microsoft Excel and Google Sheets, this number is called the average. For statisticians, though, the word average has too many possible meanings, so they prefer the one we’ll use: mean.

Finding the Mean

Compute the mean of the numbers 12, 15, 17, 18, 18, and 19.
Solution
The mean is the sum of the values, divided by the number of values on the list. So, we get:
12+15+17+18+18+196=996=16.5.

Finding the Mean Using a Frequency Distribution

Refer again to the frequency distribution of the number of siblings people who attended a conflict resolution class reported:
Number of Siblings Frequency
0 5
1 13
2 6
3 3
4 2
5 1
What is the mean of the number of siblings?
Solution
Step 1: We compute the mean by adding up all the data values and then dividing by the number of data values on the list.
Step 2: Adding up the frequencies, we get 5+13+6+3+2+1=30 data values in our list.
Step 3: Now, to find the sum of all the data values, we could simply reconstruct the raw data and add up all the numbers there. But, there’s an easier way: Remember that repeatedly adding a number to itself is the definition of multiplication. So, for example, since there are six 2s in our data, the sum of all those 2s must be 6×2=12.
Step 4: Let’s add a column to our distribution for these products:
Number of Siblings Frequency (Number of Siblings) × (Frequency)
0 5 0
1 13 13
2 6 12
3 3 9
4 2 8
5 1 5
Step 5: So, the sum of all our data values is 0+13+12+9+8+5=47. The mean is 4730≈1.567.
As the number of data values we are considering grows, the computation for the mean gets more and more complicated. That’s why people generally trust technology to perform that computation.
Note that a recent update to Google Sheets introduced a new function called “MODE.MULT,” which will find every mode (not just the first one on the list).

Using Google Sheets to Compute Measures of Centrality

The dataset "InState" contains the in-state tuitions of every college and university in the country that reported that data to the Department of Education. Find the mode, median, and mean of those in-state tuition values.
Solution
Step 1: To find the mode, we select an empty cell type “=MODE(”, click on the header of the column to insert a reference to the column into our formula, and then close the parentheses. When we hit the enter key, our formula is replaced with the mode: $13,380.
Step 2: We can find the median and mean using the same process, except using the functions “MEDIAN” and “AVERAGE” in place of “MODE”. We find that the median is $11,207 and the mean is $15,476.79.

Visualizing Quantitative Data

There are several good ways to visualize quantitative data. In this section, we’ll talk about two types: stem-and-leaf plots and histograms.

Stem-and-Leaf Plots

Stem-and-leaf plots are visualization tools that fall somewhere between a list of all the raw data and a graph. A stem-and-leaf plot consists of a list of stems on the left and the corresponding leaves on the right, separated by a line. The stems are the numbers that make up the data only up to the next-to-last digit, and the leaves are the final digits. There is one leaf for every data value (which means that leaves may be repeated), and the leaves should be evenly spaced across all stems. These plots are really nothing more than a fancy way of listing out all the raw data; as a result, they shouldn’t be used to visualize large datasets.
This concept can be difficult to understand without referencing an example, so let’s first look at how to read a stem-and-leaf plot.

Reading a Stem-and-Leaf Plot

A collector of trading cards records the sale prices (in dollars) of a particular card on an online auction site, and puts the results in a stem-and-leaf plot:
0 5 8 9
1 0 0 0 3 4 4 5 5 5 5 6 9 9
2 0 0 0 0 5 5 9 9
3 0 0 0 5 5
4 0 0 5
5
6 0
Answer the following questions about the data:
  1. How many prices are represented?
  2. What prices represent the five most expensive cards? The five least expensive?
  3. What is the full set of data?
Solution
  1. Each leaf (the numbers on the right side of the bar) represents one data value. So, on the first row (which looks like 0 | 5 8 9), there are three data values (one for each leaf: 5, 8, and 9). The next row has thirteen leaves, then eight, five, three, zero, and one. Adding those up, we get 3+13+8+5+3+0+1=33 data points or prices.
  2. The most expensive card is the last one listed. Its stem is 6 and its leaf is 0, so the price is $60. There are no leaves associated with the 5 stem, so there were no cards sold for $50 to $59. The next most expensive cards are then on the 4 stem: $45, $40, and $40 (remember, repeated leaves mean repeated values in the dataset). So, we have our four most expensive cards. The fifth would be on the next stem up. The biggest leaf on the 3 stem is a 5, so the fifth-most expensive card sold for $35. As for the five least-expensive cards, the smallest stem is 0, with leaves 5, 8, and 9. So, the three least expensive cards sold for $5, $8, and $9 (notice that we don’t write down that leading 0 from the stem in the tens place). The next two least-expensive cards will be the two smallest leaves on the next stem: $10 and $10.
  3. The full list of data is: 5, 8, 9, 10, 10, 10, 13, 14, 14, 15, 15, 15, 15, 16, 19, 19, 20, 20, 20, 24, 25, 25, 29, 29, 30, 30, 30, 35, 35, 40, 40, 45, 60.
Stem-and-leaf plots are useful in that they give us a sense of the shape of the data. Are the data evenly spread out over the stems, or are some stems “heavier” with leaves? Are the heavy stems on the low side, the high side, or somewhere in the middle? These are questions about the distribution of the data, or how the data are spread out over the range of possible values.
Some words we use to describe distributions are uniform (data are equally distributed across the range), symmetric (data are bunched up in the middle, then taper off in the same way above and below the middle), left-skewed (data are bunched up at the high end or larger values, and taper off toward the low end or smaller values), and right-skewed (data are bunched up at the low end, and taper off toward the high end). See below figures.
Four histograms. The first histogram is titled, Uniform. The horizontal axis ranges from 0 to 5, in increments of 1. The vertical axis ranges from 0 to 60, in increments of 10. The histogram infers the following data. 0 to 1: 38. 1 to 2: 35. 2 to 3: 51. 3 to 4: 39. 4 to 5: 37. The second histogram is titled, Right-skewed. The horizontal axis ranges from 1 to 21, in increments of 2. The vertical axis ranges from 0 to 50, in increments of 10. The histogram infers the following data. 1 to 3: 18. 3 to 5: 40. 5 to 7: 44. 7 to 9: 37. 9 to 11: 29. 11 to 13: 14. 13 to 15: 8. 15 to 17: 5. 17 to 19: 3. 19 to 21: 2. The third histogram is titled, Left-skewed. The horizontal axis ranges from 30 to 50, in increments of 2. The vertical axis ranges from 0 to 60, in increments of 10. The histogram infers the following data. 30 to 32: 3. 32 to 34: 1. 34 to 36: 6. 36 to 38: 11. 38 to 40: 13. 40 to 42: 31. 42 to 44: 39. 44 to 46: 52. 46 to 48: 35. 48 to 50: 8. The fourth histogram is titled, Symmetric. The horizontal axis ranges from 30 to 180, in increments of 15. The vertical axis ranges from 0 to 80, in increments of 10. The histogram infers the following data. 30 to 45: 2. 45 to 60: 7. 60 to 75: 20. 75 to 90: 31. 90 to 105: 70. 105 to 120: 30. 120 to 135: 29. 135 to 150: 10. 150 to 165: 2. 165 to 180: 1. Note: all values are approximate.
Looking back at the stem-and-leaf plot in the previous example, we can see that the data are bunched up at the low end and taper off toward the high end; that set of data is right-skewed. Knowing the distribution of a set of data gives us useful information about the property that the data are measuring.
Now that we have a better idea of how to read a stem-and-leaf plot, we’re ready to create our own.

Constructing a Stem-and-Leaf Plot

An entomologist studying crickets recorded the number of times different crickets (of differing species, genders, etc.) chirped in a one-minute span. The raw data are as follows:
89 97 82 102 84 99 93 103 120 91
115 105 89 109 107 89 104 82 106 92
101 109 116 103 100 91 85 104 104 106
Construct a stem-and-leaf plot to visualize these results.
Solution
Step 1: Before we can create the plot, we need to sort the data in order from smallest to largest:
82 82 84 85 89 89 89 91 91 92
93 97 99 100 101 102 103 103 104 104
104 105 106 106 107 109 109 115 116 120
Step 2: Next, we identify the stems. To do that, we cut off the final digit of each number, which leaves us with stems of 8, 9, 10, 11, and 12. Arrange the stems vertically, and add the bar to separate these from the leaves:
8
9
10
11
12
Step 3: Write down the leaves on the right side of the bar, giving just the final digit (that we cut off to make the stems) of each data value. List these in order, and make sure they line up vertically:
8 2 2 4 5 9 9 9
9 1 1 2 3 7 9
10 0 1 3 3 4 4 4 5 6 6 7 9 9
11 5 6
12 0
As we mentioned above, stem-and-leaf plots aren’t always going to be useful. For example, if all the data in your dataset are between 20 and 29, then you’ll just have one stem, which isn’t terribly useful. (Although there are methods like stem splitting for addressing that particular problem, we won’t go into those at this time.) On the other end of the spectrum, the data may be so spread out that every stem has only one leaf. (This problem can sometimes be addressed by rounding off the data values to the tens, hundreds, or some other place value, then using that place for the leaves.) Finally, if you have dozens or hundreds (or more) of data values, then a stem-and-leaf plot becomes too unwieldy to be useful. Fortunately, we have other tools we can use.

Histograms

Histograms are visualizations that can be used for any set of quantitative data, no matter how big or spread out. They differ from a categorical bar chart in that the horizontal axis is labeled with numbers (not ranges of numbers), and the bars are drawn so that they touch each other. The heights of the bars reflect the frequencies in each bin. Unlike with stem-and-leaf plots, we cannot recreate the original dataset from a histogram. However, histograms are easy to make with technology and are great for identifying the distribution of our data. Let’s first create one histogram without technology to help us better understand how histograms work.

Constructing a Histogram

In worked example, we built a stem-and-leaf plot for the number of chirps made by crickets in one minute. Here are the raw data that we used then:
89 97 82 102 84 99
115 105 89 109 107 89
101 109 116 103 100 91
93 103 120 91 85 104
104 82 106 92 104 106
Construct a histogram to visualize these results.
Solution
Step 1: Add data to bins. Histograms are built on binned frequency distributions, so we’ll make that first. Luckily, the stem-and-leaf plot we made earlier can help us do this much more quickly:
8 2 2 4 5 9 9 9
9 1 1 2 3 7 9
10 0 1 2 3 3 4 4 4 5 6 6 7 9 9
11 5 6
12 0
If we’re using bins of width 10, we can compute the frequencies by counting the numbers of leaves associated with the corresponding stem:
Bin Frequency
80-89 7
90-99 6
100-109 14
110-119 2
120-129 1
(Note that, when we made binned frequency diagrams in the last module, we noted that if the biggest data value was right on the border between two bins, it was OK to lump it in with the lower bin. That’s not recommended when building histograms, so the data value 120 is all alone in the 120-129 bin.)
Step 2: Create the axes. On the horizontal axis, start labeling with the lower end of the first bin (in this case, 80), and go up to the higher end of the last bin (120). Mark off the other bin boundaries, making sure they’re all evenly spaced. On the vertical axis, start with zero and go up at least to the greatest frequency you see in your bins (14 in this example), making sure that the labels you make are evenly spaced and that the difference between those numbers is the same. Let’s count off our vertical axis by threes:
A histogram. The horizontal axis ranges from 80 to 130, in increments of 10. The vertical axis ranges from 0 to 15, in increments of 3.
Step 3: Draw in the bars. Remember that the bars of a histogram touch, and that the heights are determined by the frequency. So, the first bar will cover 80 to 90 on the horizontal axis, and have a height of 7:
A histogram shows a vertical bar. The horizontal axis ranges from 80 to 130, in increments of 10. The vertical axis ranges from 0 to 15, in increments of 3.The histogram infers the following data. 80 to 90: 7.
Now, we can fill in the others:
A bar chart plots frequency versus number of chirps. The horizontal axis ranges from 80 to 130, in increments of 10. The vertical axis ranges from 0 to 15, in increments of 3.The histogram infers the following data. 80 to 90: 7. 90 to 100: 6. 100 to 110: 14. 110 to 120: 2. 120 to 130: 1.
Step 4: Let’s compare the histogram we just created to the stem-and-leaf plot we made earlier:
A bar chart and a stem-and-leaf plot. The stem-and-leaf plot infers the following data. 8: 2, 2, 4, 5, 9, 9, 9. 9: 1, 1, 2, 3, 7, 9. 10: 0, 1, 1, 3, 3, 4, 4, 4, 5, 6, 6, 7, 9, 9. 11: 5, 6. 12: 0. The horizontal axis of the histogram ranges from 80 to 130, in increments of 10. The vertical axis ranges from 0 to 15, in increments of 3.The histogram infers the following data. 80 to 90: 7. 90 to 100: 6. 100 to 110: 14. 110 to 120: 2. 120 to 130: 1.
Notice that the leaves on the rotated stem-and-leaf plot match the bars on our histogram! We can view stem-and-leaf plots as sideways histograms. But, as we’ll see soon, we can do much more with histograms.
Now that we’ve seen the connection between stem-and-leaf plots and histograms, we are ready to look at how we can use Google Sheets to build histograms.
Let’s use Google Sheets to create a histogram for a large dataset.

Creating a Histogram in Google Sheets

The data in “AvgSAT” contains the average SAT score for students attending every institution of higher learning in the US for which data is available. Create a histogram in Google Sheets of the average SAT scores. Use bins of width 50. Are the data uniformly distributed, symmetric, left-skewed, or right-skewed?
Solution
Using the procedure described in the video above, we get this:
A histogram titled, average SAT scores at US institutions. The horizontal axis representing average SAT ranges from 750 to 1600, in increments of 50. The vertical axis representing frequency ranges from 0 to 300, in increments of 100. The histogram infers the following data. 750 to 800: 4. 800 to 850: 5. 850 to 900: 15. 900to 950: 25. 950 to 1000: 85. 1000 to 1050: 170. 1050 to 1100: 230. 1100 to 1150: 275. 1150 to 1200: 275. 1200 to 1250: 110. 1250 to 1300: 70. 1300 to 1350: 50. 1350 to 1400: 40. 1400 to 1450: 40. 1450 to 1500: 20. 1500 to 1550: 20. 1550 to 1600: 5. Note: all values are approximate.
(data source: https://data.ed.gov)
The data are fairly symmetric, but slightly right-skewed.

Bar Charts for Labeled Data

Sometimes we have quantitative data where each value is labeled according to the source of the data. For example, in the Your Turn above, you looked at in-state tuition data. Every value you used to create that histogram was associated with a school; the schools are the labels. In YOUR TURN 8.11, you found a histogram of the wins of every Major League Baseball team in 2019. Each of those win totals had a label: the team. If we’re interested in visualizing differences among the different teams, or schools, or whatever the labels are, we create a different version of the bar graph known as a bar chart for labeled data.
These graphs are made in Google Sheets in exactly the same way as regular bar graphs. The only change is that the vertical axis will be labeled with the units for your quantitative data instead of just “Frequency.”

Building a Bar Chart for Labeled Data

The following table shows the gross domestic product (GDP) for the United States for the years 2010 to 2019:
(source: https://data.worldbank.org)
Year GDP (in $ trillions) Year GDP (in $ trillions)
2010 14.992 2015 18.225
2011 15.543 2016 18.715
2012 16.197 2017 19.519
2013 16.785 2018 20.580
2014 17.527 2019 21.433
Construct a histogram that represents these data.
Solution
In this case, the years are the labels, and the data we are interested in are the GDP numbers. Once you have the table above (including the labels) entered into a spreadsheet, click and drag to select the full table. Then, in the “Insert” menu, click “Chart.” The result may not be a bar chart; if it’s not, select “Column chart” in the drop-down menu “Chart type” in the Chart Editor. If you want, you can edit things like the chart title in the “Customize” tab in the Chart Editor.
A bar graph titled, Unites States GDP, 2010 to 2019. The horizontal axis representing the year ranges from 2010 to 2019, in increments of 1. The vertical axis represents GDP in trillion dollars. The bar graph infers the following data. 2010: 15. 2011: 15.5. 2012: 16. 2013: 17. 2014: 17.5. 2015: 18. 2016: 19. 2017: 19.5. 2018: 20.5. 2019: 21. Note: all values are approximate.
(data source: https://data.worldbank.org)