Class Width Calculator

Calculate the class width for frequency distributions and histograms. Enter the range and number of classes, or let the calculator determine the optimal number.

CLASS WIDTH
--
Range
--
Rounded Width
--
Sturges' Classes
--
First 3 Intervals
--

What Is Class Width?

Class width is the difference between the upper and lower boundaries of a class interval in a frequency distribution or histogram. Choosing the right class width affects how well the histogram reveals the shape, center, and spread of the data. Too few classes hide details; too many create noise.

The class width is calculated by dividing the range (max - min) by the desired number of classes, then typically rounding up to a convenient number.

Formulas

Class Width = (Maximum - Minimum) / Number of Classes
Sturges' Rule: k = 1 + 3.322 × log10(n)
Square Root Rule: k = √n

Guidelines for Number of Classes

Data PointsSuggested Classes
< 255-6
25-506-8
50-1007-10
100-5008-15
> 50010-20

FAQ

Should I round the class width?

Yes, round up to the next convenient number. For example, a width of 8.3 should be rounded to 9 or 10, depending on the data scale. This ensures all data points are covered.

What is Sturges' rule?

Sturges' rule estimates the optimal number of classes as k = 1 + 3.322*log10(n), where n is the number of data points. It works well for roughly normal data but may underestimate classes for skewed data.