What is a histogram? A histogram is a chart that shows how a set of numbers is spread out. It cuts the range of the numbers into equal intervals, counts how many values fall in each one, and draws a bar for every interval, with the bars touching. One glance tells you where most values sit, how far they spread, and whether anything looks unusual. This guide explains the definition, how to read a histogram, the shapes you will meet, how bins change the picture, and where a histogram falls short. Every chart on the page is live and opens in our free histogram tool with the data filled in.
What Is a Histogram?
The NIST/SEMATECH e-Handbook of Statistical Methods, a reference published by the US National Institute of Standards and Technology, says the purpose of a histogram is to graphically summarize the distribution of a single numeric variable. It lists what the chart reveals: the center of the data, its spread, its skewness, any outliers, and whether there is more than one peak. NIST also gives the standard recipe: split the range of the data into equal-sized bins, called classes, and count how many values fall into each bin.
Here is a real example of the recipe at work. A teacher has the test scores of 40 students. Listed one by one, the scores tell you very little. Sorted into ranges 5 points wide and drawn as bars, they tell a story.
A histogram of 40 test scores in bins 5 points wide. Most scores sit between 70 and 80, and fewer students scored very low or very high. Sample data.
Show the data
58, 62, 64, 66, 67, 68, 69, 70, 70, 71, 72, 72, 73, 73, 74, 74, 74, 75, 75, 75, 75, 76, 76, 76, 77, 77, 78, 78, 79, 80, 80, 81, 82, 83, 84, 85, 86, 88, 90, 92
Most students scored between 70 and 80. A few scored below 65, and only two scored 90 or more. The chart shows all of that without a single calculation.
Open these 40 scores in the histogram maker
The Parts of a Histogram
- The horizontal axis is the variable you measured, such as score, minutes or height, with its unit. It is a number line, so it is continuous.
- The bins are the intervals along that axis, such as 70 to 75. OpenStax’s Introductory Statistics textbook describes a histogram as contiguous, adjoining boxes: there are no gaps between bins, because the number line has no gaps.
- The vertical axis is the frequency, meaning how many values landed in each bin. OpenStax notes it can also show relative frequency or percent, and the shape stays the same.
- The bars have a height equal to the count. The bar for 75 to 80 above is 12 units tall because 12 students scored in that range.
Where the Word Comes From
The term histogram was introduced by the statistician Karl Pearson, who used it in lectures at University College London in 1892, according to Wikipedia’s article on the histogram. The idea of grouping values into classes is older, and the article says no systematic advice on how many groups to use appeared until Sturges published his rule in 1926.
How a Histogram Is Built From Raw Numbers
Every histogram starts as a frequency table. Seeing the table makes the chart easy to understand.
Step 1: Choose the Bins
For the 40 scores, the lowest is 58 and the highest is 92. Bins 5 points wide starting at 55 cover the whole range in eight intervals. OpenStax suggests that many histograms use between five and 15 bars for clarity, so eight is comfortable.
Step 2: Count the Values in Each Bin
| Bin (score) | Frequency | Relative frequency |
|---|---|---|
| 55 to under 60 | 1 | 2.5% |
| 60 to under 65 | 2 | 5% |
| 65 to under 70 | 4 | 10% |
| 70 to under 75 | 10 | 25% |
| 75 to under 80 | 12 | 30% |
| 80 to under 85 | 6 | 15% |
| 85 to under 90 | 3 | 7.5% |
| 90 to 95 | 2 | 5% |
| Total | 40 | 100% |
The relative frequency is the count divided by the total. OpenStax defines it the same way: the frequency of a value or class divided by the number of data values. The counts add up to 40, which is a quick check that nothing was missed or counted twice.
Step 3: Draw One Bar per Bin
Each row of the table becomes a bar. The bars stand side by side with no gaps, in the order of the number line. That is the chart at the top of this page.
Which Bin Gets a Value on the Edge?
The score 70 sits exactly on the line between two bins. Is it in 65 to 70 or in 70 to 75? You have to pick a rule and stick to it. OpenStax counts a value in the interval whose left boundary it is, which puts 70 in 70 to 75. Our histogram maker uses the same convention, and includes both edges in the last bin, so the highest value is always counted.
OpenStax also offers a trick to avoid the question: start the first bin half a unit below the smallest value when the data are whole numbers, such as 57.5 instead of 55. Then no value can land on a boundary. Spreadsheets do not all follow the same convention, which is one reason two programs can draw slightly different histograms from the same numbers. Our guide to making a histogram in Excel covers how Excel handles it.
Frequency Histogram and Relative Frequency Histogram
The chart above is a frequency histogram: the height of each bar is a count. Swap the counts for percentages and you get a relative frequency histogram. The shape does not change at all. Only the numbers on the vertical axis do.
The same 40 scores as a relative frequency histogram. The 75 to 80 bin holds 30 percent of the class. Sample data.
Show the data
58, 62, 64, 66, 67, 68, 69, 70, 70, 71, 72, 72, 73, 73, 74, 74, 74, 75, 75, 75, 75, 76, 76, 76, 77, 77, 78, 78, 79, 80, 80, 81, 82, 83, 84, 85, 86, 88, 90, 92
Percentages are the better choice when you compare groups of different sizes. A class of 40 and a school of 400 cannot share a count axis, but both can be read in percent.
A Frequency Histogram From a Table
Sometimes you never see the raw numbers. A report may give you only the counts per class, such as visitors by age group. You can still draw a histogram: each class becomes a bar whose height is the count.
A frequency histogram drawn from a table of counts. The 30 to 40 age group was the largest on this Saturday. Sample data.
Show the data
| From | To | Count |
|---|---|---|
| 0 | 10 | 14 |
| 10 | 20 | 22 |
| 20 | 30 | 31 |
| 30 | 40 | 38 |
| 40 | 50 | 27 |
| 50 | 60 | 19 |
| 60 | 70 | 12 |
| 70 | 80 | 6 |
Open this frequency table in the histogram maker
Cumulative and Density Histograms
The NIST handbook describes two more variants. In a cumulative histogram, each bar counts its own bin plus every bin to its left, so the bars only grow and the last bar equals the total. In a density histogram, each count is divided by the total number of values times the bin width, which makes the total area of the bars equal to one. NIST recommends that version when you want to lay a probability curve over the bars. Our histogram maker draws counts and percent; it has no cumulative mode.
How to Read a Histogram
Reading a histogram is a matter of asking the same four questions every time.
Where Is the Center?
Find the tallest bars. That is where most values live. In the test scores, the center is around 75. The actual median of the 40 scores is 75 and the mean is about 75.6, so the chart and the arithmetic agree.
How Wide Is the Spread?
Look at how far the bars stretch from left to right, and how quickly they fall away from the center. The scores run from the 55 bin to the 90 bin, and most of them are packed into the 20 points between 65 and 85.
What Is the Shape?
Is the chart roughly symmetric, like a hill? Does one side trail off further than the other? Is there one peak or two? The shape is often the most useful thing a histogram tells you, and it gets its own section below.
Are There Gaps or Outliers?
An empty bin in the middle of the data, or a lonely bar far from the rest, is worth a question. It may be a real feature, a different group mixed in, or a typing mistake.
A Five-Step Checklist
- Read the title and the horizontal axis. What was measured, in what unit, and how many values are there?
- Check the vertical axis. Is it a count or a percent, and does it start at zero?
- Find the peak. Which bin is tallest, and roughly what value does it stand for?
- Follow the tails. Which side stretches further?
- Look for anything odd. Gaps, isolated bars, or two separate humps.
Common Histogram Shapes
The NIST handbook has a page for each common shape and what it usually means. These are the ones you will meet most often.
Symmetric and Bell-Shaped
The test scores are close to symmetric: the left and right halves are rough mirror images, with most counts in the middle. NIST calls the classic version of this bell-shaped, with the counts bunched in the middle and dying off in the tails. In a symmetric distribution the mean, the median and the peak are in about the same place.
Skewed Right
NIST calls a distribution skewed right when the long tail is on the right side. Waiting times are a textbook case, because nobody can wait less than zero minutes but a few people wait a very long time.
A right-skewed histogram. Most patients waited under 15 minutes, and a thin tail stretches out to 45 minutes. Sample data.
Show the data
2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 10, 11, 12, 13, 14, 16, 18, 21, 25, 31, 38, 45
NIST explains why this happens so often: data with a lower bound, such as times and sizes that cannot be below zero, tend to be skewed right. In this sample the median wait is 8 minutes, while the mean is about 11.9, because the few long waits pull the average up. That is why NIST recommends reporting at least the mean and the median for skewed data.
Skewed Left
A distribution skewed left has its long tail on the left. Scores on an easy quiz behave this way: most students score near the top, the maximum is capped at 100, and a few struggle.
A left-skewed histogram. Half the class scored 90 or more, and a few low scores form a tail to the left. Sample data.
Show the data
38, 52, 61, 66, 70, 74, 77, 79, 81, 83, 84, 86, 87, 88, 89, 90, 90, 91, 92, 92, 93, 94, 94, 95, 95, 96, 97, 97, 98, 99
Here the median is 89.5 and the mean is about 84.3. The low scores drag the mean down. NIST notes that data with an upper bound are often skewed left.
Bimodal
A bimodal histogram has two peaks. NIST says the mode is the most frequent value and sits at the peak of a histogram, so two peaks mean two modes. It also says that asking why the data have two peaks often leads to real insight. One of its examples is a mixture of two separate processes.
A bimodal histogram. Regular users finish in 10 to 16 minutes and first-time users in 24 to 31, with nobody in between. Sample data.
Show the data
10, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 16, 24, 25, 26, 26, 27, 27, 27, 28, 28, 29, 30, 31
In this sample, two groups of people were timed together. Averaging them would give about 20 minutes, a time that nobody actually took. When you see two humps, split the data by group before you summarize it.
Uniform
In a uniform histogram every bin has about the same height. Rolling a fair die is the standard example: each face should come up about equally often.
A roughly uniform histogram. Over 60 rolls, each face came up between 8 and 12 times. Sample data.
Show the data
| From | To | Count |
|---|---|---|
| 0.5 | 1.5 | 9 |
| 1.5 | 2.5 | 11 |
| 2.5 | 3.5 | 10 |
| 3.5 | 4.5 | 12 |
| 4.5 | 5.5 | 8 |
| 5.5 | 6.5 | 10 |
The bars are not perfectly level, and they never will be with a small sample. Random variation of a few counts is normal.
Histograms and the Normal Distribution
The bell-shaped curve of the normal distribution is the shape most people picture when they hear the word histogram. A histogram is often the first check of whether data look normal. NIST writes that, from a physical science and engineering point of view, the normal distribution is the one that occurs most often in nature, and describes its histogram as symmetric with moderate tails.
A bell-shaped histogram is not proof, though. NIST’s recommended next step, when a histogram looks normal, is a normal probability plot to confirm it. The reason is that the bars are coarse: the same data in different bins can look more or less bell-shaped.
If you want to draw a normal curve over the bars, NIST says to use the density version of the histogram, so that the area under the bars and the area under the curve are both one. Our histogram maker does not draw a curve overlay, so for that step use statistics software.
How Bins Change the Picture
The single biggest decision in a histogram is the bin width. Wikipedia’s article sums up the consensus: there is no best number of bins, and different bin sizes can reveal different features of the data.
Too Few Bins
With very wide bins the shape disappears. Here are the same 40 scores in three bins.
Too few bins. Three bars 20 points wide say little more than 'most scores are in the middle'. Sample data.
Show the data
58, 62, 64, 66, 67, 68, 69, 70, 70, 71, 72, 72, 73, 73, 74, 74, 74, 75, 75, 75, 75, 76, 76, 76, 77, 77, 78, 78, 79, 80, 80, 81, 82, 83, 84, 85, 86, 88, 90, 92
Too Many Bins
With very narrow bins, random noise takes over. Now each bin is one point wide.
Too many bins. With bins one point wide, the chart is mostly ones and gaps, and the hill shape is hard to see. Sample data.
Show the data
58, 62, 64, 66, 67, 68, 69, 70, 70, 71, 72, 72, 73, 73, 74, 74, 74, 75, 75, 75, 75, 76, 76, 76, 77, 77, 78, 78, 79, 80, 80, 81, 82, 83, 84, 85, 86, 88, 90, 92
Rules of Thumb for the Number of Bins
Several formulas give a sensible starting point. All of them are guides, not laws.
- Sturges’ rule uses the base 2 logarithm of the number of values, rounded up, plus one. For 40 values that is 7 bins. It assumes the data are roughly bell-shaped and can do poorly with fewer than about 30 values.
- The square root rule uses the square root of the number of values, rounded up, which is also 7 for 40 values. Wikipedia notes that many elementary textbooks suggest it.
- The Freedman-Diaconis rule sets the bin width to twice the interquartile range divided by the cube root of the number of values. Because it uses quartiles, it copes better with outliers.
- Scott’s normal reference rule sets the width from the standard deviation. It is the automatic setting in Excel’s histogram chart, according to Microsoft’s support page.
Our histogram maker uses Sturges’ rule by default and rounds the width to a readable number. For the 40 scores it picks bins 5 points wide starting at 55, which is exactly the first chart on this page. You can switch rules or set the width yourself.
Bins of Different Widths
Bins do not have to be equal. When they are not, the height of a bar can no longer be the count, or a wide bin would look far bigger than it is. Wikipedia’s article describes the general form of a histogram, in which the area of each bar is proportional to its count and the height is the frequency density: the count divided by the bin width.
A histogram with unequal bins. The 40 to 80 class holds 16 loans, more than the 0 to 10 class, but its bar is lower because the count is spread over a range four times wider. Sample data.
Show the data
| From | To | Count |
|---|---|---|
| 0 | 10 | 12 |
| 10 | 20 | 18 |
| 20 | 40 | 20 |
| 40 | 80 | 16 |
In the chart, the widest class has 16 loans but the lowest bar, because 16 loans spread across 40 thousand dollars is a density of 0.4. When you enter classes of different widths, our histogram maker switches to frequency density automatically.
When a Histogram Is the Wrong Chart
A histogram is excellent for one job and poor at several others. Knowing the limits saves you from a misleading chart.
Small Data Sets
OpenStax gives a rule of thumb: use a histogram when the data set has 100 values or more. With a dozen values the bins are mostly empty or hold one value each, and the shape depends almost entirely on where the bins start. A dot plot, which draws every value, is a better fit. Try the dot plot maker for small sets.
Categories Instead of Numbers
Favorite fruit, country or product name have no number line, so they cannot be binned. That is a job for a bar graph, where the bars stand apart and can be sorted in any order. Our guide to bar graphs vs histograms walks through the differences with side-by-side examples.
Finding Outliers and Comparing Groups
NIST is direct about outliers: box plots are a much better graphical tool for detecting outliers than histograms. A box plot also puts several groups side by side in a small space, while several histograms take a lot of room and are hard to compare. A box plot draws a box around the middle half of the data with a line at the median. Build one in the box plot maker.
Exact Values
A histogram throws away the individual numbers. From the first chart you know that 12 students scored from 75 to under 80, but not what each one scored. If the reader needs the values, show a table as well.
Histogram vs Bar Graph in Brief
The two look alike, and the difference is the data. A histogram shows one numeric variable cut into ranges, so its bars touch and their order is fixed by the number line. A bar graph compares separate categories, so its bars have gaps and can be sorted. Wikipedia’s article on the histogram notes that the two are often confused, and that some authors recommend always leaving gaps in bar charts to keep them apart.
Make a Histogram From Your Own Numbers
You can turn your own data into a histogram in less than a minute, with no install and no account. Your numbers stay in your browser.
- Paste a column of numbers from a spreadsheet into the histogram maker, or type them separated by commas.
- Check the bins. The tool shows the frequency table under the chart, so you can compare it with the bars.
- Change the bin width if the shape looks too blocky or too noisy.
- Switch to percent if you want a relative frequency histogram.
- Download a PNG or SVG for your report or slides.
Questions people ask
What is a histogram in simple terms?
It is a picture of how a set of numbers is spread out. You cut the range of the numbers into equal slices, count how many values land in each slice, and draw one bar per slice. Tall bars show where values crowd together, short bars show where they are rare.
What is the main purpose of a histogram?
Its job is to show the distribution of one numeric variable at a glance. From the bars you can judge where the typical values sit, how widely they vary, whether the pattern is lopsided, and whether there are unusual values or more than one peak. That is hard to see in a long list of numbers.
What does a good histogram look like?
A good histogram has bars that touch, a labeled horizontal axis with the unit, a vertical axis that starts at zero, and enough bins to show a shape without turning into noise. The title says what was measured and how many values there are. It does not have to be bell-shaped: the data decides the shape.
What are the rules of a histogram?
The main rules: use one numeric variable, cut its range into intervals that do not overlap and leave no gaps, count every value exactly once, and let the bars touch. Keep bin widths equal unless you plot frequency density. Decide which bin gets a value that sits exactly on an edge, and apply that choice everywhere.
What are three limitations of a histogram?
First, it hides individual values, so you cannot read back the exact data. Second, its shape depends on the bin width and starting point, and two reasonable choices can tell different stories. Third, it needs a fair amount of data: with a dozen values, a dot plot or a plain list is more honest.
What is a histogram explained to kids?
Imagine every child in a class says how many minutes they read yesterday. Put the answers into buckets, such as 0 to 10 minutes and 10 to 20 minutes, and stack a block for each child in the right bucket. The towers of blocks, standing side by side, are a histogram.
What are the three types of histograms?
There is no single official list of three. The NIST handbook describes the ordinary frequency histogram, the relative histogram, where counts become proportions, and the cumulative histogram, where each bar adds all smaller bins. Textbooks also sort histograms by shape, such as symmetric, skewed and bimodal.