Skip to content
LoveToCalc

Histograms

A measured quantity divided into classes on a number line. The areas of the bars show how many values fall in each class.

What the chart shows

A histogram shows the distribution of a quantity that has been measured many times: heights, times, weights, test scores. The measurements are grouped into classes, intervals that together cover the axis without gaps, and a bar stands over each class. The NIST/SEMATECH e-Handbook of Statistical Methods describes the purpose as summarising the distribution of a data set graphically: where the values lie, how spread out they are, whether the distribution is skewed and whether it has several peaks.

The general rule is that the area of a bar shows how many values lie in its class. When all classes are equally wide, which NIST gives as the most common form, the area is proportional to the height, and then the height shows the count as well. The vertical axis can then be labelled frequency, the count per class.

Frequency0246810140145150155160165170Height (cm)
The heights of 30 pupils in centimetres, in classes of 5 cm.
The data behind the figure
ClassCount
140–1452
145–1505
150–1559
155–1608
160–1654
165–1702

The classes are written as intervals. Here 150–155 means from 150 cm up to but not including 155 cm, so a pupil of exactly 155 cm falls in the class 155–160. Where the boundary values go has to be decided, and it should be stated with the chart.

How to read it

When it fits and when it does not

A histogram fits when one quantity has been measured many times and its distribution is what should show, and for comparing two distributions grouped into the same classes.

It does not fit when:

Histograms and bar graphs

Bar graph Histogram
Horizontal axis categories a number line, divided into classes
Order free, if the categories have no order given by the numbers
Gaps between the bars none: the classes sit edge to edge
The count is shown by the bar’s length the bar’s area, and its height when the classes are equally wide

Many descriptions of the histogram, in textbooks too, say that the height shows the count. That holds when the classes are equally wide, which is the most common case. It does not hold when they differ.

Common mistakes

Going deeper: unequal classes and frequency density

The same 30 pupils can be grouped into classes of different widths, such as 140–150, 150–155, 155–160 and 160–170. The two outer classes are 10 cm wide and hold 7 and 6 pupils; the two inner ones are 5 cm wide and hold 9 and 8.

Drawn with the height equal to the count, 140–150 looks nearly as large as 150–155, although it is twice as wide and the pupils in it are more spread out. The correct height is the frequency density, the count divided by the class width:

Class Count Width Frequency density
140–150 7 10 0.7 per cm
150–155 9 5 1.8 per cm
155–160 8 5 1.6 per cm
160–170 6 10 0.6 per cm
Frequency density00.511.52140150155160170Height (cm)
The same 30 pupils in classes of different widths. The height is the count per centimetre, and each bar’s area is the number of pupils.
The data behind the figure
ClassCountFrequency density
140–15070.7
150–15591.8
155–16081.6
160–17060.6

The area of a bar is then width times height, 10 · 0.7 = 7, the number of pupils in the class, and the area of the whole histogram is 30. The GCSE mathematics specification of AQA, an English exam board, includes histograms with equal and unequal class intervals.

If the frequency density is also divided by the number of values, the total area becomes 1. NIST describes this normalisation and that it is the appropriate one when a density function, such as a normal distribution, is drawn over the histogram. The area over an interval is then the share of values in the interval, in the same way as the area under the density function is the probability.

See also

Sources

Updated November 7, 2026