Confident CellsExcel practice Start free

Histograms and box and whisker charts: practice exercises

Histogram, bins, bin width, number of bins, overflow and underflow bins, box and whisker, quartiles, inclusive and exclusive median, mean markers, outliers. 7 exercises on real-looking data, each checked as you go. The full lesson is part of Pro.

In the lesson

This lesson has strips of Excel's Insert and Chart Design buttons above a practice sheet: make and change each chart as you would in Excel, and each task is checked as you go.

Open the Histograms and box and whisker charts lesson

How it works

Some charts work something out before they draw. A histogram sorts a column of numbers into bins (0 to 10, 10 to 20...) and draws how many fall in each. A box and whisker chart shows the middle half of the numbers as a box, the median as a line across it, and how far the rest spread.

Both are under Statistic ▾ on the Insert strip. Format Selection… sets the bins (Format Axis in Excel), or the quartiles and markers (Format Data Series).

A histogram: an example

Twenty-four pupils' test scores are in B2:B25. A column chart would draw 24 columns, one for each pupil. A histogram answers a better question: how many scored 40 to 50, 50 to 60, and so on?

Select the scores and choose Statistic > Histogram. Excel sorts them into bins and draws one column for each, as tall as the number of scores in it. Its labels read like (50, 60]: more than 50, up to and including 60. The first bin starts at the lowest score.

Excel picks the bin width itself to start with (Automatic), which often gives odd edges such as 47.44. Double-click the horizontal axis for Format Axis, and under Bins choose:

  • Bin width: 10 makes bins 10 wide.
  • Number of bins: 5 makes exactly five.
  • Overflow bin: every value above, say, 90 in one last bar (>90). Underflow bin: every value at or below, say, 40 in one first bar (≤40).
  • By Category: a bar for each label instead, when the data is text.

Windows: Insert tab, Insert Statistic Chart, Histogram.

Mac: Insert tab, Insert Statistic Chart (the chart button with the histogram), Histogram. Format Axis opens as a pane on the right.

Box and whisker

Times for three teams are in A1:B24: the team in column A, minutes in column B. Select them and choose Statistic > Box and Whisker. Each team gets a box:

  • the box runs from the first quartile to the third: the middle half of the times;
  • the line across it is the median, and the X the mean;
  • the whiskers reach the smallest and largest times that aren't far out;
  • a dot on its own is an outlier: more than 1.5 box-heights beyond the box.

Right-click a box and choose Format Data Series to show or hide inner points, outlier points, mean markers and a mean line, and to pick the Quartile Calculation: Exclusive median (Excel's choice, as QUARTILE.EXC) or Inclusive median (as QUARTILE.INC). They differ only a little, but an exam task may name one.

What you'll practise

  1. How are the test scores spread out? Make a Histogram: click inside the data, then Statistic ▾ > Histogram.
  2. Excel's own bins have awkward edges. Make each bin 10 wide: Format Selection…, Bin width 10.
  3. The manager wants exactly 4 bars. Set the Number of bins to 4.
  4. Make bins 10 wide, and put every score above 90 in one Overflow bin and every score of 40 or below in one Underflow bin.
  5. Compare how long each team takes, with a Box and Whisker chart: click inside the data, Statistic ▾ > Box and Whisker. Each team gets its own box.
  6. Configure the box and whisker chart to use inclusive median quartile calculation and to hide the mean markers.
  7. Create a histogram that shows the distribution of the delivery times in B2:B20. Set the bin width to 5.