🔍

📶 Histogram Calculator

Find the recommended bin count and bin width for building a histogram from your data set.

What a histogram shows

A histogram is a bar chart that groups numeric data into consecutive intervals (bins) and shows how many data points fall into each one, making the overall shape and spread of a data set easy to see at a glance.

How this calculator works

Enter your data values. The calculator uses Sturges’ rule, a widely used guideline, to suggest a reasonable number of bins based on your sample size (bins = ceil(log2(n) + 1)). It then divides the data’s range by that bin count to find the bin width, sorts each value into its bin, and reports how many points landed in the busiest (modal) bin.

Sturges’ rule works well for small to moderately sized, roughly normal data sets; for very large or unusually shaped data, other rules (like the Freedman-Diaconis rule) may give better results. This tool is intended for general statistics education and exploratory data analysis.

Last reviewed August 2026