or drag a file onto the table
Type data directly or paste from Excel. Enter moves down and adds a row when you reach the bottom. Add a column for each extra group you want to compare — paste delimiters and everything else are under More options.

Histogram

Statistics

How to use the histogram maker

  1. Enter your data. Type it into the table, paste it straight from Excel or Google Sheets, or drag an .xlsx / .csv file onto the table. Pressing Enter moves down a row and creates one when you reach the bottom.
  2. Name each group and pick its colour in the table header. Use + Column to compare several groups on one chart — they share the same bins and are drawn semi-transparent so the overlap stays readable.
  3. Chart title — printed above the chart, and used as the file name when you download the PNG or SVG.
  4. Histogram bins (More options) — how the bin width is chosen, or a width you set yourself.
  5. Axis titles (More options) — the labels drawn along each axis.
  6. Remove outliers (switch under the chart) — leave out values beyond Tukey's fences for a clearer picture of the bulk of the data.
  7. Press Calculate, then use the two switches under the chart to add the mean and median rules or a density curve, and the buttons in the chart's top-right corner to download it as PNG or SVG.

What is a histogram?

A histogram is a chart of numerical data that shows its distribution: the range is split into equal-width bins, and the height of each bar is the number of observations falling into that bin. If the sample is large and the bins are narrow, the histogram starts to resemble the density curve of the underlying distribution.

How to create a histogram

  1. Find the range of the data: Range = Max − Min.
  2. Choose the number of bins.
  3. Calculate the bin size: Bin size = Range / number of bins.
  4. For each bin, count how many observations fall inside it.
  5. Draw a bar chart in which each bar's height is that count.

How to choose the number of bins

Larger samples support more bins. These are the rules this histogram maker offers (n is the sample size, S the standard deviation and IQR the interquartile range):

  1. Freedman–Diaconis (the default) — bin width = 2 · IQR / n1/3. It is built on the IQR rather than on the standard deviation, so a few extreme values cannot inflate it. When the IQR is zero it falls back to Sturges.
  2. Sturges — number of bins = ⌈log2n⌉ + 1. Assumes the data is roughly normal, and under-bins skewed data.
  3. Scott — bin width = 3.49 · S / n1/3. Also assumes normality.
  4. Square root — number of bins = ⌈√n⌉. The rule most spreadsheets use.
  5. Rice — number of bins = ⌈2 · n1/3⌉.
  6. Manual width — whatever bin size you enter.

Start with the automatic calculation, then adjust the bin size to the histogram you prefer.

Should you exclude outliers?

Be careful before excluding outliers from any calculation — they may carry real information. That said, excluding them from a histogram can improve the picture a great deal, even when they are perfectly valid observations: a single distant point stretches the axis and squeezes everything else into one or two bars. When you choose Remove outliers under the chart, it is drawn without them, and the statistics table still reports which values were removed. See Tukey's fences for how the cut-off is defined.

Why is a histogram useful?

You can calculate the minimum, maximum, mean, median, mode and standard deviation of a sample, but none of them shows you its shape. A histogram does: whether the data is symmetric or skewed, whether it has one peak or several, and whether it has a long tail.