What a histogram is and why Excel can build one

A histogram is a chart that shows how often values fall into different ranges. Unlike a bar chart that compares separate categories, a histogram groups numbers into buckets — say, test scores from 0–10, 10–20, 20–30 — and displays how many values land in each bucket. Excel can build one for you in a few clicks, either by using the built-in histogram tool (Excel 2016 and later) or by creating one manually with a helper table.

The built-in tool is faster if you have it. The manual method works in any version and gives you more control over bucket size and labels. Both start with raw data — a column of numbers you want to visualize.

Key Takeaways

  • Excel 2016 and later have a histogram button under the Insert tab that builds one automatically from your data column.
  • Older Excel versions require you to set up a helper table with bucket ranges, then use COUNTIFS to count how many values fall in each range.
  • You must decide your bucket size (the width of each range) before building — common choices are 5, 10, or 20 depending on your data spread.
  • Once the chart exists, you can adjust the bucket width by right-clicking the horizontal axis and changing the bin width number.

Using the built-in histogram tool in Excel 2016 and later

If you have Excel 2016, Excel 2019, or Microsoft 365, the fastest route is the Insert tab. First, select your data column — click the first cell with a number, then hold Shift and click the last cell. Do not include a header row in the selection; if your column has one, select from the first data value down.

Go to the Insert tab at the top. Look for the Charts section. Click the small arrow next to the column chart icon (or the icon labeled "Insert Statistic Chart" in some versions), then select Histogram from the dropdown. Excel will build the chart immediately and place it on your sheet.

The default bucket width is usually too wide or too narrow. To adjust it, right-click the horizontal axis (the bottom numbers), select Format Axis, and look for Bin Width or Number of Bins. Change the number and press Enter. Smaller numbers create more buckets; larger numbers create fewer, wider buckets. A bucket width of 5 or 10 works for most datasets.

Building a histogram manually with COUNTIFS

If you have an older Excel version or want full control, build the histogram yourself. Start by deciding your bucket size — if your data ranges from 0 to 100, buckets of 10 work well. If it ranges from 0 to 1000, try 50 or 100.

In a blank area of your sheet, create two columns: one for the bucket labels and one for the count. In the label column, type the ranges: 0–10, 10–20, 20–30, and so on, down to the top of your data. In the count column next to the first label, enter a COUNTIFS formula that counts how many values from your data column fall within that range.

For example, if your data is in column A (rows 2 to 101) and you want to count values from 0 to 10, the formula is: =COUNTIFS($A$2:$A$101,">="&0,$A$2:$A$101,"<"&10). This counts all values greater than or equal to 0 and less than 10. Copy this formula down, changing the numbers for each row: the next row counts 10 to 20, the next counts 20 to 30, and so on.

Once your helper table is complete, select both columns (labels and counts) and insert a column chart. Excel will treat the labels as categories and the counts as heights, creating a histogram shape.

Choosing the right bucket size

Bucket size matters because it changes what the histogram shows. Too many small buckets make the chart look jagged and hard to read. Too few large buckets hide the shape of your data.

A common rule is to use the square root of your data count as a starting point. If you have 100 data points, try 10 buckets. If you have 400 points, try 20. You can also look at your data range and divide by a round number: if your data spans 0 to 100, buckets of 5, 10, or 20 all work depending on what detail you want to see.

After you build the histogram, look at it. If it looks too spiky, increase the bucket size. If it looks too flat, decrease it. You can adjust and rebuild in seconds.

Labeling and formatting your histogram

By default, Excel labels the horizontal axis with the bucket starting points (0, 10, 20, 30). This is correct but can be confusing — readers may not realize that "10" means "10 to 20" rather than exactly 10. Add a title and axis labels to make it clear.

Click the chart, then click the plus icon that appears in the top right corner. Check the boxes for Chart Title and Axis Titles. Type a title like "Distribution of Test Scores" and label the horizontal axis "Score Range" and the vertical axis "Frequency" or "Count".

If you want to remove the gap between bars (which is standard for histograms), right-click a bar, select Format Data Series, and set Gap Width to 0. This makes the bars touch, which emphasizes that the data is continuous rather than separate categories.

Fixing common mistakes

The most common error is including the header row in your data selection. If your first bar is labeled "Name" or "Score" instead of a number, you selected the header. Delete the chart, reselect just the data values (not the header), and rebuild.

Another mistake is using uneven bucket sizes — for example, 0–10, 10–25, 25–50. This makes bars hard to compare because they represent different ranges. Stick to equal bucket widths throughout.

If your COUNTIFS formula is not counting correctly, check that the column references have dollar signs ($A$2:$A$101) so they do not change when you copy the formula down. Also verify that your bucket boundaries do not overlap — use >= for the lower bound and < for the upper bound, so a value of exactly 10 lands in the 10–20 bucket, not the 0–10 bucket.

When to use a histogram instead of other charts

A histogram shows the distribution of a single set of numbers — how they cluster and spread. Use it when you want to see the shape of your data: whether it peaks in the middle (normal distribution), skews to one side, or has multiple peaks.

Do not use a histogram to compare two separate groups — use a bar chart instead. Do not use it for categories that are not numbers, like months or product names — use a column chart. A histogram only makes sense when your data is continuous numbers that can be grouped into ranges.

Frequently Asked Questions

Can I change the bucket width after I build the histogram?

Yes. If you used the built-in tool, right-click the horizontal axis, select Format Axis, and change the Bin Width number. If you built it manually with COUNTIFS, you have to rebuild the helper table with new bucket ranges and copy the formulas down again.

What if my data has negative numbers?

Histograms work with negative numbers. If your data ranges from −50 to 50, use buckets like −50 to −40, −40 to −30, and so on. The COUNTIFS formula works the same way: =COUNTIFS($A$2:$A$101,">="&−50,$A$2:$A$101,"<"&−40) for the first bucket.

Why does my histogram have a gap on the right side?

Excel's built-in histogram sometimes leaves the last bucket empty if no values exactly equal the upper boundary. This is normal. If it bothers you, increase your top bucket boundary by one unit — for example, change 90–100 to 90–101 — so the last few values have a bucket to land in.

Can I make a histogram from data in multiple columns?

The built-in tool works on one column at a time. If you want to compare histograms of two groups side by side, build one histogram for each group separately, then place them next to each other on the sheet. For a manual histogram, you can use COUNTIFS on multiple columns in the same formula if needed.