What this calculator does
A frequency table groups data into classes of equal width. This calculator finds the class width from your data, or from its smallest and largest values, lists the class limits and, from data, counts the frequency in each class. It also suggests a number of classes with Sturges' rule.
How to use it
- Choose whether to work from your data or from the smallest and largest values.
- Paste the data, separated by commas or spaces, or enter the smallest and largest values.
- Enter the number of classes you want.
How to calculate class width
- Class width = (largest − smallest) ÷ number of classes, rounded up to the precision of the data (whole numbers for whole-number data).
- If the division comes out exactly, add one unit. Otherwise the largest value would fall just outside the last class.
- Sturges' rule: number of classes = 1 + log₂(n), rounded up, for n values.
Examples
Example 1: Test scores from 47 to 98. The range is 98 − 47 = 51, and 51 ÷ 6 = 8.5. Rounded up, the class width is 9, giving classes 47–55, 56–64 and so on up to 92–100.
Example 2: When the range divides evenly. 50 ÷ 5 is exactly 10, but classes 10–19 to 50–59 would leave out 60. Adding one gives a class width of 11.
Example 3: From a list of 15 values. For the 15 values from 12 to 45 in 5 classes, 33 ÷ 5 = 6.6, so the width is 7. Sturges' rule also suggests 5 classes for 15 values.
Tips
- Each class's lower limit is the previous one plus the class width; the upper limit is one unit below the next lower limit.
- Decimal data is rounded up to its own decimal places: data to one decimal gets a width like 1.3.
- To summarize the same data, try the statistics calculator or the quartile calculator.