Excel Histogram X-Axis: Set the Range and Bins

Charts & pivot tables · Updated November 19, 2026

In Excel for Microsoft 365 on Windows, select the histogram’s horizontal axis, open Format Axis, and adjust Bin width or Number of bins; use Underflow bin and Overflow bin to group values at the low and high ends. Excel’s built-in histogram does not provide ordinary minimum and maximum axis-bound fields, so for exact custom interval boundaries, create a frequency table and chart that table instead.

What the Histogram X-Axis Represents

A histogram’s x-axis is not a list of individual observations. It divides numeric data into ranges, called bins, and the y-axis shows how many observations fall in each range. For example, a bin labeled 10–15 represents a range of values around those boundaries, while the corresponding bar’s height indicates the count.

This distinction matters when you try to set a range. A standard chart axis can often be given a minimum and maximum value, but a histogram axis is controlled mainly by its bins. You choose how many bins to show or how wide they are, and Excel determines the intervals from the data and bin settings. You can also set tail bins, but those collect observations rather than simply hiding them.

Change the Bin Width or Number of Bins

First create a built-in histogram from numeric observations. Select the cells containing the data, then choose Insert > Insert Statistic Chart > Histogram. Click the horizontal axis labels, right-click, and choose Format Axis. In the pane, open Axis Options and find the Bins controls.

  • Bin width: Sets the size of each interval. A width of 5 groups values into intervals five units wide.
  • Number of bins: Tells Excel how many intervals to use. Excel calculates a width to fit the data.
  • Automatic: Lets Excel choose the binning. This is convenient for a quick overview, but it may not suit a particular comparison or reporting standard.
  • Underflow bin and Overflow bin: Set thresholds for grouping low-end and high-end values, respectively.

For example, suppose a column contains exam scores from 0 to 100 and you want to inspect the distribution in ten-point groups. Setting the bin width to 10 gives a more interpretable scale than letting Excel choose an arbitrary interval. The specific labels and first interval can still depend on the data and Excel’s bin placement, so inspect the chart after changing the setting.

Use Underflow and Overflow for Tail Values

Underflow and overflow are useful when you want unusually low or high observations collected into edge bins. If you set an underflow threshold, values at or below that cutoff are grouped into an underflow bin. An overflow threshold groups values above its cutoff into an overflow bin. The remaining observations are divided among the regular bins.

Imagine recording response times in seconds, where most results fall between 10 and 50 but a few are much slower. An overflow bin above 50 can keep the main part of the chart readable while showing how many unusually slow results there are. It does not delete those results, and it does not mean the chart’s data has been restricted to 10–50. The tail observations remain represented in a grouped bar.

These options are therefore not the same as setting a hard display minimum and maximum. If you need to omit observations outside a range, filter or otherwise exclude them from the chart’s source data, and make that choice clear to readers. If you need bins whose exact start, end, and inclusivity are fixed, use a frequency table.

Build a Frequency Table for Exact Boundaries

A manual frequency table gives you control over every interval. Put the observations in A2:A11. In C2:C4, enter lower limits 10, 20, and 30; in D2:D4, enter upper limits 20, 30, and 40. Those rows describe 10 to less than 20, 20 to less than 30, and 30 to less than 40. With the data 12, 14, 17, 19, 21, 24, 27, 31, 34, and 38, the frequencies are 4, 3, and 3.

With observations in A2:A11, the lower bound for a bin in C2, and its upper bound in D2, enter this formula in E2 and fill it down through E4:

=COUNTIFS($A$2:$A$11,">="&C2,$A$2:$A$11,"<"&D2)

The formula counts values greater than or equal to the lower limit and strictly less than the upper limit. This half-open convention prevents a value on a shared boundary, such as 20, from being counted in both neighboring bins. For the example data, E2:E4 return 4, 3, and 3, for a total of 10 observations. If the final interval must include its upper endpoint, use a separate final-bin formula with a less-than-or-equal condition, and ensure that adjacent intervals still cannot double-count boundary values.

Make a label for each interval, such as 10–<20, 20–<30, and 30–<40, and place the labels beside the counts. Select the labels and frequencies, then choose Insert > Insert Column or Bar Chart > Clustered Column. To make the columns touch like histogram bars, select a bar, open Format Data Series, and reduce Gap Width, often to 0%. This is a regular column chart built from calculated frequencies, not Excel’s built-in Histogram chart, but its categories and counts are explicitly controlled.

