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
| Rule | Formula | Best for |
|---|---|---|
| Sturges (default) | k = ⌈1 + log₂(n)⌉ | Normal-like data, n < 200 |
| Square root | k = ⌈√n⌉ | Simple, general purpose |
| Scott's rule | h = 3.49σ/n^(1/3) | Normal data, minimises MSE |
| Freedman-Diaconis | h = 2×IQR/n^(1/3) | Skewed data, robust to outliers |
| Rice rule | k = ⌈2n^(1/3)⌉ | Moderate sample sizes |
Related Calculators
Five-number summary and outlier detection
Bell Curve GeneratorNormal distribution visualiser
Normality Test CalculatorTest if data is normally distributed
Skewness & Kurtosis CalculatorMeasure distribution shape
Frequency Distribution CalculatorFrequency tables for raw data
Statistics HubAll statistics calculators
Disclaimer
This histogram is generated from the data you provide. For best results, use n ≥ 20 data points.