Histogram Maker
Paste a column of numbers and see the distribution, with five bin-width rules compared so you can tell shape from artefact. Exports SVG.
🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.
Spaces, commas, tabs or new lines all work, so a pasted spreadsheet column is fine. Example shown.
The bins
| Range | Count | Share |
|---|
How to use it
- Paste a column of numbers — any separator works.
- Leave the bin rule on Freedman–Diaconis, or try the others.
- Check whether the shape survives a change of bin count.
- Download the SVG, or copy the bin table as CSV.
The bin count is the histogram
A histogram is not a picture of your data; it is a picture of your data at a chosen resolution. Change the resolution and the picture changes. The standard rules do not agree — on the sample loaded above, all five were computed:
Sturges log₂(n) + 1 9 bins
Scott 3.49σ / ∛n width 11 bins
Rice 2∛n 12 bins
Square root √n 15 bins
Freedman–Diaconis 2·IQR / ∛n width 16 bins
Nine against sixteen is nearly a factor of two on identical numbers. The practical rule that follows is simple: if a bump in the distribution only appears at one bin count, it is probably an artefact of the binning rather than something in the data. Features that survive being re-binned are the ones worth talking about.
Why Freedman–Diaconis is the default
Scott and Freedman–Diaconis both compute a bin width and divide the range by it, and they differ in one ingredient that matters enormously:
Scott uses σ one outlier inflates it
Freedman–Diaconis uses IQR ignores both tails entirely
The standard deviation is sensitive to extreme values by construction — square the distance and one far-out point dominates the sum. On the skewed sample here that pushes Scott's bin width up and its bin count down to 11, smoothing away detail in the crowded left-hand side. The interquartile range cannot be moved by the tails at all, so Freedman–Diaconis keeps its resolution where most of the data actually is. That robustness is why it is the default, and Sturges is offered mainly because spreadsheets and textbooks still use it.
The bin that silently eats your maximum
Bins are half-open — a value on a boundary belongs to the bin above — which works for every boundary except the top one. There is no bin above the maximum:
index = floor((value − min) / width)
for value = max: floor(range / width) = bin count
→ one past the last valid index
→ the largest observation is dropped
Checked on the sample: with ten bins, exactly one value computes an out-of-range index, and it is the maximum. A histogram missing its largest value looks entirely plausible, which is what makes this worth doing properly. The final bin here is closed at both ends, and the table marks it with a square bracket so the asymmetry is visible rather than implied.
What the chart shows and what it does not
Mean and median are both marked, because the gap between them is the quickest read on skew — on the sample the mean sits well to the right of the median, which is the signature of a long right tail. What the histogram cannot tell you is whether the data is a sample of anything in particular, whether the values are independent, or whether the distribution is stable over time. It is a shape, not a conclusion.
FAQ
How many bins should I use?
There is no single right answer, which is why five rules are offered rather than one imposed. Freedman–Diaconis is the safest default because it uses the interquartile range and so is not thrown off by outliers. Sturges assumes a roughly normal distribution and under-bins large or skewed data. Try two or three and see which shape survives.
Why does the shape change so much with the bin count?
Because a histogram is not the data, it is a summary of the data, and the bin width is the summary's resolution. On the sample loaded here the five rules suggest anywhere from 9 to 16 bins for the same 200-ish values. Too few bins hide a second peak; too many turn the distribution into noise. If a feature only appears at one bin count, be sceptical of it.
What is the difference between Freedman–Diaconis and Scott?
Both compute a bin width and divide the range by it. Scott uses the standard deviation, which a single extreme value can inflate badly — so it tends to suggest too few bins for skewed data. Freedman–Diaconis uses the interquartile range instead, which ignores the tails entirely and is therefore robust.
Why is the last bin marked differently?
Because it has to be closed at the top while all the others are open. Bins are [lower, upper), so a value exactly on a boundary goes into the higher bin — but the maximum value has no higher bin to go into. Computing its index gives exactly the bin count, one past the end, so a naive implementation silently drops the largest observation. The table shows a square bracket on the last bin to make the difference visible.
Can I export the chart?
Yes, as SVG — vector, so it scales into a report or a slide without going soft, and the bars carry tooltips with their exact ranges. You can also copy the bin table as CSV if you want to redraw it elsewhere.
Is my data uploaded?
No. Parsing, binning and drawing all happen in the page, and the SVG is generated in your browser. Nothing is sent anywhere, which matters if the numbers are salaries, patient measurements or anything else you would not paste into a random website.
How we compare
| Feature | Online Tool Store | Spreadsheet charts | R, Python or SPSS |
|---|---|---|---|
| Five bin rules, compared side by side | ✓ | ✗ | If you code them |
| Handles the closed final bin correctly | ✓ | Usually, silently | ✓ |
| Paste and see it, no setup | ✓ | A few steps | ✗ |
| Vector SVG export | ✓ | Awkward | ✓ |
| Data never leaves your device | ✓ | Depends where it lives | ✓ |
| Density curves, grouping, statistical tests | ✗ | ✗ | ✓ |
| Reproducible in a script | ✗ | ✗ | ✓ |
The fastest way to look at a distribution properly — with the bin rules shown rather than hidden, and your numbers never leaving the page. For density estimates, grouped comparisons or anything you need to reproduce later, a real statistics environment is the right home.