Skip to content

Guide

Bar Graph vs Histogram: What Is the Difference?

A bar graph compares categories; a histogram shows how one set of numbers is spread out. See the differences side by side and learn which one to use.

Published September 30, 2026

In this guide
  1. The Difference in One Picture
  2. Bar Graph vs Histogram: Side-by-Side Table
  3. What a Bar Graph Shows
  4. What a Histogram Shows
  5. Same Numbers, Two Different Questions
  6. How to Tell Which One You Are Looking At
  7. The Common Mistake: A Bar Graph of Ranges
  8. When to Use Each
  9. Five Examples: Which Chart Would You Use?
  10. Similarities Between Bar Graphs and Histograms
  11. Histogram vs Frequency Polygon
  12. Bar Graph vs Histogram vs Line Graph
  13. Try Both With Your Own Data

Bar graph vs histogram: the two charts look alike, and they are easy to mix up in class and at work. Both use rectangles, and both measure something by the height of each bar. The difference is the data behind them. A bar graph compares separate categories. A histogram shows how one set of numbers is spread out. This guide puts the two side by side with the same data, lists every difference in one table, and shows how to tell which one you are looking at.

The Difference in One Picture

Start with two charts about the same class of 40 students. The first asks each student to name a favorite fruit.

Favorite fruit of 40 studentsbar graph. Students: Apple 12, Banana 9, Grapes 8, Orange 6, Mango 5.Favorite fruit of 40 studentsEach bar is a separate category051015AppleBananaGrapesOrangeMangoApple, Students: 12Banana, Students: 9Grapes, Students: 8Orange, Students: 6Mango, Students: 5129865Number of students

A bar graph. Each bar is a separate category, and the bars stand apart. Sample data.

Show the data
CategoryStudents
Apple12
Banana9
Grapes8
Orange6
Mango5

The second takes the students’ test scores, groups them into ranges 5 points wide, and counts how many fall in each range.

Test scores of 40 studentsHistogram of 40 values in 8 bins. 55 to under 60: 1, 60 to under 65: 2, 65 to under 70: 4, 70 to under 75: 10, 75 to under 80: 12, 80 to under 85: 6, 85 to under 90: 3, 90 to 95: 2.Test scores of 40 studentsEach bar is a range of scores, and the bars touch05101555606570758085909555 to under 60: 160 to under 65: 265 to under 70: 470 to under 75: 1075 to under 80: 1280 to under 85: 685 to under 90: 390 to 95: 21241012632Number of studentsScore

A histogram. Each bar is a range of scores on a number line, and the bars touch. Sample data.

Show the data

58, 62, 64, 66, 67, 68, 69, 70, 70, 71, 72, 72, 73, 73, 74, 74, 74, 75, 75, 75, 75, 76, 76, 76, 77, 77, 78, 78, 79, 80, 80, 81, 82, 83, 84, 85, 86, 88, 90, 92

At first glance they are the same kind of chart. Look closer and almost everything differs. In the bar graph, Apple, Banana and Grapes are separate answers; you could list them in any order. In the histogram, the bars are slices of one number line, from 55 to 95; they have to stay in that order, and there is no space between them because there is no space between 74.9 and 75.

Wikipedia’s article on the histogram puts it in two sentences: in a histogram each bin is a different range of values, so the chart shows a distribution; in a bar chart each bar is a different category, so the chart compares categories.

Bar Graph vs Histogram: Side-by-Side Table

Feature Bar graph Histogram
Data Categories (names, groups, labels) One numeric variable (a measurement)
What each bar is One category One range of values, called a bin
Question it answers Which category is bigger? How are the values spread out?
Gaps between bars Yes No, the bars touch
Order of bars Any order, often sorted by size Fixed by the number line
Horizontal axis Category labels A number scale
Bar width Means nothing Is the width of the range
Can bars be reordered? Yes No
Typical examples Sales by region, votes by party Test scores, wait times, heights

What a Bar Graph Shows

A bar graph presents categorical data with rectangular bars whose lengths are proportional to the values they represent, in the definition from Wikipedia’s article on the bar chart. The bars can stand vertically, when they are often called columns, or lie horizontally.

