Histogram Calculator and Maker

This histogram calculator turns a list of numbers into a histogram and a frequency table. Paste your data, choose the number of bins or let the tool pick one, and see the bin width, the counts in each bin and the shape of the distribution.

Separate numbers with commas, spaces or new lines.

Leave blank to choose automatically with Sturges' rule.

Checks on your data

  • No outliers beyond 1.5 × IQR and no strong skew detected.

Results

Number of bins
6
Bin width
2.33333
Tallest bin
18 to 20.33 (6 values)
Minimum / maximum
11 / 25
Count (n)
20
Shape (Pearson skewness estimate)
Roughly symmetric (-0.0411)
3 × (mean − median) ÷ SD
Histogram of your data
024611 – 13.33: 3313.33 – 15.67: 3315.67 – 18: 4418 – 20.33: 6620.33 – 22.67: 2222.67 – 25: 221113.3315.671820.3322.6725
Cumulative distribution (ogive)
050100141618202224Upper bin edge
Frequency table
BinFrequencyRelative frequencyCumulative %
11 – 13.33315%15%
13.33 – 15.67315%30%
15.67 – 18420%50%
18 – 20.33630%80%
20.33 – 22.67210%90%
22.67 – 25210%100%
Show step-by-step solution
  1. Range = max − min = 25 − 11 = 14.
  2. Number of bins (Sturges' rule): ⌈log₂(20) + 1⌉ = 6.
  3. Bin width = range ÷ bins = 14 ÷ 6 = 2.33333.
  4. Count how many values fall in each bin. Each bin includes its lower edge; the last bin also includes the maximum.
  5. For comparison, other bin rules suggest: Sturges' rule 6; Square-root rule 5; Rice rule 6; Scott (3.49 s n^−⅓) 3; Freedman-Diaconis 5.
Default binsSturges: ⌈log₂ n + 1⌉
Bin width(max − min) ÷ bins
ShowsShape, centre, spread, outliers
BarsTouch; area ∝ count

What Is Histogram?

A histogram groups continuous data into equal-width bins and draws a bar for each bin, with the height showing how many values fall inside it. It is the quickest way to see where data are centred, how widely they spread and whether the distribution is symmetric or skewed.

This tool builds the frequency distribution for you: bin edges, counts and the tallest bin, plus an estimate of the shape. Leave the number of bins blank for an automatic choice, or set your own to see how the picture changes. Related searches such as histogram maker, frequency table and frequency distribution calculator are all covered by the one tool.

Below you will find how bin width is calculated, a variables table, a worked example and answers to common questions such as how many bins to use and the difference between a histogram and a bar chart.

How to Use the Histogram Calculator

  1. Paste or type your data, separated by commas, spaces or new lines.
  2. Leave the bin count blank for an automatic choice, or enter a number to see more or less detail.
  3. Read the histogram and the frequency table. Try a few different bin counts, because the shape can change with the grouping.

Histogram Formula

Sturges' rule for the number of bins

k=⌈log⁡2n+1⌉k=\lceil\log_2 n+1\rceil

Bin width

w=max⁡−min⁡kw=\frac{\max-\min}{k}

Relative frequency

fi=count in bin inf_i=\frac{\text{count in bin } i}{n}

Histogram Variables Explained

SymbolMeaningNotes
nNumber of data values
kNumber of binsAutomatic or chosen by you
wBin width(max − min) ÷ k
fᵢFrequency of bin iCount of values in the bin

Histogram Worked Example

Using the example values (press “Load example” above to try them):

  1. Range = max − min = 25 − 11 = 14.
  2. Number of bins (Sturges' rule): ⌈log₂(20) + 1⌉ = 6.
  3. Bin width = range ÷ bins = 14 ÷ 6 = 2.33333.
  4. Count how many values fall in each bin. Each bin includes its lower edge; the last bin also includes the maximum.
  5. For comparison, other bin rules suggest: Sturges' rule 6; Square-root rule 5; Rice rule 6; Scott (3.49 s n^−⅓) 3; Freedman-Diaconis 5.

Result: Number of bins = 6; Bin width = 2.33333.

How to read a histogram

The height of each bar is the number of values in that range, so tall bars show where data is concentrated. Look first at the overall shape, then at the centre, the spread and anything unusual such as gaps or isolated bars far from the rest.

Common histogram shapes
ShapeWhat it looks likeTypical meaningBetter summary
Symmetric, bell-shapedMirror image around the middleMany natural measurements (heights, errors)Mean and SD
Right-skewedLong tail to the rightIncomes, waiting times, house pricesMedian and IQR
Left-skewedLong tail to the leftExam scores with a ceiling, age at deathMedian and IQR
BimodalTwo separate peaksTwo groups mixed togetherSplit the groups
UniformBars about equal heightEqually likely outcomes, e.g. a fair dieRange
With outliersIsolated bar(s) far awayErrors or rare eventsCheck the data

Choosing the number of bins

The bin count changes the story the histogram tells. Too few bins smooth away real features such as two peaks; too many produce a jagged chart that shows noise. The step-by-step panel lists what five common rules suggest for your data so you can try them.

Bin rules compared
RuleFormulaBest for
Sturgesk = ⌈log₂ n + 1⌉Roughly normal data, n under about 200
Square rootk = ⌈√n⌉Quick default, any size
Ricek = ⌈2 n^(1/3)⌉Larger samples
Scottw = 3.49 s n^(−1/3)Near-normal data
Freedman-Diaconisw = 2 IQR n^(−1/3)Skewed data and outliers

Histogram or bar chart?

A histogram is for numeric data split into continuous ranges, so the bars touch and the x-axis is a number line. A bar chart compares separate categories such as countries or product names and its bars have gaps. Mixing them up is a very common error in school projects.

The cumulative chart (ogive)

The second chart shows the running total of the percentage of values up to each bin edge. Read it to answer “what share of the data is below x?”, for example the median is where the curve crosses 50 %.

Where Histogram Is Used

Seeing the shape of data

Checking whether a variable looks symmetric, skewed or has more than one peak.

Building a frequency table

Producing class intervals and counts for a school or lab report.

Spotting gaps and outliers

Finding empty bins or isolated values that need a closer look.

Checking assumptions

Looking at the distribution before running a test that assumes roughly normal data.

Common Histogram Mistakes to Avoid

  • Using uneven bin widths without adjusting heights (use frequency density if bins differ).
  • Choosing bin edges that put key values exactly on the boundary; here each bin includes its lower edge.
  • Reading too much into small differences in bar height with few observations.
  • Leaving a long empty tail from one outlier; check or trim the data first.
  • Too few bins hide the shape and too many make it noisy. Start with the automatic value and adjust.
  • A histogram is for numeric data. For categories, use a bar chart, where the bars are separated.
  • Look for skew, several peaks and outliers before choosing a summary statistic such as the mean.

Histogram Terms and Definitions

Bin
A range of values grouped together, also called a class interval.
Frequency
The number of observations in a bin.
Relative frequency
Frequency divided by the total count.
Skewness
A measure of asymmetry of a distribution.
Ogive
A cumulative frequency graph.

Histogram FAQs

How do I make a histogram?

Paste your values, optionally set the number of bins and read the chart. The frequency table beneath lists each bin and its counts.

How do I choose the right bin width?

Start with the automatic value, then try a few more and fewer bins. Choose the one that shows the shape clearly without too much noise. Five standard rules are listed in the steps.

What is the difference between frequency and relative frequency?

Frequency is a count; relative frequency is the count divided by n, shown as a percentage.

Can I make a histogram with unequal bins?

This tool uses equal-width bins, which is the standard form. For unequal bins use frequency density (frequency ÷ width) on the y-axis.

What does a histogram with two peaks mean?

Usually two different groups combined in one data set, such as heights of men and women. Analyse the groups separately.

How many data points do I need?

At least 20 or so to see a shape; more is better. With very few points a dot plot is clearer.

What is a histogram?

A histogram is a bar chart for numeric data in which each bar covers a range of values (a bin) and its height is the number of observations in that range.

How many bins should I use?

There is no single correct number. Sturges' rule, k = ⌈log₂ n + 1⌉, is a common starting point, and the square-root rule is another. Try several and choose the one that shows the shape clearly.

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

A histogram groups continuous numeric values into ranges and its bars touch. A bar chart compares separate categories.

What is relative frequency?

It is the share of all observations that fall in a bin, shown here as a percentage of the total count.

Related calculators

Last updated 2026-11-09. See our disclaimer.