Histogram maker: frequency distribution from raw data

Make a frequency histogram from raw numbers: bins are chosen for you or set by hand, with a frequency table below. Paste numbers from Excel or as a plain list.

Enter the raw numbers in a column, one per cell. You can paste them from Excel or as a list separated by spaces or line breaks. Several columns — several data sets on one chart.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

Image 1200 × 750 pixels

Frequency table

BinFrequencyRelative frequencyCumulative frequency
[50; 60)310%3
[60; 70)723.3%10
[70; 80)1136.7%21
[80; 90)620%27
[90; 100)310%30
Total30100%

Each bin includes its left edge and excludes the right one: a value on an edge goes into the next bin.

Style

px
px

How to use

Enter the raw numbers in a column of the table, one per cell: scores, heights, times, purchase amounts. Paste them from Excel or Google Sheets (Ctrl+V in any cell) or as a list separated by spaces or line breaks. You can also open a CSV file. Numbers can use a decimal point or a comma.

The histogram splits the numbers into bins of equal width and shows how many values fall into each. Below the chart is a frequency table: bin, frequency, relative frequency and cumulative frequency. You can copy it and paste it into Excel or Word.

If there are several columns of numbers, you get several data sets on one chart with shared bins — for example, the results of two classes. Text columns are ignored.

Bins

By default the number of bins follows Sturges’ rule: about log₂ n + 1, where n is the number of values. The bin width is rounded to a “round” number (1, 2, 2.5 or 5 times a power of ten), and the first bin starts at a multiple of it. That way the edges are easy to read: 50, 60, 70…

You can set the bin width and the start of the first bin under “Style”. An empty field shows the value chosen automatically. The start must not be greater than the smallest number, otherwise it isn’t applied.

Each bin includes its left edge and excludes the right one: [60, 70) means values from 60 up to 69.99… A number exactly on an edge goes into the next bin. Some textbooks use the other convention, (a, b], and then the counts at the edges differ.

Example

Test scores of 30 students range from 55 to 96. Sturges’ rule calls for 6 bins; the width (96 − 55) / 6 ≈ 6.8 is rounded to 10, and the first bin starts at 50. That gives 5 bins: [50, 60) — 3 students, [60, 70) — 7, [70, 80) — 11, [80, 90) — 6, [90, 100) — 3. With a width of 5 there are 9 bins and the picture gets more detailed.

FAQ

How is a histogram different from a bar graph? A histogram is built from raw numbers and shows their distribution: the bars touch, and the horizontal axis is a scale of values. In a bar graph each bar is a separate category with its own value. If that’s what you need, open the bar graph maker.

I already have a frequency table. How do I show it? Put the bins in the first column and the frequencies in the second, and open the bar graph maker.

Can it show percentages instead of counts? Yes, turn on “As percentages”: the height of each bar becomes the share of the data set’s values that fall into that bin.

How do I find the mean and median? The median, quartiles and mean are on the box plot — your data carries over. The average calculator also finds the mean, median and mode of a list of numbers.

Where is my data stored? Only in your browser and in the page address after the # sign, which isn’t sent to the server. You can save the link or send it to someone.