Charts
Histogram Maker
Paste a column and get a histogram — plus the frequency table and the bin rules that produced it.
Have a spreadsheet? Drop a CSV here
Or . CSV, TSV or plain text. You pick which column is which after it loads — the names in your file do not have to match ours. The file is read in your browser and never uploaded.
How to read this result
A histogram shows the shape of one variable. Where the data cluster, how spread out they are, whether they are symmetric, and whether there is more than one peak — none of which a mean and a standard deviation can tell you.
The bin count changes the story. Too few bins hide structure; too many turn the picture into noise. Try two or three of the rules before concluding anything about shape — the calculator shows what each suggests.
Bars touch, unlike a bar chart's. That is not decoration: it signals that the x-axis is continuous. Gaps between bars mean gaps in the data.
The normal overlay is a quick sanity check. Systematic gaps between the bars and the curve — one side consistently above, both tails consistently below — are what non-normality looks like. For a proper assessment use the Q-Q plot on the Shapiro-Wilk page, which is far more sensitive than eyeballing a histogram.
The formula
- the number of bins
- the bin width, from which the count follows
Sturges assumes roughly normal data and under-bins skewed data; Freedman-Diaconis uses the IQR and handles skew and outliers better.
Worked example
Twenty daily customer counts
Twenty days of counts between 18 and 35. How are they distributed?
18, 22, 25, 19, 31, 28, 24, 21, 27, 33, 26, 23, 29, 20, 35, 30, 22, 26, 24, 28
- Sturges' rule for n = 20.⌈log₂ 20⌉ + 1 = ⌈4.32⌉ + 1 = 6 bins
- The range divided by the bin count gives the width.(35 − 18) / 6 = 2.833
- Bins run from 18, each 2.833 wide, with the last one closed at the top.18–20.83, 20.83–23.67, 23.67–26.5, 26.5–29.33, 29.33–32.17, 32.17–35
- Count the values in each.3, 4, 5, 4, 2, 2
With only twenty values the histogram is lumpy whatever the bin count. Below about thirty observations a box plot or a stem-and-leaf plot usually communicates more.
Checked against Sturges' rule, and a direct count verified against R's hist(breaks = 6).
The calculator above is loaded with these numbers by the Load the worked example button.
Assumptions, and when to use something else
A histogram needs numeric, continuous-ish data and enough of it — below about twenty values the bars are more noise than shape.
The one real choice is the bin count, and it is not neutral. The same data can look symmetric with five bins and bimodal with fifteen. Report the bin count, or better, show more than one.
- You have fewer than about thirty valuesStem-and-leaf plotKeeps every digit and works at small n.
- You want to compare several groupsBox plot makerSeveral distributions on one scale.
- You want the counts as a tableFrequency tableThe same grouping, in numbers, with cumulative columns.
- You want to test normality properlyShapiro-Wilk testWith the Q-Q plot, which is far more sensitive than a histogram overlay.
Questions people ask
How many bins should I use?
Start with Sturges' rule — about 6 for 20 values, 9 for 200, 11 for 1,000 — then try one finer and one coarser. If the shape changes materially, say so rather than picking the flattering one. Freedman-Diaconis is the better default for skewed data.
What is the difference between a histogram and a bar chart?
A histogram shows the distribution of one continuous variable, with touching bars over a numeric axis. A bar chart compares separate categories, with gaps between the bars. Using the wrong one implies the wrong kind of axis.
Why are my bars uneven when the data look uniform?
Sampling noise. With twenty observations in six bins you expect about 3.3 per bin and routinely see 1 and 6. Unevenness at small n is not evidence of structure.
Can I download the histogram?
Every chart draws to a canvas in your browser. Use the download button for a PNG, or right-click the image and save it. Nothing is uploaded to produce it.