Histograms from a data set or a frequency table
The Histogram Generator draws a histogram from a data set you type or paste, sorted into bins of the width you give or one that fits the data, or from a frequency table of bins and their frequencies. In a table you type where the first bin starts, then each bin’s upper end and its frequency, with no inequalities to type. Bins can be unequal, in which case the vertical axis shows frequency density so each bar’s area stands for its frequency.
The horizontal axis is numbered at the bin edges, with a zig-zag break when it starts past 0, such as for heights from 150 cm. Draw a frequency polygon over the bars or on its own. Leave a frequency empty for a bar students draw, or hide the vertical axis’s numbers for students to work out the scale from one bar.
What you can set
- A data set, with where the bins start, their width, and which bin holds a value on an edge
- Or a frequency table: where the first bin starts, then each bin’s upper end and its frequency, equal or unequal bins, or a table pasted from a worksheet
- Frequency, relative frequency as a decimal or a percent, or frequency density on the vertical axis
- Bars filled with a color, gray, a black-and-white fill or white, and each bar’s frequency written above it
- A frequency polygon over the bars or alone, closed down to the axis or left open
- The horizontal axis numbered at the bin edges or every step of a range you type
- A chart title and axis titles, as text or a blank line for students
- The vertical axis’s range and count-by, worked out from the data unless you type them, which lines are numbered, and the gridlines
Copying, printing and sharing
Copy the figure straight into a test, worksheet or slide, or download it as a PNG or SVG. Printing the page prints
just the figure. Share link copies the page’s address with your settings in it, so anyone who opens it sees this
exact figure, and presets save settings you use often in your browser. It’s free, with no sign-up.
Frequently asked questions
What is the difference between a histogram and a bar graph?
A histogram’s bars touch, because its bins run on from one to the next along a numbered axis, like heights from 150 to 190 cm. A bar graph’s bars stand apart, one for each named category, like favorite sports. Use the Bar Graph Generator for those.
How do I make a histogram with unequal class widths?
Choose Frequency table, type where the first bin starts, like 0, then each bin’s upper end with its frequency, like 10, then 15. With unequal bins the vertical axis shows frequency density, each bin’s frequency divided by its width, as GCSE Higher papers use. You can still pick frequency, but the panel warns you that the bars’ areas won’t match the frequencies.
Which bin does a value on an edge go in?
The bin that starts there, so 20 goes in 20 ≤ x < 30. Under the data set you can pick the bin that ends there instead (10 < x ≤ 20), as many UK papers write it. In a frequency table only the bins’ ends are typed, so it doesn’t matter.
Why does the panel say my bins have a gap?
Bins pasted as whole numbers, like 10–19 and 20–29, leave a gap of 1 between them. For whole-number data the bars meet halfway, so the generator offers to start at 9.5 and go up to 19.5, 29.5 and so on; click Use these bins to switch.
How do I draw a frequency polygon?
Under Bars, choose a frequency polygon over the bars or alone. It joins the middle of the top of each bar, and is closed down to the axis half a bin past each end unless you leave it open.
How do I leave a bar for students to draw?
Choose Frequency table (it starts from your data set’s bins if you typed one) and empty that bin’s frequency. The bin stays on the axis with no bar. Empty every frequency for a blank histogram with its axes set up.
← All math figures