Overview
A histogram shows the shape of your data by counting how many values fall in each equal-width range.
Paste your numbers, separated by spaces, commas or new lines. A column copied from a spreadsheet works too.
Worked examples
| Inputs | Result |
|---|---|
| Your numbers12, 15, 15, 18, 21, 22, 22, 22, 25, 27, 28, 31, 34, 34, 38, 41, 45, 52Number of binsAutomatic | Tallest bin: 20 to 30 (7 values)18 valuesmean 27.889lowest 12highest 525 bins, each 10 wide |
Show 1 more example
| Your numbers12, 15, 15, 18, 21, 22, 22, 22, 25, 27, 28, 31, 34, 34, 38, 41, 45, 52Number of bins4 | Tallest bin: 22 to 32 (7 values)18 valuesmean 27.889lowest 12highest 524 bins, each 10 wide |
How it works
Automatic bins use Sturges' rule, which suggests about 1 + log₂(n) groups, then round the width to a tidy number. Pick a number of bins yourself to get exactly that many equal groups. A value on the edge between two bins counts in the higher one, except the largest value, which stays in the last bin.
The formula
| n | How many values you have |
| range | Highest value minus lowest value |
Practical tips
- Too few bins hides the shape, and too many makes it look spiky. Try a few settings.
- A long tail on one side means skewed data, so the median may describe it better than the mean.
- Two separate humps can mean you have two different groups mixed together.
Frequently asked questions
How many bins should a histogram have?
Automatic uses Sturges' rule, which suits most data sets. Small samples need few bins, and large ones can take more.
What is the difference between a histogram and a bar chart?
A histogram groups a continuous range of numbers, so its bars touch. A bar chart compares separate categories.
Which bin does a value on an edge go in?
The higher one, except for the largest value, which stays in the last bin.