Histogram vs bar graph

They both use bars, but they answer different questions. Here’s how to tell them apart in ten seconds, and which one your data needs.

The short answer

A bar graph compares amounts across separate categories (coffee types, countries, months). A histogram shows how one continuous number is distributed, by counting how many values fall into each range (bin).

Bar graphHistogram
Data on the x-axisCategoriesRanges of a number
Gaps between barsYesNo, bins touch
Can reorder barsYesNo, numeric order
Bar height meansThe value for that categoryHow many values in that range
Typical question“Which sold most?”“How spread out are the times?”

Same data, different bin width

30 commute times in minutes. Drag the bin width and watch the shape change — the data never does.

102030405060

Width 2 shows mostly noise; 25 squashes everything into two bars. Around 5–10 shows the real story: most people commute 20–35 minutes, with a long tail to the right.

A quick test

Ask: could a value fall between two of my bars? A commute of 24.5 minutes falls between 20 and 30, so commute times need a histogram. Nothing lies between “Latte” and “Mocha”, so drinks need a bar graph.

Make either one

Paste raw numbers into the histogram maker and it counts them for you. For categories and their values, use the bar graph maker.

Questions

Is a histogram a type of bar graph?

They look alike, but they answer different questions. A bar graph compares separate categories; a histogram shows the distribution of one continuous number grouped into ranges (bins).

Why do histograms have no gaps?

The bins are touching ranges of a continuous scale: 10–20 ends exactly where 20–30 begins. A gap would suggest missing values.

Can you reorder the bars?

In a bar graph, yes; sorting by size often helps. In a histogram, no; the bins must stay in numeric order.

Which one do I need for grades or ages?

If you have raw scores or ages and want to see how they are spread, use a histogram. If you already have named groups (A, B, C grades as categories), a bar graph is fine.