The Categories Are Separate

Each bar is its own thing. Favorite fruit, sales by region, population by country: none of those categories sits between the others. That is why a bar graph has gaps between the bars, and why the order is up to you. The same article notes that when categories have no natural order they can be arranged in any order, and that bars sorted from highest to lowest are called a Pareto chart.

The Value Axis Starts at Zero

A bar’s length is its value, so the value axis should start at zero. A baseline above zero makes similar values look very different. That rule is covered in more detail in our stacked bar chart guide.

Bar Graphs Can Hold Several Series

Because each category is independent, a bar graph can show two or more series in each category, side by side or stacked. A histogram cannot do that cleanly, because its bins must tile the number line.

What a Histogram Shows

The NIST/SEMATECH e-Handbook of Statistical Methods says the purpose of a histogram is to summarize the distribution of a single numeric variable, and lists what it reveals: the center of the data, the spread, the skewness, any outliers and any multiple peaks. You build it by splitting the range of values into equal bins and counting the values in each.

The Bars Touch

OpenStax’s Introductory Statistics textbook describes a histogram as contiguous, adjoining boxes. The bins are consecutive and do not overlap, so a histogram has no gaps between bars. When a bin is empty, it stays on the axis as an empty space rather than being skipped, as Wikipedia’s article on histograms notes.

The Order Is Fixed

The bins follow the number line from left to right. Moving the 90 to 95 bar next to the 55 to 60 bar would make the chart meaningless.

The Bin Width Changes the Picture

A bar graph has a fixed set of bars: one per category. A histogram does not. You decide how wide the bins are, and Wikipedia’s histogram article sums up the consensus that there is no best number of bins, because different widths reveal different features. Our guide What Is a Histogram? shows the same data with too few and too many bins.

Width Can Matter as Much as Height

In the most general form of a histogram, bins can have different widths. Then the area of each bar, not its height, stands for the count. A bar graph never works this way.

Same Numbers, Two Different Questions

The clearest way to see the difference is to take one set of numbers and draw both charts. Here are the scores of the first 12 students as a bar graph, one bar per student.

Test score of each studentbar graph. Score: Ana 74, Ben 81, Cara 66, Dev 75, Eli 90, Fay 72, Gus 58, Hana 77, Ian 84, Jo 70, Kai 79, Lee 73.Test score of each studentA bar graph of the first 12 students: one bar per person020406080100AnaBenCaraDevEliFayGusHanaIanJoKaiLeeAna, Score: 74Ben, Score: 81Cara, Score: 66Dev, Score: 75Eli, Score: 90Fay, Score: 72Gus, Score: 58Hana, Score: 77Ian, Score: 84Jo, Score: 70Kai, Score: 79Lee, Score: 73Score

A bar graph of individual scores. It answers 'who scored what?' Each student is a category. Sample data.

Show the data
CategoryScore
Ana74
Ben81
Cara66
Dev75
Eli90
Fay72
Gus58
Hana77
Ian84
Jo70
Kai79
Lee73

This is a legitimate bar graph: each student is a category, and you can compare Eli with Gus. But ask “what is a typical score in this class?” and the chart is little help. Now group all 40 scores into ranges.

Test scores of 40 studentsHistogram of 40 values in 8 bins. 55 to under 60: 1, 60 to under 65: 2, 65 to under 70: 4, 70 to under 75: 10, 75 to under 80: 12, 80 to under 85: 6, 85 to under 90: 3, 90 to 95: 2.Test scores of 40 studentsEach bar is a range of scores, and the bars touch05101555606570758085909555 to under 60: 160 to under 65: 265 to under 70: 470 to under 75: 1075 to under 80: 1280 to under 85: 685 to under 90: 390 to 95: 21241012632Number of studentsScore

The histogram of all 40 scores. It answers 'how are the scores spread out?' Most students scored between 70 and 80. Sample data.

Show the data

58, 62, 64, 66, 67, 68, 69, 70, 70, 71, 72, 72, 73, 73, 74, 74, 74, 75, 75, 75, 75, 76, 76, 76, 77, 77, 78, 78, 79, 80, 80, 81, 82, 83, 84, 85, 86, 88, 90, 92

