Histogram Generator

Reviewed by CalcMulti Editorial Team·Last updated: ·Statistics Hub

A histogram is the most fundamental tool for visualising a numerical dataset. It groups data into bins and shows the frequency of each bin as a bar, revealing the shape, center, and spread of the distribution at a glance.

Paste your comma or space-separated data below. The calculator auto-selects the optimal number of bins using Sturges' rule, builds the frequency distribution table, and computes complete descriptive statistics.

Formula

Bins: k = ⌈1 + log₂(n)⌉ Width: h = (max − min) / k

n
number of data points
k
number of bins (Sturges' rule)
h
bin width
f_i
frequency (count) of bin i
rf_i
relative frequency = f_i / n

Enter Data

Bin Selection Rules Comparison

RuleFormulaBest for
Sturges (default)k = ⌈1 + log₂(n)⌉Normal-like data, n < 200
Square rootk = ⌈√n⌉Simple, general purpose
Scott's ruleh = 3.49σ/n^(1/3)Normal data, minimises MSE
Freedman-Diaconish = 2×IQR/n^(1/3)Skewed data, robust to outliers
Rice rulek = ⌈2n^(1/3)⌉Moderate sample sizes

Disclaimer

This histogram is generated from the data you provide. For best results, use n ≥ 20 data points.

Frequently Asked Questions