Work out the class width for a grouped frequency table from the smallest value, largest value and number of classes, with the full set of class limits, boundaries and midpoints.
Class width = (max − min) ÷ classes, rounded up
Class width is the size of each group in a grouped frequency table: the difference between the lower limits of two neighbouring classes. With classes 41–50, 51–60 and so on, the width is 10.
To find it, divide the range of the data by the number of classes you want, then round up. Rounding up, never down, guarantees the classes stretch far enough to hold the largest value.
Each class has limits, the smallest and largest values that can be recorded in it, and boundaries, which sit halfway between one class's upper limit and the next class's lower limit. The boundaries close the gaps so a histogram's bars can touch.
As given in OpenStax Introductory Statistics, section 2.2. See Sources.
With whole-number limits, 3 classes of exactly 10 from 0 would be 0–9, 10–19 and 20–29, leaving 30 out. Adding one unit fixes that.
The first class has boundaries 40.5–50.5 and midpoint 45.5. The last class, 91–100, runs past 98, which is fine: empty room at the top is better than a value with nowhere to go.
The exam marks (41 to 98) with 5 to 10 classes.
| Classes | Range ÷ classes | Width | First class | Last class |
|---|---|---|---|---|
| 5 | 11.4 | 12 | 41–52 | 89–100 |
| 6 | 9.5 | 10 | 41–50 | 91–100 |
| 7 | 8.14 | 9 | 41–49 | 95–103 |
| 8 | 7.13 | 8 | 41–48 | 97–104 |
| 9 | 6.33 | 7 | 41–47 | 97–103 |
| 10 | 5.7 | 6 | 41–46 | 95–100 |
Subtract the smallest value from the largest, divide by the number of classes, and round up.
Rounding down makes the classes too narrow to reach the largest value.
Usually 5 to 20. Sturges’ rule, log₂ n + 1, is a common starting point.
Limits are the smallest and largest recordable values in a class. Boundaries are halfway between neighbouring classes, so there are no gaps.
Average the lower and upper limits: (41 + 50) ÷ 2 = 45.5.
Yes. Widths of 5, 10 or 25 make tables easier to read. Any width at least as large as this one will work.
No, starting at a round number just below it, such as 40, is common and often tidier.
The rounding unit. Widths round up to the nearest 0.1, limits step by 0.1, and boundaries sit 0.05 either side.
Related Tools