Skip to main content
StatsPlotMaker
4 min readUpdated 2026-12-03

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.

Quick Answer

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.

Skip manual spreadsheet formatting

Paste your numbers straight into our free Histogram Maker for instant charts and step-by-step math.

Open Histogram Maker

Quick Step-by-Step Checklist

  1. Step 1
    Check your horizontal (X) variable type

    If your X-axis consists of continuous numeric intervals (quiz scores, heights, commute minutes), use a Histogram.

  2. Step 2
    Verify 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.

  3. Step 3
    Decide 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.

FeatureHistogramBar Graph (Horizontal or Vertical)
Data typeQuantitative / continuous numbersCategorical / discrete groups
Gaps between barsNo gaps (bars touch)Clear gaps between bars
X-axis meaningNumeric class intervals (bins)Distinct category labels
Can you sort bars?Never (must stay numeric)Yes (often sorted highest to lowest)
Example datasetAP 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.

Key Takeaway

Numbers grouped into intervals = touching Histogram bars. Named categories compared by count or percentage = separated Bar Graph bars.

More Statistics Guides