Histogram Generator
Bin your raw numbers into a histogram — equal-width bins, exact counts per bin, live SVG preview and downloads.
A histogram answers a different question from a bar chart: not “how big is each category?” but “how are individual measurements spread out?”. It takes raw numbers, finds their range, cuts that range into equal-width bins and counts the numbers in each bin. The arithmetic is exact and checkable: the numbers 1 through 10 with 5 bins give a range of 1 to 10, a bin width of (10 − 1) ÷ 5 = 1.8, and counts of 2, 2, 2, 2, 2 — two numbers in each bin (1–2 in the first, 9–10 in the last, which is closed on both ends so the maximum is never orphaned). The sample scores on the page (62 to 88, twelve values) bin the same way, and the result line always prints the minimum, maximum, bin width and the full count list.
Everything runs in your browser; your data stays on your device, is never uploaded, never stored and never put into a link. The histogram groups your raw numbers into equal-width bins and counts how many fall in each one.
Quick answers
How do I make a histogram from raw data?
Paste the raw numbers, choose a bin count, and read the counts. The range is split into equal bins: 1–10 in 5 bins gives width 1.8 and counts of 2, 2, 2, 2, 2.
Do not pre-aggregate your data — counting values into bins is exactly what the histogram does.
How is histogram bin width calculated?
(Maximum − minimum) ÷ number of bins. Scores from 62 to 88 in 5 bins give a width of 26 ÷ 5 = 5.2 per bin, starting at 62.
The last bin is closed at the top so the maximum value is always counted.
How to use
- Paste your raw numbers — one per line, or separated by commas or spaces. Do not pre-count them; binning is the tool’s job.
- Choose the number of bins (5 is a good start) — the range from minimum to maximum is split into that many equal widths.
- Read the counts per bin in the result line and the bar labels, and try a different bin count to check the shape is stable.
- Download SVG or PNG once the distribution shape is clear.
About this tool
Bin count is a judgement call, and this tool makes it cheap to exercise: too few bins flatten real structure into a lump, too many shatter it into noise, so redraw at a few counts and trust only the features that survive. Note what a histogram is not — the bars here describe your data’s distribution, not a theoretical curve, and the horizontal axis is a number line with gaps preserved, unlike a bar chart’s category axis. If every value is identical, the range is zero and the tool honestly reports a single bin holding all values rather than inventing a width. Rendering uses the shared chart kernel (hand-built SVG, no library), with PNG rasterised locally.
Frequently asked questions
What is the difference between a histogram and a bar chart?
Input and axis. A bar chart takes one value per category that you supply; a histogram takes many raw measurements and counts them into bins along a continuous number axis. If you already have counts per category, use the bar chart; if you have the raw data, use this.
How are the bins calculated?
Bin width = (maximum − minimum) ÷ bin count, starting at the minimum. Each number falls in the bin its value lands in; the final bin also includes the maximum itself. For 1–10 in 5 bins: width 1.8, counts 2, 2, 2, 2, 2.
How many bins should I choose?
Start with 5–10 for a few dozen values. More data supports more bins. The honest test is stability: redraw with one or two bins more and fewer — a real peak or gap stays visible, an artefact of binning moves or vanishes.
What input formats are accepted?
Numbers separated by line breaks, commas, semicolons or spaces — “62, 71, 68” and one-per-line lists both work. Anything that is not a number is ignored, and the result line tells you how many numbers were actually used via the counts total.
First time embedding? Read the step-by-step guide →
More free tools
Bar Chart Generator
Turn label, value lines into a clean bar chart — live SVG preview with SVG and PNG downloads, drawn entirely in your browser.
Normal Distribution Calculator
Probabilities below, above and between values — and quantiles — for any normal distribution.
Pivot Table Maker
Paste CSV and pivot it in seconds — choose row, column and value fields, aggregate by sum, count or average, with row and column totals.
QR Code Generator
Turn any link or text into a scannable QR code in seconds.
Random Number Generator
Pick random numbers in any range, with no repeats option.
Random Password Generator
Create strong, random passwords — generated on your device only.