The histogram gives up the names and gains the shape. The question decides the chart: compare individuals, use a bar graph; describe the whole group, use a histogram.

Open the 40 scores in the histogram maker

How to Tell Which One You Are Looking At

Run through this checklist on any chart with bars.

  1. Read the horizontal axis. Names or labels mean a bar graph. A number scale with ranges means a histogram.
  2. Look for gaps. Gaps between every bar usually mean a bar graph. Bars that touch usually mean a histogram. Some authors, according to Wikipedia, recommend always leaving gaps in bar charts precisely so they are not mistaken for histograms.
  3. Try reordering. If you could shuffle the bars and the chart would still make sense, it is a bar graph.
  4. Ask what the height counts. In a histogram the height is the number of values in a range, or a percentage of them. In a bar graph it can be any quantity: money, votes, degrees.

The gap test is a hint, not a rule. Plenty of bar graphs are drawn with thin gaps or none, and the histogram chart that Excel’s Analysis ToolPak draws has gaps until you set the gap width to zero. The axis test is the reliable one.

The Common Mistake: A Bar Graph of Ranges

A frequent error is to count values into ranges and then draw an ordinary bar graph of those counts, with category labels such as “70-74” and gaps between the bars.

Test scores of 40 studentsbar graph. Students: 55-59 1, 60-64 2, 65-69 4, 70-74 10, 75-79 12, 80-84 6, 85-89 3, 90-94 2.Test scores of 40 studentsThe same counts drawn as a bar graph of labeled ranges05101555-5960-6465-6970-7475-7980-8485-8990-9455-59, Students: 160-64, Students: 265-69, Students: 470-74, Students: 1075-79, Students: 1280-84, Students: 685-89, Students: 390-94, Students: 21241012632Number of students

The same counts as a bar graph of labeled ranges. The numbers are right, but the gaps and text labels suggest separate categories. Sample data.

Show the data
CategoryStudents
55-591
60-642
65-694
70-7410
75-7912
80-846
85-893
90-942

The counts are identical to the histogram above, so what is wrong? Three things. The gaps suggest the ranges are separate things, when they are neighbors on one number line. The labels “70-74” and “75-79” leave out the values between 74 and 75, which matters for measurements with decimals. And nothing stops a reader from assuming the bars could be sorted. It is not a disaster, but a real histogram is clearer. If you build charts in Excel, our guide to creating a histogram in Excel shows how to remove the gaps.

When to Use Each

Use a Bar Graph When

  • Your data are categories: regions, products, answers to a multiple-choice question.
  • You want to compare amounts between those categories.
  • You want to sort the bars, highlight one, or show several series per category.

Build one in the bar graph maker.

Use a Histogram When

  • You have one numeric measurement for many items: times, sizes, scores, prices.
  • You want to see the shape: the center, the spread, the tails, any gaps.
  • You have enough values for the shape to be meaningful. OpenStax gives a rule of thumb of 100 values or more.

Build one in the histogram maker.

Use Something Else When

  • You have only a few numbers. A dot plot draws every value. Wikipedia’s article on the dot plot says it suits small to moderate data sets. Try the dot plot maker.
  • You want to compare the spread of several groups or spot outliers. The NIST handbook says box plots are much better than histograms for detecting outliers. Use the box plot maker.
  • You want a trend over time. That is a line graph, which joins points ordered by time. See the line graph maker.

Five Examples: Which Chart Would You Use?

Practice makes the rule stick. For each situation, decide before reading the answer.

Hours of Sleep Reported by 200 Students

Histogram. Hours of sleep is one numeric measurement, and 200 values is plenty to show a shape. Bins one hour wide, from 4 to 11, would show where most students fall and whether a group sleeps far less than the rest.

Number of Students in Each After-School Club

Bar graph. Chess, drama and robotics are categories. Each club gets a bar, and sorting the bars from largest to smallest makes the comparison instant.

Delivery Times for 500 Online Orders

Histogram. Time is continuous, and a histogram will show both the typical delivery time and the long tail of late orders. Delivery times cannot be negative, so expect the bars to trail off to the right.

Average Delivery Time for Each of Five Couriers

