To change the number of buckets in an Excel histogram, select the chart’s horizontal axis, open Format Axis, and under Axis Options choose Number of bins; enter the count you want. Excel calls histogram buckets “bins,” and this setting controls how many intervals the data is grouped into.
Create a histogram and locate its bin settings
In Excel for Microsoft 365 on Windows, select the numeric data you want to chart, then choose Insert > Insert Statistic Chart > Histogram. If the data has a heading, include it in the selection so Excel can use it as a label. After the chart appears, click the horizontal axis—the axis with the interval labels—then right-click it and choose Format Axis. In the Format Axis pane, select Axis Options if it is not already open.
- Click the horizontal axis of the histogram, not a bar or the vertical frequency axis.
- Open Format Axis and find the Bins section under Axis Options.
- Select Number of bins and type a positive whole number, such as 8, 12, or 20.
- Close the pane or click elsewhere to see the revised chart.
The chart should update to show the new grouping. The vertical axis continues to show how many observations fall into each interval; the horizontal axis shows the intervals themselves. If the Bins options are missing, first check that you selected the histogram’s horizontal axis and that the chart is actually a Histogram chart rather than a regular column chart.
What the number of bins changes
A bin is an interval of values, and the height of its bar represents the number of observations that fall in that interval. Increasing the bin count usually divides the data into narrower intervals, making smaller patterns and gaps easier to see. It can also make the chart look jagged, especially when the dataset is small. Decreasing the count creates broader intervals that give a simpler overview but can hide variation within each interval.
The number of bins is not the same as the number of data points or the number of bars you expect to see in every situation. Excel groups values according to the selected bin setting and the data’s range. Special settings for values above or below a boundary can add overflow or underflow groups, so the displayed chart may include an extra bar. The goal is to choose a useful view of the distribution, not to make the bar count match the number of observations.
Excel’s automatic setting chooses a grouping for the data when you have not specified a bin count or width. Choosing Number of bins replaces that automatic choice with a fixed count. If new values are later added to the chart’s source data, the selected bin count remains the setting, although the intervals and bar heights can change as the data range changes.
Choose a bin count or set a bin width
Excel offers two related ways to control the intervals. Number of bins specifies how many groups Excel should use. Bin width specifies the size of each interval instead. In the Bins section of Format Axis, select the option that suits the question you are trying to answer; these are alternatives, not two settings to apply simultaneously.
- Use Number of bins when you want a particular level of detail, or when comparing charts that should use the same number of groups.
- Use Bin width when a meaningful unit matters, such as grouping delivery times in 5-minute intervals or test scores in 10-point intervals.
- Leave the setting on Automatic when you want Excel to select a starting view and do not need a fixed grouping.
For a bin-width example, suppose measurements are recorded in whole seconds and a reader should compare counts for every 10 seconds. A width of 10 makes that interval size explicit. A chosen number of bins answers a different question: how many groups should span the values? If the data later includes a much larger maximum, a fixed number of bins can result in wider intervals, while a fixed width can result in more intervals.
How to choose a useful number
There is no universally correct bin count. It depends on the number of observations, how spread out they are, whether important values cluster near one another, and what the chart needs to communicate. A histogram is a descriptive view, so it is worth trying a few plausible settings and checking whether the main shape stays understandable.
For example, imagine 120 exam scores ranging from 0 to 100. Setting 10 bins gives a broad overview, with intervals roughly corresponding to ten-point ranges if the data span that full range. Setting 20 bins gives more detail, but some bars may be short or empty. Those settings are illustrative rather than a rule: scores may occupy only part of the 0–100 range, and Excel’s interval boundaries affect the exact groups. For a small sample, a high bin count can exaggerate apparent gaps; for a large dataset, too few bins can conceal clusters.
Compare a few settings while asking what the chart should reveal. Are you looking for a broad skew, one or more clusters, a gap, or an unusual tail? Keep the axis scale and source data consistent when comparing histograms. If two charts use different bin widths or boundaries, their bar heights may not be directly comparable even if both look polished.
Set overflow and underflow bins
The Bins section also includes Overflow bin and Underflow bin options. These are useful when you want to group extreme values together rather than give each extreme value its own place in the overall pattern. An overflow bin gathers values above a boundary, while an underflow bin gathers values below a boundary. Enter a boundary appropriate to the units and purpose of the chart.
For example, a chart of customer wait times might use an overflow group for waits above a chosen threshold so that unusually long waits are easy to count. The threshold should be a deliberate analytical choice, not a number selected just to make the chart look tidy. Grouping extremes changes what the bars represent: the boundary group can cover a different span than the regular bins. Explain that grouping if the chart will be shared, and do not interpret its bar as if it covered an ordinary interval of the same width.
If an extreme value appears to be missing, check whether the chart includes all intended source values and whether an overflow or underflow boundary is active. Also check the underlying cells for text, blanks, or values stored in an unexpected format. A histogram needs numerical observations for its bins; labels or numbers stored as text may not be grouped as expected.
Built-in Histogram chart versus the ToolPak
Excel also has a Histogram tool in the Analysis ToolPak. On Windows, open Data > Data Analysis > Histogram. That tool uses an input range and, optionally, a separate range of bin boundaries. In this workflow, you define the boundaries in worksheet cells rather than choosing a number of bins in the chart’s Format Axis pane. To change the grouping, edit the boundary list and run the analysis again.
The ToolPak is useful when you want a worksheet frequency table, control over specific boundary values, or output that can be used in further analysis. Its output is generally a calculated result, so it does not behave like the built-in chart that groups the source data through its axis settings. If the Data Analysis command is not visible, the Analysis ToolPak may need to be enabled in Excel’s add-in settings. On Windows, check File > Options > Add-ins, choose Excel Add-ins in the Manage box, click Go, and select Analysis ToolPak.
For a quick chart that you can adjust by changing the number of bins, the built-in Histogram chart is usually the simpler choice. For exact, custom boundaries or a frequency table, the ToolPak can be a better fit. These are different workflows, so do not look for the built-in chart’s Number of bins control in a ToolPak output table.
Common problems and practical checks
- The Bins section does not appear: Select the horizontal axis itself. If the chart is a column chart, use Chart Design > Change Chart Type and choose Histogram if that option is available in your Excel version.
- The chart has surprising gaps or counts: Check the selected source range, including whether it includes the intended rows and excludes unrelated values. Look for blank cells, text entries, and numbers stored as text.
- The bins do not use the intervals you expected: Confirm whether you selected Number of bins or Bin width. Check for underflow and overflow settings, and remember that a chosen count does not specify particular boundary values.
- The chart looks too noisy: Try fewer bins. If broad patterns disappear, add bins gradually rather than jumping to a very high count.
- You need consistent boundaries across charts: Use a deliberate bin width or a worksheet-based method with explicit boundaries. Matching only the number of bins does not guarantee matching interval limits when datasets have different ranges.
When editing a shared workbook, keep a note of the chosen bin rule and any special boundaries. That small piece of context helps another reader understand why the chart has its particular shape and makes comparisons more reliable.
Excel for Mac and Excel for the web
In current desktop Excel for Mac, the basic approach is similar: select the histogram’s horizontal axis, open the Format Axis pane, and adjust the bin options. Depending on the Mac interface, use the context menu or the formatting controls to open that pane; the key is to select the horizontal axis rather than a bar. The Windows instructions above use the Microsoft 365 ribbon and pane labels.
Excel for the web has a different interface and may not expose every chart-formatting control available in the desktop app. If you cannot find the Bins settings in the browser, open the workbook in the Excel desktop app and adjust the axis there. The chart remains part of the workbook, but the exact editing controls depend on the app and version.
Frequently Asked Questions
How do I make more buckets in an Excel histogram?
Select the horizontal axis, open Format Axis > Axis Options, choose Number of bins, and enter a larger count. More bins generally create narrower intervals and show more detail.
How do I change the width of histogram bins in Excel?
In the same Bins section of Format Axis, select Bin width and enter the interval size you want. Use a width that makes sense for the units in your data.
Why can’t I see Number of bins in Excel?
Make sure you selected the horizontal axis of a Histogram chart, not a regular column chart, a bar, or the vertical axis. The built-in Histogram chart’s bin controls are in the axis-formatting pane.
Can I set exact bin boundaries?
The built-in chart lets you set a bin count or width and add underflow or overflow boundaries. For a custom list of specific boundaries, use the Analysis ToolPak Histogram tool with a worksheet range of bin values.
Does changing the number of bins change my data?
No. It changes how Excel groups and displays the numeric values; it does not edit the source cells. The bar counts can look different because the intervals have changed, not because the underlying observations have changed.
What is a good number of bins for a histogram?
There is no single best count for every dataset. Start with a readable overview, then compare a few counts and choose one that shows the distribution without hiding meaningful patterns or creating distracting noise.
Related
- Excel Not Responding? Causes and Fixes
- How to Enter a Page Break in Excel and Control Printing
- Excel Data Validation Lists Based on Criteria
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Bar Graph Too Skinny? Fix Bar Width and SpacingIf an Excel bar graph looks too skinny, select a bar, open Format Data Series, and reduce Gap…
- Google Sheets Chart Custom Font: What You Can ChangeYes, you can change a chart’s font in Google Sheets: select the chart, open the Chart editor, choose…
- 3D Pie Chart in Excel: How to Create and Format ItTo create a 3-D pie chart in Excel for Microsoft 365 on Windows, select a two-column list of…
- Excel Stacked Bar Chart Combo: Build and Format ItYes, Excel can combine chart types, but a horizontal stacked bar chart paired with a line or another…
- Excel Pivot Table Not Showing Dates Correctly?If an Excel PivotTable is showing dates as numbers, text, individual days, or unexpected months, first check that…
- Excel Pivot Table: How to Use the Same Field TwiceYes. In Excel for Microsoft 365 on Windows, you can add the same source field to a PivotTable’s…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.