An introduction to histograms and how they are used to illustrate data.

PDFFor a printer-friendly PDF version of this guide, click here

This guide describes what histograms are and the types of data that they can be used to present. It outlines some of the problems in drawing accurate histograms in Excel and suggests some ways of overcoming these.

Other Useful Guides: Bar Charts, Pie Charts

What are histograms?

Histograms are a special form of bar chart where the data represent continuous rather than discrete categories. This means that in a histogram there are no gaps between the columns representing the different categories. In the example below, a histogram has been used to show the average height of children of different ages in 1837. A histogram is used because age is a continuous rather than a discrete category.

In a bar chart the length of the bar indicates the size of the category, but in a histogram it is the area of the bar that is proportional to the size of the category. This difference is due to the fact that in a histogram both the x-axis and y-axis have a scale, whereas in a bar chart only the y-axis has a scale.



Grouping data in a histogram

A continuous category, such as age, may have a large number of possible values and this could result in complex histogram with so many columns that it becomes difficult to interpret the information. For this reason the data in a histogram are often grouped to reduce the number of categories. For example, instead of drawing a bar for each individual age from 16 onwards, the data in the histogram below have been grouped into a series of continuous age ranges: 16-24, 25-34 etc.




However, when grouping the original data, it is important to remember that in histograms the size of the category is represented by the area of the bars and not their length. A common error when constructing histograms is to overlook this relationship and this can produce a distorted view of the data.

This usually occurs if the data have been grouped into uneven sized categories, for example if the age ranges were 0-10, 11-15, 16-21, each would represent a different number of years (10, 5, 6) and therefore the corresponding bars in the histogram would have to have different widths to maintain the relationship between area and category size.

In the example above, the bar representing the age range 16-24 is slightly narrower than that for the age ranges 24-34, 35-44 etc. because it includes only 9 years whereas the others include 10. In the same way the bar representing ages over 75 is broader than the other bars since it represents an open-ended category.

Histograms and Excel

The spreadsheet package Excel does not include histograms amongst its standard chart types. It is however, possible to draw basic histograms using Excel by selecting either the column or bar chart types. By default these chart types include a gap between the columns representing each category but this can be removed, in order that adjacent columns butt onto one another, resulting in the chart appearing as a histogram.
This is achieved in the following way:

  1. Highlight any of the columns in the graph by clicking on it with the mouse;
  2. Select Format selected data series from the main menu bar. This will bring up a dialogue box titled Format data series
  3. In the dialogue box select the Options heading;
  4. Adjust the gap size setting to 0.

Unfortunately, Excel does not include the ability to alter the width of the columns or bars drawn for each category, and therefore it is not suitable for drawing histograms for grouped data when the categories represent groups of different sizes.

Where next?

This guide has outlined the role of histograms for graphing continuous data. It has also highlighted some of the differences between histograms and bar charts. Information about other graph and chart types and any specific design issues related to them can be found in the companion study guides: Bar Charts and Pie Charts. The study guide Presenting Numerical Data provides guidance on when to use graphs to present information and compares the uses of different graph and chart types.

Share this page:

Studying online

Studying online

See our range of online resources to find out more about learning with Lecture Capture and preparing for forthcoming exams and assessments.