Histogram
Variant: Standard
Made-up data, for demonstration only
Variants
6 types · click one to see it in the frame above- Difference from standard
- The recommended type; use it as a starting point
- Use when
- See the shape of the distribution of a numeric variable
Histogram is a bar chart that splits numeric values into equal-width bins and counts how many items fall in each. Use it to see the shape of a distribution, such as the queue waiting times of 300 customers.
How to read a Histogram
- The horizontal axis is the range of values. Here it is minutes waited, split into bins of 10 minutes, from 0 to 70.
- The vertical axis is the number of customers in that bin. The 20–30 minute bin is the largest, with 101 customers, about 34% of the total.
- The bars touch, because the bins run on from one another. This differs from an ordinary bar chart, where each bar is a separate category.
- Look at the overall shape. This example is roughly bell-shaped, with an average wait of about 30 minutes. About 62% of customers (185) waited 20–40 minutes, 60 waited less than 20 minutes and 55 waited more than 40 minutes.
- The left end rises slightly higher than the right end. The 0–10 minute bin has 13 customers and the 60–70 bin has 4.
Readers can see where most values bunch up, how wide the spread is, and whether any values sit far away.
When to use it
- You have a lot of continuous numeric data, such as time, age, income or weight. It is the standard way to show a statistical distribution.
- You want to see the shape: symmetric, skewed, with two peaks, or with a long tail.
- You have enough data. With only a few values, the shape changes very easily with the way you cut the bins.
When not to use it
- The data is categorical, not continuous numbers. Use a Bar Chart.
- You need to compare several groups. Stacked histograms get confusing. To show several distributions, a density chart is usually easier to read. Use a Density Plot or a Box Plot.
- There is very little data. Use a Strip Plot to show every point.
- You only want the summary values. Use a Box Plot.
Common mistakes
1. Choosing a bin width that does not suit the data
If the bins are too narrow, the chart turns spiky and cluttered, and the main trend is hidden. If they are too wide, small features of the data disappear. Try the "Wide bins" variant (20 minutes, leaving 4 bars) and the "Narrow bins" variant (2 minutes) against the default.
2. Bins of unequal width
Every bin must be the same width for the histogram to be correct. If they are not, the heights have to be adjusted for the widths.
3. Wide gaps between bars
Wide gaps make the chart look like a bar chart of categories. Keep the gaps between bars small, to stress the shape of the data. Try the "Gaps between bars" variant.
4. Overlapping two groups until they cannot be read
Try the "Two groups overlaid" variant, where translucent bars overlap. You can see that branch B waits longer than branch A, but you still have to squint. Use density lines or separate charts instead.
5. No axis titles or units
Readers do not know what the bars count. Give both the name of the value (minutes waited) and what is counted (number of customers).
Compared with similar charts
| Chart | How it differs | Choose it when |
|---|---|---|
| Histogram | Counts items by bin | The shape of the distribution of one value |
| Density Plot | A smooth curve | You compare several groups |
| Box Plot | A box that summarises five values | You compare groups and unusual values |
| Bar Chart | Bars separated by category | Categories that are not continuous |
| Frequency Table | A table of counts per bin | You want the numbers directly |
History and development
Karl Pearson used the word "histogram" in statistics lectures at least as early as 1891. Research on the history of the term suggests many sources give a start date that is too late, but the evidence on the exact date of the lecture still conflicts, so this page does not give one.
Frequently asked questions
How many bins should there be?
There is no fixed formula. The look of the chart depends on the bin width you choose. Try several sizes and see whether the main shape stays the same. If it changes a lot, there is not enough data to read the fine shape.
How is a Histogram different from a Bar Chart?
A bar chart shows values for separate categories. A histogram counts continuous data split into equal bins, so the bars touch and the order of the bars means something.
Should I use a Histogram or a Density Plot?
It is largely a matter of taste. But if you must show several distributions at once, a density plot is usually easier to read. With very little data, a density plot can mislead.
Can I draw a density line over a histogram?
Yes. Try the "Overlay density line" variant. The line helps show a smooth shape, but check that it does not run into impossible values, such as negative time.
References
- Fundamentals of Data Visualization, ch. 7: Visualizing distributions: Histograms and density plots · Claus O. Wilke · clauswilke.comUsed to confirm: histograms and density plots, and choosing bins and widths
- On the origin of Karl Pearson's term "histogram" · Instituto Nacional de Estadística (Spain) · www.ine.esUsed to confirm: the origin of the word histogram from Karl Pearson
Last updated 28 Nov 2026