The clearest way to see the difference is to draw the same data both ways. Here, 30 made-up math test scores become a histogram first and then a bar graph of letter grades, and both charts below were built in Chartjuice's own makers from exactly these numbers.

One set of test scores, drawn two ways

These are 30 scores from one math test, sorted from lowest to highest. They're invented for this example, but they look like a typical class, with a few low scores, a big cluster in the middle and a few top marks.

47, 53, 58, 61, 63, 65, 67, 69, 70, 72, 73, 74, 74, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 88, 89, 91, 92, 94, 96, 100

The first chart is a histogram. Split the number line into 10-point bins and count how many scores land in each one. Each bin includes its lower edge, so a score of exactly 80 counts in the 80s bin, not the 70s.

Bin (score range) Students
40 to 49 1
50 to 59 2
60 to 69 5
70 to 79 9
80 to 89 8
90 to 100 5

Draw one bar per bin, in order from low to high, with the bars touching. The tallest bars sit in the middle and the shape tapers off on both sides, with a longer tail toward the low scores.

Histogram of 30 math test scores in 10-point bins from 40 to 100, with bars of 1, 2, 5, 9, 8 and 5 students Students Test score 0 2 4 6 8 10 40–49 50–59 60–69 70–79 80–89 90–99 100–109 chartjuice.com
The 30 scores as a histogram with 10-point bins. The bars touch because the bins run along one number line.

When we pasted these 30 scores into the histogram maker to check the table, Auto picked 10-point bins on its own and labeled them from 40 to 50 through 90 to 100. The bars came out 1, 2, 5, 9, 8 and 5, matching the table, and the perfect score of 100 sat in the last bar because the final bin includes both of its edges.

The second chart is a bar graph. This time, ignore the exact scores and sort each student into a letter grade (A is 90 and up, B is 80 to 89, C is 70 to 79, D is 60 to 69, F is below 60), then count students per grade.

Letter grade Students
A 5
B 8
C 9
D 5
F 3

Draw one bar per grade with a small gap between bars, so each bar answers a simple question: how many students earned this grade?

Bar graph of the same 30 students by letter grade: A 5, B 8, C 9, D 5 and F 3 Students Letter grade 0 2 4 6 8 10 A B C D F chartjuice.com
The same 30 students as a bar graph of letter grades. Each bar is its own category, so the bars stand apart.

The class and the test are identical in both charts, and only the grouping changed. The histogram kept every score on a number line and cut it into ranges, while the bar graph turned each score into a label first and then counted the labels. You can see what that costs in the F bar, which holds 3 students. The histogram shows that one of them scored in the 40s and two in the 50s, and the bar graph folded those two groups into one bar.

Numbers on one, categories on the other

The quickest way to tell a histogram from a bar graph is to look at what sits along the bottom.

On a histogram, the x-axis is a number line. In this example it runs from 40 to 100 and is cut into 10-point bins, so every bar is a range of numbers and the order is fixed, with the 70s always after the 60s.

On a bar graph, the x-axis holds separate categories, here the letter grades A, B, C, D and F. Each label is its own group, and nothing about the axis says how far apart the groups are.

That difference decides what each chart can show. The histogram shows the spread and shape of the class: scores run from the 40s to 100, 17 of the 30 students sit in the 70s and 80s, and a thin tail on the left shows the few who struggled. It also shows how close scores sit to a cutoff. A 79 is a C and an 80 is a B, one point apart, yet the bar graph puts them in different bars with no hint that they're neighbors. How to read a histogram goes further into reading that shape.

The bar graph gives the numbers a meaning the histogram can't. A bin labeled 80 to 89 is only a range, and the reader has to know it means a B, while the letter grade chart says directly that 8 students earned a B and 9 earned a C. If your question is how many students passed with a C or better, the bar graph answers it at a glance because the groups are already the ones you care about.

So the histogram tells you how the scores are spread out, and the bar graph tells you how many students landed in each group you defined. Many reports use both.

Why do histogram bars touch and bar graph bars don't?

The gap, or lack of one, comes from how each chart works rather than from style.

Histogram bars touch because the bins cover a number line with no breaks. The 70s bin ends exactly where the 80s bin begins, and every possible score belongs in some bin. If a bin has no students, the histogram keeps its place and draws it at zero height, because an empty spot says "nobody scored here," while a gap between bars would suggest the range was skipped. In the histogram maker, Gap between bars starts at 0% for exactly this reason.

