Histogram Maker
Paste a column of numbers to plot how they are distributed — how many values fall in each range, where the bulk sits and how far the tails run. Summary statistics appear underneath the chart, and everything is computed in your browser.
Getting Data In and Reading What Comes Out
Values can be separated by commas, spaces or line breaks, so a column copied out of a spreadsheet pastes straight in. Multi-column CSV or tab-separated data is detected too, and you are asked which column to plot. Anything that is not a number is skipped rather than treated as zero, so a header row does you no harm.
Below the chart, five statistics are computed from the same values: count, mean, standard deviation, min and max. The standard deviation here is the population form, dividing the summed squared deviations by n. If you are treating your numbers as a sample drawn from a larger population, scale it by the square root of n/(n − 1) to get the sample standard deviation — a correction of about 1.7% at n = 30 and about 0.5% at n = 100.
The Bins box takes a target bin count and can be left blank for automatic binning. Count, Percent and Density change what the vertical axis measures: raw frequency, share of the total, or a scaling that makes the total bar area equal 1. Density is the one to use when comparing distributions of different sample sizes or against a theoretical curve, because it removes both the sample size and the bin width from the height.
Histogram or Bar Chart? The Mix-Up Worth Getting Right
This is the single most common confusion in charting, and the two are not interchangeable.
| Histogram | Bar chart | |
|---|---|---|
| Horizontal axis | A continuous number line | Discrete, unordered categories |
| What a bar covers | A range of values (a bin) | One category |
| Bar height | How many values fall in that range | The measured value for that category |
| Gaps between bars | None — bins are contiguous | Yes, bars are separated |
| Reordering the bars | Impossible; order is the number line | Free; sort however you like |
| Input needed | One column of numbers | Labels plus values |
The quickest test: can you shuffle the bars without breaking the chart? Sales by region can be sorted alphabetically, by size, or however you like, so that is a bar chart. Salaries binned into £5,000 bands cannot be reordered — the number line dictates the sequence — so that is a histogram.
The two also answer different questions. A bar chart answers "which category is biggest?" A histogram answers "what do these measurements look like as a group — where is the centre, how spread out are they, is anything unusual?" That is why a histogram needs only one column of numbers: it has no labels, because there are no categories.
How Bin Width Changes the Story
Bin width is the one genuinely subjective choice in a histogram, and it decides what the reader sees. The same 200 measurements can produce three different-looking charts:
- Too few bins. With four or five wide bins, everything collapses into a smooth mound. Real structure disappears — a distribution with two distinct peaks flattens into one, and the fact that you are looking at two mixed populations is lost.
- Too many bins. With more bins than you have data to fill, most bins hold zero, one or two values. The chart becomes a comb of spikes and gaps, and readers start interpreting sampling noise as pattern.
- About right. Enough bins to show the shape, few enough that the outline is stable if you nudge the count by one or two.
That last point is the practical test. Generate the chart at three different bin counts. Features that persist across all three — a second peak, a long right tail, a gap before a cluster of outliers — are real. Features that appear at one setting and vanish at the next are noise.
Rules of Thumb for Bin Count
Several published rules give a defensible starting number. None is authoritative; they are all shortcuts to a sensible first guess.
| Rule | Formula | n = 30 | n = 100 | n = 1000 |
|---|---|---|---|---|
| Square-root | √n | 6 | 10 | 32 |
| Sturges | ⌈log₂ n⌉ + 1 | 6 | 8 | 11 |
| Rice | 2 × n^(1/3) | 7 | 10 | 20 |
Square-root is the default in many spreadsheet tools and is the easiest to do in your head. Sturges' rule, from 1926, derives its bin count from the binomial distribution and therefore assumes data that is roughly bell-shaped; it is known to under-bin large samples, which is why its count barely moves between n = 100 and n = 1000. Rice's rule sits between the two and holds up better as samples grow.
Freedman–Diaconis works differently: instead of a bin count, it gives a bin width, h = 2 × IQR / n^(1/3), where IQR is the interquartile range. Dividing the data's range by h gives the bin count. Because it uses the middle 50% of the data rather than the full spread, a handful of extreme outliers cannot stretch the bins and wash out the detail where the data actually lives — which makes it the rule to prefer for skewed data. Scott's rule is the same idea using the standard deviation, h = 3.49 × s / n^(1/3), and is better suited to symmetric data.
One practical note: the Bins field is a target, not a guarantee. Bin edges are snapped to round numbers, so a request for 13 bins across a 0–100 range will usually come back as 10 bins of width 10.
Reading the Shape
Once the chart is drawn, four features carry almost all the information.
Modality — how many peaks. One peak is the usual case. Two peaks almost always mean two populations have been mixed together: two machines, two customer segments, two shifts. That is a finding, not a nuisance, and the right response is usually to split the data and plot each group.
Skew — which way the tail runs. A long tail to the right is the commonest shape in real data: incomes, house prices, response times, time-to-failure. All are bounded below by zero and unbounded above. A long left tail usually signals a ceiling — exam scores where many students max out, or a process capped at 100%. The quick diagnostic is the mean against the tallest bar: in right-skewed data the mean is pulled to the right of the peak, because the far tail drags it.
Outliers. These show up as short isolated bars separated from the body by empty bins. Check them before deleting them — a sensor reading of 999, a duration in milliseconds among durations in seconds, and a genuine extreme case all look identical on the chart, and only one of the three is a data error.
Boundaries and pile-ups. A tall bar hard against one end, with nothing beyond it, means values are being clipped or truncated — measurements floored at zero, or a survey scale where responses stack at the maximum. A box plot is a good companion here, because it puts quartiles and outliers on an explicit scale.
Binning Thirty Page-Load Times
Thirty page-load times, in seconds, from a website:
2.1 2.4 2.6 2.7 2.9 3.0 3.1 3.1 3.2 3.3 3.4 3.5 3.5 3.6 3.8
3.9 4.0 4.1 4.3 4.5 4.7 4.9 5.2 5.5 5.9 6.4 7.1 8.2 9.6 12.4
Pasted in, the summary statistics come back as count 30, mean 4.5633, standard deviation 2.2376, min 2.1, max 12.4.
The rules of thumb suggest 6 bins (square-root), 6 (Sturges) or 7 (Rice). Freedman–Diaconis gives a bin width of about 1.29 seconds across a range of 10.3, which works out at 9 bins — more than the others, precisely because that 12.4-second measurement inflates the range the count-based rules divide up, while the IQR-based rule ignores it.
At any of those settings the shape is the same: a tall block between 3 and 4 seconds, then a steadily thinning tail out to 12.4. That is textbook right skew, and the numbers confirm it — the median is 3.85 but the mean is 4.56, dragged up by a handful of slow loads. The practical reading is that a "typical" visitor waits under 4 seconds, while the average overstates their experience. Reporting the median here would be more honest than reporting the mean, and it is the histogram, not the summary table, that makes the discrepancy visible.
For a compact comparison of several such distributions side by side, a box plot or a dot plot fits more groups into the same space than a stack of histograms does.