Free chart maker

Histogram from a Frequency Table

Already have your data grouped into classes? Type the classes and their frequencies and get a correct histogram, with touching bars, class boundaries and grouped-data statistics.

  • 100% free
  • No sign-up
  • No watermark
  • PNG · JPG · SVG · PDF

Your work is saved automatically in this browser. Nothing is uploaded.

Analyze your data

ClassFreq.RelativeCum.Cum. %
[39.5, 49.5)36%36%
[49.5, 59.5)714%1020%
[59.5, 69.5)1224%2244%
[69.5, 79.5)1530%3774%
[79.5, 89.5)918%4692%
[89.5, 99.5]48%50100%
Total50100%

Your data

Frequency table

One class per line: lower-upper: frequency. Add more frequency columns to compare groups, and an optional first line with names. Single values (3 12) work too.

6 classes · Students: n = 50

Class limits have gaps, so class boundaries are used (39.5–49.5, …).

When to use this tool

Textbook exercises, survey reports and government statistics often give you a frequency table rather than the raw numbers: “ages 20–29: 34 people, 30–39: 51 people…”. You can’t paste that into an ordinary histogram maker, because it expects every individual value. This tool takes the table as it is.

How to enter a frequency table

You typeMeaning
10-20: 44 values from 10 up to 20
10–19, 4Class limits 10 to 19 (boundaries 9.5–19.5 are used)
10 to 20 4 7Two groups: 4 in the first, 7 in the second
3 12The single value 3 occurs 12 times (discrete data)
Age, Boys, GirlsOptional first line naming the columns

Class limits vs. class boundaries

When data is recorded in whole numbers, classes are usually written with class limits such as 40–49 and 50–59. There is a gap between 49 and 50, but a histogram’s bars must touch. The fix is to use class boundaries, halfway between one class’s upper limit and the next class’s lower limit: 39.5–49.5, 49.5–59.5 and so on. The tool does this automatically and tells you when it has.

Statistics from grouped data

Under the chart you’ll find the frequency table with cumulative totals, plus the estimated mean, median, mode, quartiles and standard deviation. For the step-by-step working, as many courses require, use the grouped data calculator. To draw lines instead of bars, use the frequency polygon or ogive maker.

Tips

  • Keep classes equal in width wherever you can; it makes the histogram honest at a glance.
  • Label the x-axis with units, such as “Age (years)”, and the y-axis with what is counted.
  • To compare groups of different sizes, switch the y-axis to Percent in the Bins tab.

Worked example: test scores with class limits

The default table (40–49: 3, 50–59: 7, 60–69: 12, 70–79: 15, 80–89: 9, 90–99: 4) uses whole-number class limits, so the bars are drawn on the boundaries 39.5–49.5, 49.5–59.5 and so on. From the table, the estimated mean is 70.9, the median 71.5 and the mode 72.8. All three sit in the modal class 70–79.

Unequal classes and frequency density

Suppose the classes are 0–10 (8 values), 10–30 (20 values) and 30–60 (12 values). Drawn as plain frequencies, the 10–30 bar looks tallest. But it is twice as wide, so per unit of x the classes have densities of 8 ÷ 10 = 0.8, 20 ÷ 20 = 1.0 and 12 ÷ 30 = 0.4. Choose Density in the Bins tab so the area of each bar represents its frequency.

Common mistakes to avoid

  • Drawing gaps between bars for class limits. Use the class boundaries so the bars touch.
  • Unequal class widths with frequency on the y-axis. Switch to density.
  • Ambiguous boundaries such as 10–20 and 20–30. Decide which class a value of exactly 20 belongs to (usually the one that starts with it) and apply that rule to every class when you count.

Related tools: Grouped Data Calculator, Frequency Polygon Maker, Ogive Maker, Histogram Maker and Relative Frequency Histogram.

Frequently asked questions

How do I make a histogram from a frequency table?

Type one class per line with its frequency, for example '40-49: 3', '50-59: 7', '60-69: 12'. The histogram updates as you type. You can paste the two columns straight from a spreadsheet too.

My classes are 10–19, 20–29, 30–39. Why do the bars start at 9.5?

Class limits like these leave a gap of 1 between classes (19 to 20). A histogram's bars must touch, so the tool uses class boundaries halfway between them: 9.5–19.5, 19.5–29.5 and so on. The labels still show your original limits.

Can I compare two groups from one frequency table?

Yes. Add a second frequency column, e.g. '10-20: 4, 7', and an optional first line with names, e.g. 'Age, Boys, Girls'. Each column becomes its own data set on the same bins.

What if my classes have different widths?

Unequal classes (like 0–10, 10–20, 20–50) are allowed, but a wide class will look too important if the bar height shows frequency. Switch the y-axis to Density in the Bins tab so the area of each bar represents its frequency.

How are the mean and median calculated from grouped data?

The mean uses each class midpoint weighted by its frequency. The median and quartiles use the interpolation formula L + ((n/2 − CF) ÷ f) × w. They are estimates because the exact values inside each class are unknown. See the grouped data calculator for the full working.

Related tools