Bar graph bars have space because each category stands alone. A and B are two separate groups rather than two stretches of one line, and the space tells the reader they're separate things being compared.

The same idea explains why you can reorder one chart and not the other. Put the letter grade bars in the order C, B, A, D, F, from tallest to shortest, and the chart still says the same thing. Move the 70s bar of the histogram to the far left and the chart stops showing a class at all, because the number line is broken and the shape, the tail and the middle cluster all disappear. On a histogram, the position of each bar is part of the data.

A one-question test for picking the right chart

When you're deciding when to use a histogram vs bar graph, ask whether you could put the bars in any order without changing the meaning.

If you could, the bars are separate categories and you need a bar graph. If the bars have to follow a number line, you need a histogram. The letter grades pass that shuffle test and the score bins fail it, and three more examples show how it works on other data.

  • A class picks a favorite subject: math, science, English, history or art. You can reorder those bars freely, so it's a bar graph, and sorting from tallest to shortest makes the comparison easier to read.
  • You record how many minutes each visitor stayed on a web page. A bar for 0 to 2 minutes has to come before 2 to 4 minutes, because minutes run along a line, so it's a histogram and the bars should touch.
  • You chart monthly sales by region. The sales totals are numbers, but they're the height of each bar, and the bottom holds North, South, East and West. Putting West first changes nothing, so it's a bar graph. If the bottom held months instead, order would matter and a line graph would often fit better, which bar graph vs line graph covers.

The sales example is the most common trap, since having numbers in your data doesn't make a histogram. What counts is what runs along the bottom of the chart. If you're still unsure, ask what each bar is counting. A histogram bar counts how many values fall inside a range, and a bar graph bar shows a count or value for one named group. For other chart choices, types of graphs matches each chart to the question it answers.

Common mistakes teachers mark wrong

Most lost points on these charts come from a handful of habits, and each has a plain fix.

Gaps between histogram bars

Spaces between histogram bars tell the reader the ranges are separate groups when they're really one number line. Redraw the bars so each one touches the next, and if a bin is empty, keep its place at zero height.

Bins that overlap at the edges

With bins written as 70 to 80 and 80 to 90, a score of 80 fits in both and the reader can't tell where it was counted. Pick a rule and state it, such as "each bin includes its lower edge," which puts 80 in the 80 to 90 bin, and label the axis so the rule is clear.

Unequal bins without a reason

If one bar covers 10 points and the next covers 20, the bars look taller or shorter because of bin size rather than because of the students. For a class assignment, use the same width for every bin unless the assignment tells you otherwise.

Histogram bars sorted by height

Sorting from tallest to shortest is a good habit for a bar graph, and it's easy to carry over by mistake. On a histogram it breaks the number line, so keep the bars in number order even when the chart looks uneven.

Bar graph bars drawn touching

This is the reverse of the first mistake. Letter grades are separate categories, so leave a small space between those bars.

Before you hand in either chart, check that a histogram's bars touch, its bins are equal and every value has exactly one home, and that a bar graph's bars are separated and its labels are categories.

Make both charts with the example scores

Drawing both charts yourself makes the difference stick better than reading about it, and you can use the same 30 scores from above.

To redraw the histogram, open the histogram maker and click Paste data. Put a column name such as Score on the first line, paste the 30 scores under it, one per line, and click Use this data. The maker picks the column as the Value under Chart columns by itself. To lock the bins to the table above, open the Style tab, go to Histogram options, set Bins to Width and type 10 in Bin width. Width bins start on multiples of the width, so the edges read 40, 50, 60 and so on.

To redraw the bar graph, open the bar graph maker and paste the letter grade table instead, with one column for the grade (A, B, C, D, F) and one for the number of students (5, 8, 9, 5, 3). Under Chart columns, the grade column becomes the Category and the count is ticked under Values. Don't paste the raw scores here, because a bar graph needs the counts per category, so the sorting into grades happens before the chart rather than inside it.

If your own scores live in a spreadsheet, click Upload file and choose a CSV, TSV, XLSX, XLS or ODS file instead of pasting. The file is read in your browser and never uploaded. With both charts on screen, try the shuffle test on each to see which one still makes sense.

Both makers are free and need no signup to make or download a chart, and a free account saves up to 3 charts if you want to come back to them.