Beginner

Histogram Calculator — Frequency Distribution

Paste or type your dataset and choose how many bins to use — the calculator instantly builds the frequency distribution table, plots the histogram bars, and reports the mean, median, standard deviation, and the mode class (most frequent bin).
Separate values with commas, spaces, or semicolons
Mean
83.05

Arithmetic average of 20 data points

Data points (n)
20
Median
85
Std deviation
8.03
Min
67
Max
95
Mode class
83.8 – 89.4
Frequency distribution
67 – 72.63 (15.0%)
72.6 – 78.23 (15.0%)
78.2 – 83.83 (15.0%)
83.8 – 89.46 (30.0%)
89.4 – 955 (25.0%)
Step by step
  1. 1

    Data count

    20
  2. 2

    Sum of all values

    Σ (20 values) = 1,661
    Add every data point together.
  3. 3

    Mean

    1,661 ÷ 20 = 83.05
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Enter comma-separated data and choose k bins. Bin width = (max − min) / k; each bin counts values in [lo, hi). The result table shows frequency and relative frequency per bin plus mean, median, and standard deviation of the dataset — the mode class is the tallest bar.

Formula
Bin width = (max − min) ÷ k • Frequency = count of values in [lo, hi) • Relative frequency = count / n
How this is calculated

A histogram groups continuous data into equal-width intervals (bins) and counts how many observations fall in each. The bin width is determined by dividing the data range by your chosen number of bins k. Values are assigned to the interval [lo, hi) — inclusive on the left, exclusive on the right — except for the last bin which is fully closed [lo, max] to capture the maximum value.

The calculator also reports summary statistics: the mean (arithmetic average), median (middle value of the sorted data), and standard deviation (population formula, dividing by n rather than n−1). The mode class is the bin with the highest frequency.

Choosing the right number of bins is a judgment call. Too few bins hide the shape of the distribution; too many make every bar height 0 or 1. A useful starting point is the Sturges rule: k ≈ 1 + log₂(n), which gives roughly 4–5 bins for 15 values and 7–8 bins for 100 values. Adjust with the bin count field until the distribution shape becomes clear.

Frequently asked questions

Use Sturges' rule (k = 1 + log₂(n)) as a starting point, then adjust visually. For small samples (< 30 values) 4–6 bins usually works well. For larger datasets try the square-root rule (k = √n) or Scott's rule. The goal is a smooth shape without excessive empty bins.

A bar chart displays counts of discrete categories (like survey responses). A histogram displays the frequency of continuous numerical data grouped into equal-width intervals. The bars in a histogram are adjacent (no gaps) because the data is continuous.

Each bin uses a half-open interval [lo, hi) so every value belongs to exactly one bin. Without a special rule for the maximum, it would fall outside all bins. The last bin is made fully closed [lo, max] to capture it.

Also known as

histogram calculator
frequency distribution table calculator
bin frequency histogram
data distribution bins calculator
relative frequency distribution
class interval frequency table
histogram maker online

APA

TG we-Calculate Editorial Team. (2026). Histogram Calculator — Frequency Distribution [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/histogram-calculator

Chicago

TG we-Calculate Editorial Team. "Histogram Calculator — Frequency Distribution." TG we-Calculate. 2026. https://we-calculate.com/calculator/histogram-calculator.

IEEE

TG we-Calculate Editorial Team, "Histogram Calculator — Frequency Distribution," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/histogram-calculator

BibTeX

@misc{wecalculate_histogram_calculator, title = {Histogram Calculator — Frequency Distribution}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/histogram-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?