Histogram Maker
Paste your data to draw a histogram with a frequency table. Leave the bins empty to use Sturges' rule, or set your own.
Values22
Bins6
Bin width5
| Bin (from – to) | Frequency | Relative frequency |
|---|---|---|
| 62 – 67 | 1 | 4.55% |
| 67 – 72 | 5 | 22.73% |
| 72 – 77 | 7 | 31.82% |
| 77 – 82 | 5 | 22.73% |
| 82 – 87 | 2 | 9.09% |
| 87 – 92 (incl.) | 2 | 9.09% |
Step by step
- Number of bins: Sturges' rule ⌈log₂(22) + 1⌉ = 6
- Bin width = (max − min) ÷ bins = (92 − 62) ÷ 6 = 5
- Count how many values fall in each bin; a value on a boundary goes to the higher bin (the last bin includes the maximum)
How to make a histogram
- Choose the number of bins (5–15 works for most data).
- Bin width = (max − min) ÷ bins.
- Count the values in each bin and draw a bar for each count, with no gaps between bars.
Histogram vs bar chart
A histogram shows the distribution of one numeric variable, so its bars touch and the x-axis is a number line. A bar chart compares separate categories. Look at the shape: symmetric, skewed right (long tail of high values), skewed left, or with two peaks.
Frequently asked questions
How many bins should a histogram have?
A common default is Sturges' rule: about log₂(n) + 1 bins. Try a few values — too few hide the shape, too many make it noisy.
What goes on the axes?
The data values (bins) on the x-axis and the frequency (count) on the y-axis.
Last reviewed November 2026. Results are rounded to 4 decimal places; all math runs in your browser.