Histogram Chart Maker

Paste one column of numbers and it counts how many fall into each of a set of equal-width bins. A histogram shows the shape of a distribution, which is a different question from the one a bar chart answers, and the bin width you choose materially affects what shape you see.

How to use it

  1. Paste a header row and a single numeric column.
  2. Read the bar heights as counts of values falling in each range.
  3. Check whether the shape is stable — a distribution that changes character with the bin count is telling you something.
  4. Choose a theme and export a high-resolution PNG.

How the bins are chosen

Bin count follows Sturges rule, the base-2 logarithm of the sample size plus one, clamped to between 5 and 20. The range from minimum to maximum is then divided into that many equal-width bins.

Sturges is a reasonable default and it is not the only rule. It assumes roughly normal data and tends to produce too few bins for large or heavily skewed samples, which oversmooths and can hide structure. The Freedman-Diaconis rule uses the interquartile range and the cube root of the sample size, which is more robust to outliers and usually gives more bins. Scott rule uses the standard deviation. All three are heuristics, and none is correct in a strong sense.

The clamping matters in practice. Below about 30 values, Sturges gives so few bins that the histogram is nearly uninformative, and the floor of 5 keeps it drawable rather than making it meaningful. Very small samples are better shown as a dot plot or a strip plot where every observation is visible.

Bin width changes the answer

This is the property that makes histograms both useful and easy to misuse. The same data with different bin widths can look unimodal, bimodal, or uniform, and all of those renderings are technically accurate.

Too few bins smooths away real structure. A genuinely bimodal distribution — two distinct populations mixed together, which is common in real data — collapses into a single broad hump if the bins are wide enough to span both peaks. That is a substantive finding lost to a display parameter.

Too many bins turns sampling noise into apparent structure. With 50 observations across 30 bins, most bins hold zero, one, or two values, and the resulting jagged profile shows randomness rather than the distribution.

The defence is to look at more than one binning. If a feature survives across several bin counts, it is probably real. If a second peak appears at one setting and vanishes at the next, it is probably noise. Publishing a single histogram without having checked is how spurious bimodality gets into reports.

Bin boundaries matter as well as bin count. Shifting all the boundaries by half a bin width, with the count unchanged, can move values across boundaries and change the shape. This is most visible when the data clusters on round numbers, which happens whenever humans have reported or rounded the values.

A histogram is not a bar chart

They look similar and answer different questions. A bar chart compares values across separate categories; a histogram shows the distribution of a single continuous variable.

Two consequences follow from that. The X axis of a histogram is a continuous number line, so the bars are adjacent with no gaps — a gap would imply a range with no possible values rather than a range with no observations. And the bars cannot be reordered, because their order is the numeric order of the underlying variable. Sorting a histogram by height destroys it.

Practically, if your X axis holds product names or regions, you want a bar chart. If it holds ranges of a measured quantity — response times, ages, order values — you want a histogram.

Reading the shape

The point of a histogram is that certain shapes carry specific meaning, and recognising them is most of the value.

A symmetric single peak suggests a process with a stable central tendency and random variation, which is what many measurement and manufacturing processes produce. A right-skewed distribution with a long upper tail is extremely common for anything bounded below by zero and unbounded above: incomes, response times, order values, file sizes. For skewed data the mean sits above the median and is a poor summary, which is why median income is reported rather than mean.

Two peaks almost always mean two populations. Response times with a fast peak and a slow peak usually indicate a cache hit path and a cache miss path. Splitting the data and analysing each population separately is nearly always more informative than describing the mixture.

A flat profile suggests either a genuinely uniform process — which is rare outside random number generation — or bins wide enough to have flattened everything. Isolated bars far from the main body are outliers, and the histogram is often where you first notice a sentinel value like 999 or a unit error sitting in the data.

At a glance

Input formatOne numeric column with a header
Bin ruleSturges, clamped between 5 and 20 bins
Bin widthEqual width across the min-max range
Minimum valuesTwo
ExportPNG at 2× display resolution

Frequently asked questions

What data does it need?

A single numeric column with a header row. Column names like Value, Amount, Count, or Data are recognised.

How is the bin count chosen?

Sturges rule — log base 2 of the sample size plus one — clamped between 5 and 20 bins over the min-max range.

Why does the shape change with different bin counts?

Because binning is a smoothing choice. Too few bins hide real structure, too many turn noise into apparent structure. Check that features survive across several settings.

How is this different from a bar chart?

A histogram shows the distribution of one continuous variable, so bars are adjacent and cannot be reordered. A bar chart compares separate categories.

What does a two-peaked histogram mean?

Almost always two populations mixed together. Splitting them and analysing separately is more informative than describing the mixture.

Read more

Distribution and correlation — Summary statistics hide things that a plot of every observation does not. That is the entire argument for these two chart types.

Related chart makers