Yes, you can create a histogram in Excel using the built-in Histogram chart type, available in Excel 2016 and later (including Microsoft 365). This tool automatically calculates bins (the intervals that group your data) and plots the frequency of values in each bin. If you have an older version, you can still build one using the Analysis ToolPak add-in or a helper column with the FREQUENCY function. This guide covers the built-in chart method first, then the alternatives.
What You'll Need
- A column of numeric data you want to analyse (for example, test scores, ages, or sales amounts).
- Excel 2016 or newer for the built-in Histogram chart. If you have an older version, you'll need the Analysis ToolPak add-in (steps included below).
- Optional: a column of bin boundaries (the upper limits for each interval). If you skip this, Excel will create its own bins automatically.
Step-by-Step: Built-in Histogram (Excel 2016 and later)
- Prepare your data. Put your numeric values in a single column, with a header at the top (e.g., "Scores"). Make sure there are no blank cells in the data range, as they can cause errors.
- Select your data. Click and drag to highlight the cells that contain your data, including the header. If you have a separate bin range, do not select it yet.
- Insert the histogram. Go to the Insert tab on the ribbon. In the Charts group, click the Insert Statistic Chart icon (it looks like a small bar chart with a curve). From the dropdown, choose Histogram. Excel will immediately create a histogram chart on the same worksheet.
- Adjust the bins (if needed). Right-click the horizontal axis (the one with the numbers) and choose Format Axis. In the pane that opens, you'll see Bin width, Number of bins, Overflow bin, and Underflow bin options. Set a specific bin width (e.g., 10) or a number of bins (e.g., 5) to control the grouping. You can also set an overflow bin to lump all values above a certain number into one bar, and an underflow bin for values below a threshold.
- Customise the chart. Click on the chart to select it. Use the Chart Design and Format tabs to change colours, add a chart title, adjust axis labels, or change the chart style. To add data labels (the frequency numbers on top of each bar), right-click the bars and choose Add Data Labels.
- Move or resize the chart. Click and drag the chart to a new location, or drag the corner handles to resize it. The chart will update automatically if you change the source data.
Alternative Method: Analysis ToolPak (for older Excel versions)
- Enable the add-in. Go to File > Options > Add-ins. At the bottom, in the Manage dropdown, select Excel Add-ins and click Go. Check the box for Analysis ToolPak and click OK. (If it's not listed, click Browse and locate it, or install it from your Office installation media.)
- Prepare your data and bins. In addition to your data column, create a column of bin boundaries. For example, if your data ranges from 0 to 100, you might use 10, 20, 30, ... 100. These are the upper limits for each bin.
- Run the Histogram tool. Go to the Data tab and click Data Analysis (you may need to scroll to find it). In the list, select Histogram and click OK.
- Set the inputs. In the dialog box, set Input Range to your data column (including header, if you check the Labels box). Set Bin Range to your bin boundaries column. Choose an output location (a new worksheet or a cell on the current sheet). Check Chart Output to get a chart, and optionally Pareto (sorted histogram) or Cumulative Percentage.
- Click OK. Excel will produce a table of bins and frequencies, plus a chart. Note that this chart is a static bar chart, not a live histogram; if your data changes, you'll need to rerun the tool.
Alternative Method: FREQUENCY Function (any version)
- Create a bin range. As above, list the upper limits for each bin in a column.
- Enter the formula. Select a range of cells that is one row taller than your bin range (e.g., if you have 5 bins, select 6 cells). Type
=FREQUENCY(data_range, bin_range)and press Ctrl+Shift+Enter (not just Enter) to enter it as an array formula. The cells will fill with the count of values in each bin. - Create a bar chart. Select the frequency results and insert a regular Column Chart. This gives you a histogram-like visual, but you'll need to adjust the gap width to make the bars touch (right-click bars > Format Data Series > set Gap Width to 0%).
Common Mistakes
- Selecting the wrong data range. Including empty cells or text values can cause errors or blank bars. Double-check your selection.
- Using the built-in histogram with non-numeric data. The histogram only works with numbers. If you have text, you'll need to count categories manually with COUNTIF.
- Forgetting to adjust bins. Excel's automatic bins may not suit your data. For example, with ages 18-65, default bins might be too wide or too narrow. Always review the axis and set bin width that makes sense for your analysis.
- Misinterpreting the overflow/underflow bins. These bins include all values above or below the specified number. If you set an overflow bin at 100, that bar will include 100, 101, 1000, etc. Make sure that's what you want.
- Using the Analysis ToolPak without enabling it. The Data Analysis button won't appear until the add-in is enabled. If you can't find it, go to Add-ins and activate it.
Tips
- Choose meaningful bin widths. For a quick rule, take the range of your data (max - min) and divide by the number of bins you want (5-20 is typical). Round to a convenient number.
- Use the histogram to spot outliers. Bars that are far apart from the rest can indicate unusual values in your data.
- Add a title and axis labels. Right-click the chart title to edit it, and use the + icon (Chart Elements) to add axis titles. This makes your chart understandable to others.
- Copy the chart as an image. If you need to paste the histogram into a report, click the chart, then Copy (Ctrl+C), and paste into Word or PowerPoint. It will remain editable as a chart.
- Update bins after data changes. If you add or remove data points, the histogram will update automatically if you're using the built-in chart. For the FREQUENCY function, you may need to re-enter the array formula if the range size changes.
Troubleshooting
If the Histogram option is greyed out: This means your data is not numeric or you have selected a single cell. Make sure you have a column of numbers selected, and that there are no text entries in the range.
If the chart shows a single bar with all data: This usually means the bin width is too large. Right-click the horizontal axis, go to Format Axis, and decrease the Bin width or increase the Number of bins.
If the Analysis ToolPak doesn't appear in the add-ins list: Click Browse in the Add-ins dialog and navigate to your Office installation folder (e.g., C:\Program Files\Microsoft Office\root\Office16\Library\Analysis). If it's not there, run Office repair from Control Panel.
If the FREQUENCY function returns a #VALUE! error: This usually means you didn't enter it as an array formula. Select all output cells, press F2, then Ctrl+Shift+Enter. Also check that the bin range is sorted ascending.
If the chart doesn't update when data changes: For the built-in histogram, it should update automatically. If not, click the chart and check that the data range is correct (Chart Design > Select Data). For the Analysis ToolPak output, it's static - you must rerun the tool.
Frequently Asked Questions
How do I change the number of bins in a histogram?
Right-click the horizontal axis and choose Format Axis. Under Bin width, type a number to set the width of each bin, or under Number of bins, type how many bins you want. Excel will recalculate automatically.
Can I make a histogram in Excel Online?
Yes, Excel for the web supports the built-in Histogram chart type. The steps are the same: select your data, go to Insert > Charts > Histogram. The Analysis ToolPak is not available in the web version, but the built-in chart should be sufficient for most needs.
What's the difference between a histogram and a bar chart?
A histogram shows the frequency distribution of continuous numeric data, with bins that are equal intervals and bars that touch (no gaps). A bar chart compares categories, with gaps between bars. In Excel, the built-in histogram automatically makes bars touch; if you use a regular column chart for your FREQUENCY results, you need to set Gap Width to 0% to make them touch.
How do I add a normal distribution curve to my histogram?
You can add a bell curve by calculating the normal distribution using the NORM.DIST function and adding it as a second series. This is an advanced technique; a simpler alternative is to use a scatter plot with a smooth line overlaid on the histogram. Excel does not have a one-click option for this.
Why does my histogram have a bar for "More"?
That's the overflow bin. It appears when you have values above the highest bin boundary. You can set a specific overflow bin value in Format Axis to control what goes into that bar, or you can increase the bin width or number of bins to include those values in regular bins.
Can I create a histogram with non-numeric data, like categories?
No, a histogram is specifically for numeric data. If you have categories (e.g., "Red", "Blue", "Green"), use a regular column chart or a pivot table to count frequencies. The built-in histogram will not accept text data.