gizmobench

Histogram Maker

Paste a list of numbers, choose how many bins you want or type the boundaries yourself, and the chart is drawn with the frequency table under it. The thing that changes a histogram's numbers, once the data is fixed, is which side of a boundary a value falls on, and most makers never say. This one states the rule on the page and applies it everywhere: every bin holds values from its lower edge up to but not including its upper edge, and the last bin also includes its upper edge, so the largest value is counted rather than falling off the end. Each row is written the way the rule reads it, [0, 10) and then [90, 100] for the last one, so a count you disagree with can be checked by hand. Boundaries do not have to be evenly spaced, an entry that is not a number is named instead of skipped, and a value outside boundaries you typed yourself is reported rather than folded into an end bin. Up to 100,000 values and 200 bins, the table copies as CSV, the chart downloads as SVG, and nothing is uploaded.

Bins
Histogramcounts appear here
Values
0
Bins
0
Minimum
none yet
Maximum
none yet

Paste numbers on the left to count them into bins.

Which side of a boundary. Every bin counts values from its lower edge up to but not including its upper edge. The last bin also includes its upper edge, so the largest value is counted. That is what the brackets mean: a bin is written [from, to) in the table and in the CSV, while the last one is written [from, to]. The SVG you download carries this rule in its description, so the file still says how its counts were made.
  • Twenty test scores, 5 binsequal width boundaries across the range
    [58, 65.4) 2, [65.4, 72.8) 4, [72.8, 80.2) 5, and 2 more
  • 0, 1, 2 with boundaries 0, 1, 2the maximum is kept by the last bin
    [0, 1) 1, [1, 2] 2
  • One value, repeated four timesa span of zero still gets a bin
    [3.5, 4.5] 4

Values can be separated by commas, spaces, tabs or new lines, so a column copied from a spreadsheet pastes straight in. Up to 100,000 values and 200 bins are counted, an entry that is not a number is named rather than skipped, and a value outside your own boundaries is reported rather than folded into an end bin. Your data and settings stay in this browser.

Accuracy. Exact counts under a stated rule: every bin holds values from its lower edge up to but not including its upper edge, and the last bin includes its upper edge so the largest value is counted. Change the bin boundaries and the counts change with them, which is why the table is shown beside the chart.

Common questions

If a value sits exactly on a boundary, which bin does it go in?
The bin above it. Every bin is half open: it holds values from its lower edge up to but not including its upper edge, so with boundaries at 0, 10 and 20 a value of exactly 10 is counted in [10, 20) and not in [0, 10). The one exception is the last bin, which also includes its upper edge so the largest value in your data is counted instead of falling off the end. That is why the table writes the intervals as [0, 10), [10, 20] and not as 0 to 10, 10 to 20: the bracket tells you what happened to the value sitting on the line. The same rule produces the chart, the table, the CSV and the SVG, so all four agree.
How do I choose the number of bins?
There is no correct answer, which is worth knowing before you spend time on it. The number of bins is a choice about how much detail to show, and the same data will look smooth with 5 bins and spiky with 40. Common starting points are the square root of the number of values, or Sturges' rule, which is about 1 + 3.3 times the base-ten logarithm of the count, and for 100 values both land near 7 to 10. Try a few: the counts are recomputed instantly and the table shows exactly what moved. When the bins need to mean something specific, such as exam grade bands or price brackets, switch to By boundary and type the boundaries instead.
Can I use bins that are not all the same width?
Yes. Switch to By boundary and type the boundaries you want, for example 0, 10, 20, 50, 100. Every bin still follows the same edge rule, and the chart draws each bar at the width of its own bin, so a wide bin looks wide rather than being squeezed into an equal column. One thing to watch with unequal bins: a tall bar over a wide bin is counting a wider slice of the number line, so compare counts against the interval in the table, not against the height alone. Any value that falls outside the boundaries you typed is reported under the table as a count above and a count below, rather than being quietly pushed into an end bin.
What is the difference between a histogram and a bar chart?
A histogram counts numbers into intervals along a continuous number line, so the horizontal axis is a scale and the bars sit next to each other in order with no gaps between them. A bar chart compares separate categories, such as sales by country, where the order of the bars carries no meaning and the gaps between them do no harm. If your data is labels rather than measurements, a histogram is the wrong picture and the chart maker is the page you want.
How do I paste my data, and what happens to an entry that is not a number?
Values can be separated by commas, semicolons, spaces, tabs or new lines, so a column copied out of a spreadsheet and a comma-separated row both work without editing. Decimals, negatives, a leading plus and exponent form such as 1e3 are all read. An entry that is not a number stops the chart and is named in the message, because a value that was meant to be counted must not go missing without a word: correct it or remove it and the counts redraw. One thing to watch is thousands separators, since a comma always separates values here, so write 1200 rather than 1,200. Up to 100,000 values and 200 bins are counted.
Can I export the chart or the counts?
Both. Copy CSV puts four columns on the clipboard, the interval, its lower boundary, its upper boundary and the count, with the interval quoted so the comma inside it does not split the row when a spreadsheet opens it. Download SVG saves the chart as a vector file that scales without blurring and opens in Inkscape, Illustrator or Figma, with the edge rule written into the file's description so whoever opens it later can still see how the counts were made.
Is my data sent anywhere?
No. The parsing, the counting and the drawing all happen in your browser, and the SVG file is built there too and handed to the ordinary download. Nothing is uploaded and there is no account. Your numbers and your bin settings are kept in this browser's local storage so they are still there when you come back, and Start over clears them.

Exact counts under a stated rule: every bin holds values from its lower edge up to but not including its upper edge, and the last bin includes its upper edge so the largest value is counted. Change the bin boundaries and the counts change with them, which is why the table is shown beside the chart.