🔍

What class width is

When building a frequency distribution table or histogram, data is grouped into intervals called “classes.” Class width is the size of each interval, and choosing it well keeps a histogram readable — too narrow and it’s noisy, too wide and it hides the data’s shape.

The formula

The standard formula is class width = (maximum value – minimum value) / number of classes. Because class widths are almost always rounded up to a convenient whole number so that every data point is guaranteed to fit within the classes, this calculator shows both the exact mathematical width and the practical rounded-up width you’d actually use to define your class boundaries.

  • A common rule of thumb (Sturges’ rule) suggests roughly 1 + log2(n) classes for n data points, but the right number of classes often also depends on how the data will be presented.
  • Rounding the class width up, rather than down or to the nearest whole number, ensures the last class still includes the maximum data value.

This calculator is for general educational and data-analysis purposes.

Last reviewed August 2026