Calculateus

Frequency Table Class Width Calculator

Calculate the class width needed to build a frequency table with a chosen number of classes.

Result

Class Width
12
Range
89

Class width is conventionally rounded UP to the next whole number (or a 'nice' round number) so that the resulting classes fully cover the data range without leaving the maximum value uncovered.

About the Class Width Calculator

The Frequency Table Class Width Calculator finds how wide each class interval should be when you're building a grouped frequency distribution or histogram from raw data. Instead of guessing at round numbers, it works directly from your data's range and the number of classes you want, so the resulting table fully covers every value from minimum to maximum.

How It Works

Enter the minimum value, maximum value, and the number of classes you want in your frequency table. The calculator subtracts minimum from maximum to get the range, divides the range by the number of classes to get a raw class width, and then rounds that value up to the next whole number so the classes are guaranteed to cover the full range.

Class width = ceiling( (Maximum - Minimum) / Number of Classes )

Formula & Methodology

By hand, subtract the minimum from the maximum to find the range, divide that range by however many classes you want, and round the result up to the next whole number, never down, even if the raw division comes out just barely above a whole number.

Examples

Building an 8-class table from an 89-point range

With a minimum of 8, a maximum of 97, and 8 desired classes, the range is 89, the raw width is 89 / 8 = 11.125, and the calculator rounds that up to a class width of 12.

Grouping exam scores into 6 classes

For exam scores ranging from 52 to 99 grouped into 6 classes, the range is 47, the raw width is 47 / 6 = 7.83, and the calculator rounds up to a class width of 8.

Advantages

  • Removes the manual rounding step, which is a common source of frequency tables that fail to cover the maximum value.
  • Lets you experiment with different class counts instantly to see how the resulting width changes.
  • Works for any numeric range, so it applies equally to test scores, measurements, ages, or financial figures.

Common Mistakes

  • Rounding the raw width down or to the nearest whole number instead of up, which can leave the highest data value without a class to fall into.
  • Choosing a number of classes that's too small or too large for the dataset, producing either an overly coarse or overly noisy table (a common guideline is 5 to 20 classes for most datasets).
  • Forgetting that the class width from this calculator applies uniformly across all classes; unequal class widths need to be constructed manually.

Edge Cases to Watch For

  • Number of classes is automatically treated as at least 1, even if a zero or negative value is entered.
  • If the maximum is less than the minimum, the calculator returns an error rather than working with a negative range.
  • Rounding is always up (ceiling), never to the nearest whole number, because rounding down or to the nearest value could leave the maximum data point outside the final class.

Common Use Cases

  • Statistics students building their first grouped frequency distribution for a homework assignment.
  • Analysts preparing a histogram from a raw list of measurements or survey responses.
  • Teachers grouping a class's exam scores into grade bands for a distribution summary.
Written & fact-checked by the Calculateus TeamLast updated August 5, 2026How we verify our formulas

Frequently asked questions

Why round the class width up instead of to the nearest whole number?

Rounding up guarantees the classes fully span from the minimum to at least the maximum data value - rounding to the nearest number could produce classes that don't quite reach the highest value in the dataset, leaving it uncategorized.

Conclusion

Class width is a small calculation with an outsized effect on how a frequency table looks and reads. This calculator handles the division and rounding consistently, so the resulting classes are guaranteed to span the entire dataset.