Teaching · For Teachers · Describing scores

How many bars should
the histogram have?

Type how many scores you have, the lowest and highest, their standard deviation and their interquartile range. The page works out the bar width and the number of bars that three standard rules suggest, then lays out the edges of the bars for a friendly width of your own, such as 5 points, so the chart starts and ends on round numbers.

$9.99a month · everything on Caveat

Cancel anytime. How plans and refunds work

Included with Caveat Plus ($9.99 a month or $99.90 a year), Caveat Family (up to 5 people, $14.99 a month) and Caveat Teams (25 people, $199 a month). Anything you bought before stays yours.

The distribution histogram builder

The worked example is 120 scores from 38 to 98 with a standard deviation of 11.2 and an interquartile range of 14, for a friendly width of 5. Nothing you type leaves this browser.

Loading the calculator. If nothing appears, turn on JavaScript.

What you get

Teaching · For TeachersIncluded with Caveat Plus

What you finish with
A sizing for a histogram of one set of scores: the bar width and number of bars by Sturges, Scott and Freedman-Diaconis, the edges and count of bars for a friendly width, the average scores per bar and a table of other widths.
Who it is for
Teachers and school teams who chart a set of scores and want to choose the bars before they draw.
Format
Browser calculator for a phone, tablet or computer, by touch or keyboard. Prints a summary; downloads a spreadsheet (.csv); export and import a file.
Access
Included with Caveat Plus ($9.99 a month) and Caveat Teams. It opens once you are signed in, on every device. Anything you bought before stays yours. Everything you type stays in this browser; nothing is sent to Caveat.
Where it lives
The For Teachers space in Caveat Teaching.
Support
Questions, a correction or a request: team@caveatacademic.com.

How to use it

  1. Name the set of scores.
  2. Type how many scores you have and their lowest and highest.
  3. Type the standard deviation and the interquartile range.
  4. Type the friendly width you would like.
  5. Read the three rules and the edges for your width, then draw the histogram.

Size the histogram

How the figures are worked out

Three rules for the width of a bar, and the edges laid out for a round width.

The worked example: from a range to bar edgesRange6038 to 98Width5friendlyBars12range over widthLast edge95from 35The worked example: from a range to bar edgesRange6038 to 98Width5friendlyBars12range over widthLast edge95from 35
The range is divided by a width to count the bars; the first edge is the lowest score rounded down to a multiple of the width.

Bars change the story

Too few bars hide the shape of the scores; too many show noise. A histogram of 120 exam scores can look like a single smooth hump with a few wide bars and show several small bumps with many narrow ones. The rules give a defensible starting point, and the friendly width gives edges a reader can read.

Why the rules differ

Sturges counts only the scores. Scott uses the standard deviation and Freedman and Diaconis the interquartile range, which a few extreme scores move much less. When the three agree, the choice hardly matters. When they split, as here, draw both.

Sources

  1. Sturges, H. A. (1926). The choice of a class interval. Journal of the American Statistical Association, 21(153), 65-66.
  2. Scott, D. W. (1979). On optimal and data-based histograms. Biometrika, 66(3), 605-610.
  3. Freedman, D., & Diaconis, P. (1981). On the histogram as a density estimator: L2 theory. Zeitschrift fur Wahrscheinlichkeitstheorie und verwandte Gebiete, 57, 453-476.
  4. Your own summary figures for the scores.

Arithmetic on summary figures; the page draws no chart. The worked example is made up. Your entries stay in this browser. Support: team@caveatacademic.com.

Written with AI, then checked before it is published. How we checkFound a mistake? Report it and we fix it, or refund you.Cancel anytime.