Histogram Maker

Quick answer

The histogram maker sorts your data into bins and draws a histogram, choosing the number of bins with Sturges, square-root, Rice or Freedman–Diaconis rules or letting you set the bins yourself, and reports the bin table, the shape (skewness) and summary statistics.

Histogram
Shape of the distribution
Moderately right-skewed (tail to the right) – skewness 0.958
Bin table
Bin (last bin includes its upper edge) Count % Cum. ───────────────────────────────────────────────────────────── 12 – 22.5 6 20% 6 22.5 – 33 10 33.3% 16 33 – 43.5 7 23.3% 23 43.5 – 54 3 10% 26 54 – 64.5 2 6.7% 28 64.5 – 75 2 6.7% 30
Number of bins
6
Bin width
10.5
First bin starts at
12
Last bin ends at
75
Number of values
30
Mean
34.8333
Median
31.5
Sample standard deviation
14.9438
Minimum
12
Maximum
75

A histogram is a bar chart of a frequency distribution for numerical data. The horizontal axis is divided into adjacent bins of equal width, and the height of each bar shows how many observations fall into that bin. Unlike an ordinary bar chart the bars touch, because the bins cover a continuous scale with no gaps.

The histogram is the quickest way to see the shape of a distribution: a single symmetric hump suggests something close to a normal distribution; a long tail to the right (income, waiting times, house prices) means right skew; two humps may mean two groups have been mixed. The choice of bins matters – too few bars hide detail, too many turn noise into spikes – so the calculator offers the standard rules and lets you compare them in one click.

For presentation you can fix the start, end and width of the bins, for example 10 to 80 minutes in steps of 10, so the edges fall on round numbers. Values outside a custom range are counted and reported, never silently dropped from the summary.

How to use the Histogram Maker

  1. Data set
  2. Bins
  3. Number of bins
  4. Lowest bin edge
  5. Highest bin edge
  6. Bin width
  7. Frequency polygon on top
  8. Axis label (optional)

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

How it works

The data are sorted, the number and width of bins are found from the selected rule (or your custom start, end and width), each value is assigned to the bin whose lower edge it reaches, and the last bin also keeps its upper edge. Shape is judged from the sample skewness: under 0.5 in size is roughly symmetric, 0.5–1 moderately skewed and above 1 strongly skewed.

Worked example

Thirty commute times range from 12 to 75 minutes. Sturges’ rule gives ⌈log₂ 30 + 1⌉ = ⌈5.91⌉ = 6 bins of width (75 − 12) ÷ 6 = 10.5 minutes, with counts 6, 10, 7, 3, 2 and 2. The tallest bar is 22.5–33 minutes, and the bars fall away slowly to the right: the sample skewness is 0.958, so the distribution is moderately right-skewed. With custom bins from 10 to 80 in steps of 10 the counts are 3, 9, 9, 4, 2, 2 and 1.

Common histogram shapes

Shape What it suggests
Bell-shaped, symmetric Values vary randomly around a central value
Right-skewed (long right tail) A floor at zero and occasional large values – incomes, times, prices
Left-skewed (long left tail) A ceiling – easy exam scores, age at death
Two peaks (bimodal) Two groups mixed together
Flat (uniform) Every range equally likely – e.g. random numbers

Formula

Bin width = (max − min) ÷ k · Sturges k = ⌈log₂ n + 1⌉ · Square-root k = ⌈√n⌉ · Rice k = ⌈2·∛n⌉ · Freedman–Diaconis width = 2·IQR ÷ ∛n

Worked example

Inputs — Data set: 12, 15, 18, 20, 21, 22, 24, 25, 25, 26, 28, 29, 30, 30, 31, 32, 33, 35, 35, 36, 38, 40, 42, 45, 48, 50, 55, 60, 65, 75; Bins: Sturges' rule (automatic); Frequency polygon on top: No; Axis label (optional): Commute time (minutes).
Results — Shape of the distribution = Moderately right-skewed (tail to the right) – skewness 0.958; Bin table = Bin (last bin includes its upper edge) Count % Cum.
─────────────────────────────────────────────────────────────
12 – 22.5 6 20% 6
22.5 – 33 10 33.3% 16
33 – 43.5 7 23.3% 23
43.5 – 54 3 10% 26
54 – 64.5 2 6.7% 28
64.5 – 75 2 6.7% 30; Number of bins = 6; Bin width = 10.5; First bin starts at = 12; Last bin ends at = 75.

Key terms

Bin
One of the adjacent equal-width intervals of a histogram.
Bin width
The length of each bin on the horizontal axis.
Skewness
A measure of asymmetry; positive for a long right tail.
Freedman–Diaconis rule
Bin width = 2 × IQR ÷ ∛n, robust to outliers.

Frequently asked questions

How many bins should a histogram have?

Usually 5 to 20. Sturges' rule gives ⌈log₂ n + 1⌉: 6 bins for 30 values, 8 for 100 and 11 for 1,000. Freedman–Diaconis adapts the width to the spread and works better for skewed or large data.

What is the difference between a histogram and a bar chart?

A histogram shows counts of numerical data in adjacent bins, so the bars touch and their order is fixed; a bar chart compares separate categories, and the bars can be reordered.

How do I read skewness from a histogram?

If the tail stretches to the right the data are right-skewed and the mean is above the median – as in the default commute times (mean 34.8, median 31.5).

Which bin does a value on an edge go into?

The bin it starts: 30 goes into 30–40. Only the last bin includes its upper edge.

Why does my histogram look different in another program?

Programs use different default rules and bin edges. Choose the same number of bins or the same start and width to match them.

What is a frequency polygon?

A line through the midpoints of the bar tops. Turn it on with the "Frequency polygon on top" option.

Can a histogram show percentages?

Yes – divide each count by n. The bin table lists the percentage for every bin; the relative frequency calculator draws a percentage histogram.

Sources

  1. NIST/SEMATECH e-Handbook – Histogram
  2. OpenStax – Introductory Statistics 2e

Cite this calculator

Speedy Calculator. (2026). Histogram Maker. Speedy Calculator. https://speedycalculator.com/calculators/statistics/histogram/