Histogram vs bar graph: the difference that matters
By Jude Wallis · Published
A histogram shows the distribution of quantitative data, so its bars touch and the horizontal axis is a number line with a fixed order. A bar graph shows counts for categorical data, so its bars have gaps and the categories can be reordered. Touching bars versus gaps is the fastest tell.
AP Statistics: Unit 1 (topics 1.4 Graphical Representations for One Categorical Variable, 1.5 Graphical Representations for One Quantitative Variable). Bar graphs (topic 1.4) and histograms (topic 1.5) sit in Unit 1 of the Fall 2026 AP Statistics course, on graphing one categorical variable and one quantitative variable.
Histogram vs bar graph: the short answer
A histogram and a bar graph both use rectangular bars whose height is a count, which is why they are so easy to mix up. They answer different questions because they display different kinds of data. A histogram summarizes one quantitative variable, a variable measured as a number, such as height in centimeters or minutes spent on homework. A bar graph summarizes one categorical variable, a variable that sorts each observation into a group, such as eye color or favorite sport.
That one difference in data type drives every visible feature of the two graphs. Because a histogram sits on a number line, its bars touch and their left-to-right order is fixed. Because a bar graph sits on a list of separate categories, its bars have gaps and you can arrange them in any order. Getting the data type right, which you can check with the quantitative versus categorical distinction, tells you which graph to draw and which rules apply.
What each graph shows
A bar graph, also called a bar chart, displays the frequency (count) or relative frequency (proportion) for each category of a categorical variable. Each bar stands for one category, and its height is how many observations fell in that category, or the fraction that did. You may order the bars however helps your reader: alphabetically, from tallest to shortest, or in a natural sequence like days of the week. The order carries no statistical meaning, so rearranging the bars never changes what the graph says.
A histogram displays the distribution of a quantitative variable by grouping the values into equal-width intervals called bins. Each bar covers one bin along the number line, and its height is the count, or proportion, of values that land inside that interval. Because the axis is numeric, the bins run in order from smallest to largest and cannot be rearranged. Changing the bin width changes how the histogram looks, so the same data can appear smooth with wide bins or spiky with narrow ones.
A histogram can also be drawn horizontally, with the bins running up the vertical axis; the touching bars and the fixed numeric order stay the same either way.
Differences you can see at a glance
Here are the differences you can spot without doing any arithmetic, straight from a picture of each graph.
| Feature | Histogram | Bar graph |
|---|---|---|
| Data type | Quantitative (numeric) | Categorical (groups) |
| Bars | Touch, no gaps | Separated by gaps |
| Horizontal axis | Number line of intervals (bins) | List of category labels |
| Bar order | Fixed, smallest to largest | Flexible, reorder freely |
| A bar's height | Count in a value interval | Count in one category |
The touching-bars-versus-gaps difference is the quickest to see, because it comes straight from whether the horizontal axis is a number line or a list of labels.
Reading shape from a histogram
A histogram has a shape, and that shape carries information, because its bars sit in a fixed numeric order. Read three things off it. First, where the tall bars cluster, which marks the peak; that peak locates the center only when the shape is roughly symmetric, since for a skewed distribution the mean and median sit toward the longer tail, away from the tallest bars. Second, how far the bars spread along the axis, which gives the range.
Third, check whether one side has a longer tail. If the longer tail points toward the larger values on the right, the distribution is right-skewed; if it points toward the smaller values on the left, it is left-skewed, a difference covered in skewed left versus skewed right. A roughly even shape with a single central peak is called symmetric.
A bar graph has no shape in this sense. Because you can reorder its categories at will, any skew you think you see would disappear if you sorted the bars differently. That is why questions about shape, center, and spread apply only to graphs that keep quantitative values in order, such as a histogram, a dotplot, or a stem-and-leaf plot. For a compact summary of the same quantitative data, a boxplot shows center and spread through the five-number summary.
When each graph is the wrong choice
The classic trap is a variable whose values are digits but not measurements. Jersey numbers, zip codes, and area codes are written as numbers, yet the 34 on a jersey is only a label, not a quantity larger than 12. Treat those as categorical and use a bar graph, because ordering them by size or averaging them would be meaningless. The test is simple: if adding or averaging the values makes no sense, the variable is categorical.
Going the other way is also wrong. Do not draw a histogram of favorite sport or blood type, because there is no number line to place the categories on and no natural smallest-to-largest order. And do not close the gaps on a bar graph to make it resemble a histogram, since those gaps signal on purpose that the categories are separate groups rather than points on a scale.
Deciding which graph your data needs
When you are handed a variable and asked to graph it, start with one question: is each value a number you could meaningfully add or average, or a label that names a group? If it is a number, such as test scores, reaction times, or heights, draw a histogram, or a dotplot or stem-and-leaf plot for a small data set. If it is a label, such as color, brand, or yes-or-no responses, draw a bar graph or a pie chart. When the values are counts of something, like the number of siblings a student has, they are still numeric, so a histogram or dotplot fits.
Practice makes this automatic. You can drag data points and watch a histogram change shape in the descriptive statistics sandbox, which builds the intuition faster than memorizing a rule.
Mistakes to avoid
A few errors show up again and again.
- Do not read shape or skew from a bar graph, because its category order is arbitrary and the outline carries no meaning.
- Do not treat ID-style numbers such as zip codes or jersey numbers as quantitative; they are labels, so a bar graph is correct.
- Do not let the bars touch on a bar graph or leave gaps on a histogram, because the spacing itself tells the reader which kind of data you have.
- A histogram groups values into bins, so you cannot recover the exact original values from it, only the count in each interval.
- Keep the count style consistent within one graph: use frequency (counts) or relative frequency (proportions) throughout, not a mix of both.
Describing a histogram of homework minutes
A teacher draws a histogram of the number of minutes 30 students spent on a homework assignment. Read left to right along the minutes axis, the bars have these heights: 0-10 min has 2 students, 10-20 has 5, 20-30 has 9, 30-40 has 7, 40-50 has 4, 50-60 has 2, and 60-70 has 1. Describe the distribution's shape, center, and spread.
Confirm it is a histogram: the axis (minutes) is numeric, the bins are equal width at 10 minutes each, and the bars touch, so reading shape is valid.
Check the total: 2 + 5 + 9 + 7 + 4 + 2 + 1 = 30 students, which matches the class size.
Find the tallest bar (the modal bin): the 20-30 minute bin, with 9 students. That peak is the mode, not the center. To locate the center, find the middle values: with 30 students the 15th and 16th sit in the 20-30 bin, since 2 + 5 = 7 finish before it and 7 + 9 = 16 by its end. The median lands in the upper part of that bin, near 29 minutes, and the mean is about 30 minutes; the right skew pulls both above the bin's 25-minute midpoint.
Find the spread: values run from the 0-10 bin up to the 60-70 bin, a range of roughly 0 to 70 minutes.
Check the tails: below the peak, 2 + 5 = 7 students are under 20 minutes; above the peak, 4 + 2 + 1 = 7 students are over 40 minutes, and they trail out further along the axis, all the way to 70. The right tail is longer than the left.
Locate the bulk: the three middle bins hold 5 + 9 + 7 = 21 of the 30 students, or 70%, between 10 and 40 minutes.
The distribution is right-skewed (skewed right) with a peak in the 20-30 minute bin. The center sits near 29 minutes (the median), and the mean is about 30 minutes, pulled toward the longer right tail. About 70% of students finished in 10 to 40 minutes, and a thin right tail stretches out to the 60-70 minute bin.
Choosing the right graph for a categorical variable
You survey 40 students about eye color and record brown 18, blue 12, green 6, and hazel 4. Decide which graph fits, and describe what it shows.
Identify the variable type: eye color sorts each student into a group and is not measured as a number, so it is categorical.
Categorical data calls for a bar graph or a pie chart, not a histogram, because there is no number line to place the values on.
Confirm the counts total the sample: 18 + 12 + 6 + 4 = 40 students.
Draw one bar per color with gaps between them, using height for the count. You may order the bars by size (brown, blue, green, hazel) or alphabetically, since category order is free.
Convert to relative frequencies if you want proportions: 18/40 = 0.45, 12/40 = 0.30, 6/40 = 0.15, and 4/40 = 0.10, which sum to 1.00.
Read a claim from the graph: brown is the most common eye color at 45% of students, and it is 18/4 = 4.5 times as common as hazel.
Eye color is categorical, so a bar graph fits and a histogram would be wrong. Brown is the most common color (18 of 40, or 45%), the bars can be arranged in any order, and the gaps between them signal that the categories are separate groups.
Frequently asked questions
Why do the bars touch on a histogram but not on a bar graph?
A histogram's axis is a continuous number line split into adjoining intervals, so the bins meet edge to edge with no gaps. A bar graph's axis is a list of separate categories, so gaps are left between the bars to keep the groups visually distinct.
Can a histogram be skewed but a bar graph cannot?
Yes. A histogram keeps its values in numeric order, so its shape, including skew, is meaningful. A bar graph's category order is arbitrary, so any apparent skew would change if you reordered the bars, which means skew does not apply to it.
Is a bar chart the same thing as a bar graph?
Yes. The AP course treats bar chart and bar graph as two names for the same display of one categorical variable. Both show the frequency or relative frequency of each category as the height of a separated bar.