Histogram vs. Bar Graph: 5 Clear Differences (With Examples)
Histograms and bar graphs both use rectangular bars to show counts, which is why teachers test the difference on almost every introductory statistics quiz. The core rule is simple: histograms visualize continuous numerical distributions, while bar graphs compare discrete categories.
A histogram graphs continuous numerical data grouped into equal-width bins with touching bars that cannot be reordered. A bar graph compares discrete named categories with visible gaps between bars that can be sorted highest to lowest.
Paste your numbers straight into our free Histogram Maker for instant charts and step-by-step math.
Quick Step-by-Step Checklist
- Step 1Check your horizontal (X) variable type
If your X-axis consists of continuous numeric intervals (quiz scores, heights, commute minutes), use a Histogram.
- Step 2Verify whether bars should touch
Histogram bars touch with zero gap to represent an unbroken numeric scale; bar graph bars have visible gaps separating distinct categories.
- Step 3Decide if bars can be reordered
You can freely sort a bar graph from highest to lowest, but you can never reorder histogram bins because numeric intervals must stay in ascending order.
| Feature | Histogram | Bar Graph (Horizontal or Vertical) |
|---|---|---|
| Data type | Quantitative / continuous numbers | Categorical / discrete groups |
| Gaps between bars | No gaps (bars touch) | Clear gaps between bars |
| X-axis meaning | Numeric class intervals (bins) | Distinct category labels |
| Can you sort bars? | Never (must stay numeric) | Yes (often sorted highest to lowest) |
| Example dataset | AP Stats exam scores (0–100) | Favorite campus study locations |
Why Histogram Bars Must Touch
In a histogram, the right boundary of one bin (say 70 in [60, 70)) is the exact left boundary of the next bin ([70, 80)). Leaving gaps would falsely imply there are missing values between 69.9 and 70. Gaps inside a histogram only appear when a bin truly has frequency zero.
When a Horizontal Bar Chart Beats Both
Whenever you are summarizing survey answers, majors, or categorical counts with long names, switch to our Horizontal Bar Chart Maker so labels stay crisp and legible without diagonal rotation.
Frequently Asked Questions
Can a histogram ever have gaps between bars?+−
Only when a numeric interval has zero observations (frequency = 0). Otherwise adjacent histogram bars always touch with no spacing.
Which chart should I use for exam scores or heights?+−
Use a Histogram (or a Box Plot / Dot Plot), because exam scores and heights are continuous quantitative numbers that belong on a numeric scale.
Which chart should I use for survey categories with long labels?+−
Use a Horizontal Bar Chart so every category name reads horizontally left-to-right and bars can be ranked highest to lowest.
Numbers grouped into intervals = touching Histogram bars. Named categories compared by count or percentage = separated Bar Graph bars.