How this instrument works
A frequency table groups raw data into a small number of intervals, called classes, and counts how many values fall into each one — turning a long list of individual numbers into a shape you can actually see, like a histogram. Class width is simply how wide each of those intervals is: the total range of the data (maximum minus minimum) divided by however many classes you've decided to use. Wider classes with fewer buckets smooth out noise but hide detail; narrower classes with more buckets show more structure but can leave individual buckets nearly empty.
The number of classes isn't fixed by any formula — it's a judgment call, though there are rules of thumb to start from. Sturges' rule suggests roughly 1 + log₂(n) classes for n data points, and the square-root rule suggests roughly √n classes; both exist to keep the table from having so few classes that it hides everything or so many that individual classes contain barely any data. Once you've picked a class count, though, the width itself is pure arithmetic — this calculator handles that step.
In practice, many people round the computed class width up to a tidier number (14.33 becomes 15, for instance) before actually building the table, since round boundaries are easier to read on an axis and easier to sort data into by hand. This calculator reports the exact mathematical width; rounding it for presentation is a separate, deliberate choice you make afterward.
- Enter the largest value in your data set into Maximum value.
- Enter the smallest value into Minimum value — it must be less than or equal to the maximum.
- Enter how many classes (intervals) you want your frequency table to have into Number of classes — at least 1.
- Read Class width — the size each interval should be to divide the full range into that many equal classes.
- Round the result to a convenient number before actually labelling your table's class boundaries, if a cleaner axis matters more than exact equal widths.
Worked example — 98 down to 12, split into 6 classes
A data set of exam scores ranges from a minimum of 12 to a maximum of 98, and you want to build a frequency table with 6 classes. Enter 98 into Maximum value, 12 into Minimum value, and 6 into Number of classes.
The instrument computes class width = (98 − 12) / 6 = 86 / 6 = 14.3333 (repeating). In practice you'd likely round this up to a class width of 15 for cleaner boundaries — starting the first class at 12 and stepping by 15 (12–27, 27–42, and so on) comfortably covers the full 12-to-98 range in 6 classes.
Questions
Why did I get a repeating decimal for class width?
Because (max − min) doesn't divide evenly by your chosen number of classes — in the worked example, 86 divided by 6 gives 14.3333 repeating. This is completely normal; most real data ranges won't divide into a whole number of classes. Round the result up to a convenient figure (here, 15) before building the actual table, so the class boundaries are easy to read and sort into.
How many classes should I use?
There's no single correct answer, but two common rules of thumb exist: Sturges' rule suggests about 1 + log₂(n) classes for n data points, and the square-root rule suggests about √n classes. Both aim for a middle ground — enough classes to show the data's shape, not so many that individual classes end up nearly empty. For most introductory work, somewhere between 5 and 20 classes is typical.
Should I round the class width up or to the nearest number?
Round up, not to the nearest value. If you round down or to the nearest figure, the resulting classes might not fully cover your maximum value, leaving the largest data point without a class to fall into. Rounding up guarantees the full range, from minimum to maximum, is captured.
What happens if I enter the same value for maximum and minimum?
Class width comes out to zero, which isn't meaningful for building a table — every value in a real data set spans some range, so identical max and min usually signal that only one data point (or one repeated value) exists. Check your data before proceeding if this happens unexpectedly.
Does class width have to be the same for every class?
For the standard equal-width frequency table this calculator supports, yes — every class spans the same width, computed once from the full range and the chosen class count. Some specialized applications use unequal class widths (for example, to group sparse extreme values into one wider bin), but that requires manual judgment beyond a single division and isn't what this calculator computes.