What a histogram shows, and why its bars touch

A histogram shows how one set of numbers is spread out, by counting values in equal ranges. Its bars touch and stay in order, which is what makes it different from a bar chart.

Short answer: a histogram splits the range of one number into equal bins and counts how many values fall into each. It looks like a column chart, but its columns are ranges of a number, so they touch, stay in order from low to high, and are never sorted by size. It answers "how are the values spread?", not "which is bigger?".

The chart, part by part: What is a histogram? draws its parts and shows how to read one, its kinds and the mistakes to avoid.

An average order value of 64 euros says nothing about whether most orders are around 60, or half are 20 and half are 110. A histogram shows which one it is, and those two shops need very different plans.

The short video below shows why a histogram is not a bar chart, and how trying a few bin sizes reveals the real shape of your data.

Nothing loads from YouTube until you press play. Then Google receives your IP address and may set its own storage. Narrated with an AI-generated voice. Privacy

How do you read a histogram?

050100150200400-209520-4018040-6015060-807080-10035100-12030120+
Orders by order value, 20-euro bins

The X-axis is the value cut into ranges, the Y-axis the number of values in each. Here most orders land between 40 and 80 euros, and a tail of large orders runs to the right. NIST's handbook lists what a histogram reveals: the centre, the spread, skew, outliers, and whether there is more than one peak.

How is it different from a bar chart?

PointHistogramBar chart
The bars areranges of one numberseparate categories
Gaps between barsnone, the ranges touchyes
Orderfixed, low to highfree, often sorted by size
It answershow are the values spread?which category is bigger?
Histogram or bar chart?

A quick test: if you could reorder the bars and lose nothing, it is a bar chart. If reordering breaks it, it is a histogram.

How many bins should you use?

There is no single right number; NIST mentions rules such as Scott's for the bin width. In practice, try three sizes. Too few bins hide the shape, too many turn it into noise. Keep the size where the shape is clear and stays when you nudge it.

What goes wrong?

  • Unequal bins. "0-10, 10-50, 50+" makes the wide bin look tall only because it is wide.
  • Sorting the bars. Sorting by count destroys the shape.
  • Too few values. With ten numbers, show the numbers.

Where can you check this?

Where do you start?

Power BI has no histogram visual, so you build one from bins: histograms in Power BI with bins and DAX shows both ways, with groups and with a DAX table. For categories instead of ranges, see bar charts in Power BI.

Keep reading

More from the blog.

Every post

Next

Building this? Say hello.

A question about this post, a pattern you would build differently, or the next thing you want written out: Behnia reads every message.