In Excel (2016 and later, including Microsoft 365)
- Put your numbers in one column, for example A1 (a heading) to A41.
- Select the data, heading included.
- Go to Insert → Insert Statistic Chart (the icon with blue bars) → Histogram.
- Excel picks the bins automatically. To change them, right-click the horizontal axis and choose Format Axis.
- Under Bins, choose Bin width (for example 5) or Number of bins. Tick Overflow bin or Underflow bin to group extreme values at the ends.
- Add a chart title and axis titles with the + button next to the chart.
Excel labels each bin with its range, such as [55, 60] and (60, 65]. The square bracket means the edge is included; the round bracket means it isn't. More on that below, because it changes your counts.
In Google Sheets
- Select your column of numbers.
- Go to Insert → Chart.
- In the Chart editor, open the Chart type list and choose Histogram chart.
- On the Customize tab, open Histogram and set the Bucket size (the bin width). You can also turn on item dividers to show each value.
- Use Chart & axis titles on the same tab to label the chart.
Counting the bins yourself with FREQUENCY
If you need the counts as numbers (for a frequency table, or for older versions of Excel), list the upper edge of each bin in a column and use FREQUENCY:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Score | Bin up to | Count | |
| 2 | 58 | 60 | 1 | |
| 3 | 62 | 65 | 2 | |
| 4 | 65 | 70 | 3 | |
| 5 | 68 | 75 | 6 | |
| 6 | 70 | 80 | 7 | |
| 7 | 71 | 85 | 8 | |
| 8 | 72 | 90 | 6 | |
| 9 | 73 | 95 | 5 | |
| 10 | 74 | (above 95) | 2 |
FREQUENCY counts how many values are less than or equal to each bin edge (and above the previous one), and returns one extra count at the end for anything above the last edge. For a single bin you can also write =COUNTIFS(A2:A41,">60",A2:A41,"<=65").
The bin-edge trap
A value that lands exactly on a bin edge has to go somewhere. Different tools make different choices, so the same data can give slightly different bars:
- Excel (the histogram chart and FREQUENCY) puts an edge value in the lower bin: 65 counts in 60–65.
- Most statistics textbooks, and the StatHow histogram maker, put it in the higher bin: 65 counts in 65–70, so each bin includes its lower edge.
It makes a visible difference. For the 40 exam scores above, Excel's bins of width 5 hold 1, 2, 3, 6, 7, 8, 6, 5 and 2 values; bins that include their lower edge instead (55–60, 60–65 …) hold 1, 1, 3, 6, 7, 7, 7, 5 and 3. Same data, slightly different bars.
Neither is wrong, but if your counts don't match a classmate's or your textbook's, check this first. With whole-number data, you can sidestep it entirely by using edges that values can't land on, such as 59.5, 64.5, 69.5.
Choosing the number of bins
A common starting point is Sturges' rule:
k = ⌈log2 n⌉ + 1
For 40 values, that's ⌈5.32⌉ + 1 = 7 bins. Divide the range by 7, round to a tidy width (2, 5, 10…), and start the first bin at a round number below the minimum. For exam scores from 58 to 98, a width of 5 starting at 55 gives 9 bins.
Then look at the result. Too few bins hide the shape; too many make it jagged. Real features, like a long right tail or two separate peaks, show up across several reasonable widths.
Reading your histogram
- Center: where the tallest bars are.
- Spread: how wide the bars reach.
- Shape: symmetric, skewed right (long tail of high values) or skewed left.
- Peaks and gaps: two separate peaks often mean two groups are mixed together; isolated bars may be outliers.
If you'd rather not fiddle with chart settings, paste the same column into the histogram maker. It picks the bins, lets you set the width or count, adds a normal curve if you want one, describes the shape and exports a PNG.