If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Histograms review

Histograms

A histogram displays numerical data by grouping data into "bins" of equal width. Each bin is plotted as a bar whose height corresponds to how many data points are in that bin.
Bins are also sometimes called "intervals", "classes", or "buckets".

Reading a histogram

The heights of the bars tell us how many data points are in each bin.
For example, this histogram says that Leonard's patch has 8 pumpkins whose mass is between 6 and 9 kilograms.
Want to learn more about reading histograms? Check out this video.
Want to practice some more problems like this? Check out this exercise.

Creating a histogram

Below are the lengths (in meters) of Luiza's 8 drives from the last time that she played golf.
23, comma, 78, comma, 130, comma, 147, comma, 156, comma, 177, comma, 184, comma, 213
Here's how to make a histogram of this data:
Step 1: Decide on the width of each bin. If we go from 0 to 250 using bins with a width of 50, we can fit all of the data in 5 bins.
There is no strict rule on how many bins to use—we just avoid using too few or too many bins.
Step 2: Count how many data points fall in each bin.
Driving distance (in meters)Data pointsNumber of drives
0-49231
50-99781
100-149130, comma, 1472
150-199156, comma, 177, comma, 1843
200-2492131
Step 3: Scale the x-axis from 0 to 250 using intervals of width 50. Label the x-axis "driving distance (meters)".
Step 4: Scale the y-axis up to 3—or something just past it—since that will be the highest bar.
Step 5: Draw a bar for each interval so its height matches the number of drives in that interval.
Want to learn more about making histograms? Check out this video.
Want to try some problems like this? Check out this exercise.

Want to join the conversation?

  • male robot hal style avatar for user Mateus
    Which is the difference between a Histogram and a bar graph? for what we use each of them?, what we are compering in each one?
    (17 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user kelsey.driediger
    Is a histogram simply a bar graph with a range quantities for each bar, or is there another reason? I also noticed that in all of the histograms the bars are connected, or touching one another. Does that have something to do with it?
    (8 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Michael Pell Blumenthal Martin
    How do you take the variance of a Histogram? I am a little confused as to how to find the mean of multiple buckets. More specifically which numbers do you use of the range of the bucket to find the mean and subsequently the variance and standard deviation of a data set given only in histogram form?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user moreshwar gaikwad
    I am confused regarding "histogram used for continous data" at some places i have read that it is graph drawn (line joining the topmost mid section reading of all intervals)
    (1 vote)
    Default Khan Academy avatar avatar for user
    • starky ultimate style avatar for user Simmy :)
      A histogram shows the frequency of data. It has intervals at the x- axis and the frequency at the y- axis. I believe what you are suggesting might be referred to as a line graph? Histograms don't exactly show continuous data, but they definitely show frequency. Hope that helped! Happy Learning!
      (6 votes)
  • male robot hal style avatar for user arzu ashraf
    what are the overall distinction among all graphs. how many graph methods are there actually?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • leafers seed style avatar for user daphne
    can we choose whether to use a histogram or bar graph or do we have to have a specific one for a specific thing?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • marcimus pink style avatar for user Kshitiz Singh
      both are used for specific purposes....like if u have 100 data to be plotted....u'll need 100 bar graphs to represent it(one for each)...However, if u use a histogram and create a 5 buckets or bins as mentioned above....each of 0-19 intervals, u'll be able to represent the same data with just 5 bars in the histogram,thus reducing your plight. :)
      (4 votes)
  • duskpin sapling style avatar for user Braeden Jensen
    What are you supposed to do? I'm very confused.
    (2 votes)
    Default Khan Academy avatar avatar for user
    • aqualine ultimate style avatar for user Soha Chandra
      histogram works for arranging the data in a form of graph which allows you to show distribution of variables such as 0-10 people(in no.) are literate and 11-20 people are illiterate, whereas, a bar graph allows you to compare the variables.For eg - restaurant 'A' has 33 cooks and restaurant 'B' has 53 cooks
      (2 votes)
  • duskpin tree style avatar for user basudor
    mateus SUCKS. HE STOLE & HACKED 4 of my games, 2 of my accounts.
    (2 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user Alex Sloan
    I remember my university teacher recommended using the square root of n where n is the number of data points when picking the number of bins. It seemed to work out well for larger datasets
    (2 votes)
    Default Khan Academy avatar avatar for user
  • duskpin sapling style avatar for user Braeden Jensen
    This is very confusing. How does it work?
    (2 votes)
    Default Khan Academy avatar avatar for user