Bar graph. The numbers are times again, but now each bar is a courier, which is a category. The averages are single values per courier, not a distribution. To compare how spread out each courier’s times are, a box plot per courier would be the better chart.

Scores of 8 Students on a Quiz

Neither, probably. Eight values are too few for a meaningful histogram shape, and a bar graph per student only helps if you need names. A dot plot, which shows every score on a number line, is the honest choice.

Similarities Between Bar Graphs and Histograms

They do share a lot, which is why they are confused.

  • Both use rectangles whose height encodes a number.
  • Both should have a value axis that starts at zero.
  • Both can show counts, and a bar graph of counts per category can look very much like a histogram.
  • Both are old. The bar chart is credited to William Playfair in 1786, and Karl Pearson named the histogram in lectures in 1892, according to Wikipedia.

Histogram vs Frequency Polygon

A related chart is the frequency polygon. Instead of bars, it puts one point at the middle of each bin and joins the points with lines. OpenStax calls frequency polygons analogous to line graphs and notes they are useful for comparing distributions, because several polygons can be drawn on top of each other where several histograms would overlap.

Test scores of 40 studentsLine graph. Students: 52.5 0, 57.5 1, 62.5 2, 67.5 4, 72.5 10, 77.5 12, 82.5 6, 87.5 3, 92.5 2, 97.5 0.Test scores of 40 studentsFrequency polygon: one point at the middle of each 5 point bin05101552.557.562.567.572.577.582.587.592.597.552.5, Students: 057.5, Students: 162.5, Students: 267.5, Students: 472.5, Students: 1077.5, Students: 1282.5, Students: 687.5, Students: 392.5, Students: 297.5, Students: 0Number of studentsScore (middle of each bin)

A frequency polygon of the same 40 scores. Each point sits at the middle of a 5 point bin, with an empty bin added at each end so the line meets the axis. Sample data.

Show the data
CategoryStudents
52.50
57.51
62.52
67.54
72.510
77.512
82.56
87.53
92.52
97.50

Our line graph maker draws a frequency polygon from the bin middles and counts, as in the chart above.

Bar Graph vs Histogram vs Line Graph

A line graph joins data points ordered along the horizontal axis, usually time, with straight lines. It shows how one quantity changes. Use it for monthly sales or daily temperature. A bar graph compares categories at one moment, and a histogram describes how one measurement is distributed. If your horizontal axis is time, you almost always want a line graph. For the full range of options, see our guide to the types of graphs.

Try Both With Your Own Data

Paste a column of numbers into the histogram maker to see its distribution, or a list of categories and values into the bar graph maker to compare them. Both run in your browser, with no account, and export PNG or SVG.

Questions people ask

Why is a histogram not a bar graph?

Because its bars stand for ranges on a number line, not for separate categories. The bars must touch and stay in numeric order, their width carries meaning, and with unequal bins the area of a bar, not its height, shows the count. A bar graph has none of these rules.

When should you not use a histogram?

Skip it when the data are categories, when you have only a handful of values, or when readers need each exact value. It is also a weak choice for spotting outliers or comparing many groups; the NIST handbook points to box plots for outliers, and they place several groups side by side neatly.

How to tell if a graph is a histogram?

Look at the horizontal axis. If it is a number scale with ranges such as 60 to 70, and the bars touch in that order, it is a histogram. If the axis lists names or labels, and the bars have gaps and could be reordered without losing meaning, it is a bar graph.

When to use a histogram chart?

Use one when you have a single numeric measurement for many items, such as test scores, delivery times or heights, and you want to see its shape: where the values cluster, how widely they spread and whether one side trails off. It works best with dozens or hundreds of values.

What are the drawbacks of using a bar chart?

A bar chart only compares totals per category, so it hides the spread inside each category. It must start at zero to stay honest, which can make small differences hard to see. With many categories, labels crowd together, and a long run of bars gets hard to compare without sorting.

Why use a histogram instead of a bar graph?

A histogram answers a different question. A bar graph of each person's score lets you compare people, but it cannot show that most scores fall between 70 and 80. Grouping the scores into ranges and letting the bars touch reveals the distribution, which is usually what matters for a whole group.