How to Make a Histogram: A Step-by-Step Tutorial
A histogram is the go-to chart for answering the question “How is my data distributed?” Whether you are analyzing test scores, delivery times, or customer ages, a histogram groups continuous data into bins and shows the frequency of each bin as a bar. In this guide you will learn how to make a histogram, choose the right bin size, interpret common distribution shapes, and avoid confusing histograms with bar charts.
What Is a Histogram?
A histogram is a frequency-distribution chart. The x-axis represents ranges (bins) of a continuous variable, and the y-axis shows how many data points fall into each bin. Unlike a bar chart, histograms have no gaps between bars because the bins cover a continuous number line.
Histogram vs Bar Chart
| Feature | Histogram | Bar Chart |
|---|---|---|
| Data type | Continuous (numeric ranges) | Categorical (discrete groups) |
| Gaps between bars | No – bins are adjacent | Yes – categories are separate |
| X-axis order | Fixed – numeric order | Can be reordered (sorted, alphabetical) |
| Purpose | Show frequency distribution | Compare values across categories |
| Bar width | Meaningful – represents bin range | Arbitrary – purely aesthetic |
This distinction trips up many beginners. If your x-axis labels are names, products, or countries, you need a bar chart. If they are numeric ranges (0–10, 10–20, etc.), you need a histogram.
How to Make a Histogram (Step by Step)
- Collect your data – You need a single column of continuous numeric values (e.g., response times in milliseconds).
- Open the ChartLoad Histogram Maker.
- Paste or enter your data – One value per row or comma-separated.
- Set the bin count or bin width – ChartLoad auto-suggests a bin count, but you can adjust it (see guidelines below).
- Review the shape – Look for symmetry, skewness, or multiple peaks.
- Customize – Add axis labels, a title, and choose colors.
- Download or embed – Export as PNG/SVG or copy the embed code.
Choosing the Right Bin Size
Bin size (or bin count) dramatically affects what story your histogram tells. Too few bins oversimplify; too many create noise.
- Sturges’ Rule –
bins = 1 + 3.322 × log10(n). Good for roughly normal data. - Square-root rule –
bins = √n. A quick default. - Freedman–Diaconis rule – Uses the interquartile range to set bin width. Best for skewed or outlier-heavy data.
- Manual tuning – Start with an auto suggestion and adjust up or down while watching for meaningful patterns or artifacts.
Quick Reference
| Data Points (n) | Sturges | Square Root |
|---|---|---|
| 50 | 7 | 7 |
| 200 | 9 | 14 |
| 1,000 | 11 | 32 |
| 10,000 | 15 | 100 |
Common Distribution Shapes
Normal (Bell Curve)
Symmetrical, with most values near the mean. Example: adult heights in a large population.
Right-Skewed (Positive Skew)
A long tail stretches to the right. Example: household income—most earn moderate amounts, a few earn very high.
Left-Skewed (Negative Skew)
A long tail stretches to the left. Example: age at retirement—most retire in their 60s, few retire very young.
Bimodal
Two distinct peaks. Example: arrival times at a restaurant with separate lunch and dinner rushes.
Uniform
All bins are roughly equal height. Example: a fair die rolled many times.
“The shape of your histogram is the first clue to understanding your data. Before running any statistical test, plot it.”
Histogram Tips and Best Practices
- Always label your axes – x-axis should state the variable and unit; y-axis should say “Frequency” or “Count.”
- Avoid 3D effects – They distort bar heights and add no information.
- Show summary stats – Overlay mean and median lines to highlight central tendency.
- Use complementary charts – Pair a histogram with a box plot to show quartiles and outliers, or a violin plot for a smoother density view.
- Multiple distributions? – Use overlapping semi-transparent histograms or switch to a beeswarm plot to see individual points.
Real-World Example: Customer Wait Times
Imagine a call center with 500 recorded wait times. A histogram with 15 bins reveals a right-skewed distribution: most customers wait 1–3 minutes, but a tail extends to 12+ minutes. The operations team now knows to investigate the outlier calls rather than focusing on the average.
Beyond the Histogram
Once you understand your distribution, you may want to explore other chart types. For comparing distributions across groups, a box plot is ideal. To show exact individual values, try a beeswarm plot. For part-to-whole insights on the same data, a Pareto chart (histogram + cumulative line) highlights the 80/20 rule.
Not sure which chart fits your analysis? Read our pillar guide on how to choose the right chart or explore data visualization examples for more ideas.
Ready to visualize your distribution? Open the ChartLoad histogram maker and build a clean, publication-ready histogram in under a minute—completely free, no sign-up needed.
Worked Example: Customer Ages by Decade
A coffee shop logs the ages of 28 loyalty-program members to plan its marketing. Pasting the raw ages into a histogram with 10-year bins reveals a pattern the average customer age would completely hide.
Sample data: Ages: 22, 23, 24, 25, 25, 26, 27, 28, 28, 29, 31, 32, 33, 34, 41, 42, 43, 44, 51, 52, 53, 54, 55, 55, 56, 57, 58, 59 → bins 20-29: 10, 30-39: 4, 40-49: 4, 50-59: 10
The mean age is 39.5, which sounds like a solid middle-aged customer base. But the histogram is clearly bimodal: two equal peaks of 10 customers each at the 20-29 and 50-59 bins, with only 4 in each of the two middle bins. The two end groups hold 20 of the 28 customers (71%), while the 30-49 middle the average points to holds just 8 (29%). The "typical" 40-year-old barely exists. The shop is really serving two distinct audiences and should market to each separately rather than to a fictional average customer.
Frequently Asked Questions
How many data points do you need to make a histogram?
Aim for at least 30 to 50 values so bin frequencies are meaningful; with fewer than ~20 points the bars become noisy and a dot plot or strip plot tells a clearer story. Above a few hundred points, histograms shine because the underlying shape stabilizes.
Can you make a histogram in Excel or Google Sheets?
Yes, but it is fiddly: Excel needs the Analysis ToolPak or a FREQUENCY array, and Sheets buries the option under Chart editor with limited bin control. A dedicated online histogram maker lets you paste a column, drag the bin count, and export instantly without formulas.
Should histogram bins all be the same width?
For most cases yes, equal-width bins keep bar heights directly comparable. Use unequal bins only when you plot density (frequency divided by bin width) on the y-axis; otherwise a wide bin will look artificially tall and mislead readers.
Ready to Create Your Own Charts?
100+ chart types, 200+ templates, 9 export formats. 100% free, no signup.
Start Creating Now