Choose a Method That Matches the Goal

Use the built-in histogram when the goal is a quick distribution view and adjustable bin sizing is enough. It is convenient for exploratory analysis because changing the data or bin width updates the chart without maintaining a separate set of count formulas. Underflow and overflow bins are also appropriate when the tails should remain visible but be summarized.

Use a frequency table when bins must match a specification, when different groups need identical intervals, or when you need custom labels such as age bands or product-size ranges. It also makes the counting rule explicit, which is important when values exactly on boundaries could be interpreted differently. A manually controlled chart is easier to compare across reporting periods because the interval definitions do not shift as the data changes.

For instance, comparing this month’s and last month’s delivery times with automatically chosen bins can be misleading if each chart uses different intervals. A shared table of fixed ranges makes a side-by-side comparison more meaningful. Conversely, if you are simply checking whether one dataset has a long tail or several clusters, the built-in chart is usually faster.

Formatting Is Not the Same as Changing the Range

Changing the number format of axis labels affects how values look, not which observations belong to each bin. For example, displaying a decimal with fewer digits does not change the underlying bin boundaries. Likewise, resizing the chart or changing its title does not alter the range covered by the bins.

Excel’s built-in histogram uses interval categories on its horizontal axis, rather than a conventional continuous value axis with freely editable minimum and maximum bounds. That is why entering axis bounds in the usual way is not the central control for this chart type. If a reader needs exact numeric edges, display the intended boundaries in a frequency table or chart labels instead of relying on rounded-looking axis text.

Common Problems and Checks

  • Excel shows unexpected intervals: Check whether the chart is set to Automatic, then enter a bin width or bin count. Remember that changing width does not necessarily let you type an exact starting boundary.
  • Some data seems missing: Check for values outside the plotted bins, including unusual outliers, and review any underflow or overflow settings. Also confirm the selected source range includes all intended rows.
  • The chart has very few or very many bars: Adjust the width or number of bins. Narrow bins reveal detail but can make random variation look important; wide bins simplify the picture but can conceal clusters.
  • Values are not counted as expected: Check that entries are numeric rather than numbers stored as text, and verify blanks, errors, and boundary rules. A value of 20 belongs in the next interval when the preceding interval is defined as less than 20.
  • Labels seem rounded or hard to read: Widen the chart or adjust the axis number format, but remember that label formatting does not redefine the bin boundaries.

Dates and times can be charted as numbers, but their underlying serial values may make automatically chosen intervals unintuitive. For day-based reporting, a fixed-width frequency table with clearly labeled date ranges can be easier to interpret. Before publishing, check the counts against the number of valid observations and confirm whether any records were intentionally filtered out.

Excel for Mac and Excel for the Web

In Excel for Microsoft 365 on Mac, the Histogram chart and axis formatting controls are available, although ribbon layout and pane placement can differ from Windows. Look for the histogram under the Insert chart options, then select the horizontal axis and open its formatting pane to find bin settings. If a control is not visible, expanding the pane or checking the desktop app’s chart options may help.

Excel for the web can open and display charts, but chart creation and formatting capabilities may differ from the desktop app and can change over time. If you cannot find the histogram-specific bin controls in the browser, open the workbook in the desktop version of Excel to adjust them. A frequency table remains a practical alternative when you need exact range definitions or consistent categories.

Frequently Asked Questions

Can I set a histogram’s exact x-axis minimum and maximum in Excel?
Not as ordinary minimum and maximum bounds on the built-in Histogram chart. Use underflow and overflow bins to group tail values, or make a frequency table with the exact interval limits you need.

How do I change the width of histogram bars?
For Excel’s built-in Histogram chart, right-click the horizontal axis, choose Format Axis, and set Bin width under Axis Options. For a column chart made from a frequency table, adjust Gap Width in Format Data Series; that changes the spacing between bars, not the numeric interval size.

Does an overflow bin remove high values?
No. It groups values above the specified threshold into an overflow category. To leave those values out, exclude them from the chart’s source data rather than using an overflow bin.

Why does my histogram start at a different value than expected?
Excel determines the intervals from the data and bin settings, so a chosen width does not always establish the exact first boundary you have in mind. Use a manually defined frequency table if the starting edge must be fixed.

Can I use custom labels such as 10–19 and 20–29?
Yes. Create those ranges in a frequency table, count the values in each range, and chart the labels and counts as a clustered column chart. That gives direct control over category wording and boundaries.

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.