What this calculator does
Turn a long list of numbers into a short table that shows where most of them fall. A frequency table splits the data's range into groups called classes, or lists each distinct value. Then it counts how many data points land in each one. It also adds two helpful columns. Relative frequency is each count as a share of the total. Cumulative frequency is the running total. Together they show where the data bunch up, how they spread out, and what share lies below any point.
Paste your data and choose how to group it. You can pick a number of classes, a class width, or each distinct value. The generator builds the table with class limits, midpoints, frequencies, and relative and cumulative frequencies. It also reports the modal class (the class with the most values). And it gives the mean (average) estimated from the grouped data. It's the table you would draw a histogram, or bar chart of the counts, from.
Where it's used
Why this math matters outside the classroom:
- Test score reports. A teacher groups 30 test scores into 50–59, 60–69 and so on to see that 12 students scored in the 70s.
- Store receipts. A shop owner groups 15 receipts into 5 classes of $11 and finds two thirds of customers spend $44 or less.
- Weather records. A gardener tallies daily high temperatures in 5 °C classes to see how many days a month reached 30 °C or more.
- Survey ratings. A club counts how many members answered 1 to 5 on a satisfaction survey and reports that 45% chose 4.
- Histograms. Students build the frequency table first, then draw one bar per class with a height equal to its frequency.
Grade level and standards: Grades 6–7; Common Core State Standards for Mathematics 6.SP.B.4. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.
How to use it
- Paste or type the data, separated by commas, spaces or new lines.
- Choose how to group it: a number of classes, a class width, or each distinct value.
- If you like, set where the first class starts. For example, 10 makes the classes run 10–19, 20–29 and so on.
- Read the modal class. Then open the table for each class's frequency, relative frequency and cumulative frequency.
What the inputs mean
- Data values
- Separate with commas, spaces or new lines. Up to 10,000 values.
- Group the data by
- Grouping by each distinct value suits small whole-number data, such as dice rolls, shoe sizes or survey ratings. For measurements with many different values, classes are clearer.
- Number of classes
- With a number of classes, the width is the range divided by that number, rounded up to match the data's decimal places. If it divides exactly, one more unit is added. That way the largest value isn't left sitting on the boundary.
- First class starts at (optional)
- Round, friendly starting points such as 0, 10 or 50 make tables easier to read. The start must be at or below the smallest value.
Formula and method
class width = range ÷ number of classes, rounded up class: lower limit ≤ x < next lower limit midpoint = (lower limit + upper limit) ÷ 2 relative frequency = frequency ÷ n cumulative frequency = sum of the frequencies up to this class grouped mean ≈ Σ(frequency × midpoint) ÷ n
In the formulas, x is any one data value and n is how many values there are. The range is the largest value minus the smallest. Σ means 'add up over every class'. Each class includes its lower limit and stops just before the next class begins. So every value lands in exactly one class. For whole-number data, a class written 12–22 holds 12 through 22, and the next starts at 23. For data with one decimal place, the limits have one decimal too, such as 1.2–3.0.
Relative frequency rescales the counts so they add up to 100%. That makes data sets of different sizes easy to compare. Cumulative frequency adds the counts as you go down the table, so the last row always equals the number of values. Cumulative relative frequency tells you the share of the data at or below each class.
The midpoint stands in for every value in its class. That's how the grouped mean is estimated when you only have the table. It's usually close to the true mean of the raw data, but not exactly the same.
Worked example
Fifteen customers spent 12, 15, 22, 27, 31, 33, 35, 38, 41, 44, 45, 47, 52, 58 and 63 dollars. Group the amounts into 5 classes.
- Range: 63 − 12 = 51. Dividing by 5 classes gives 10.2, rounded up to a width of 11.
- Classes: 12–22, 23–33, 34–44, 45–55 and 56–66.
- Tally: 3, 3, 4, 3 and 2 values, so the cumulative frequencies are 3, 6, 10, 13 and 15.
- Relative frequency of the middle class: 4 ÷ 15 = 26.67%.
- Grouped mean: (3 × 17 + 3 × 28 + 4 × 39 + 3 × 50 + 2 × 61) ÷ 15 = 37.5333.
Result: The modal class is 34–44, with 4 values. Two thirds of customers (10 of 15) spent $44 or less. The grouped mean of about $37.53 happens to match the raw data's mean exactly here. Usually the two differ slightly.
Understanding the result
The modal class shows where values bunch up the most. If several classes tie, the data may be spread evenly or have more than one cluster. The cumulative relative column answers 'what share is below this?' directly. That's the idea behind percentiles.
The number of classes changes the picture. Too few hide the shape, and too many leave most classes with one or two values. For a few dozen values, 5 to 8 classes usually works. For hundreds, try 10 to 20.
Assumptions and limitations
- Classes are all the same width. Each includes its lower limit but not the next class's lower limit.
- Class limits use as many decimal places as the most precise value in the data.
- Classes of different widths aren't supported.
- Data that are categories rather than numbers can't be entered. Use counts by category instead.
- The grouped mean is an estimate. It assumes every value sits at its class midpoint.
Frequently asked questions
How many classes should a frequency table have?
There's no single rule, but 5 to 20 is typical. A common starting point is Sturges' rule: about 1 + 3.3 × log₁₀(n) classes, where n is the number of values. It suggests 5 classes for 15 values and about 11 for 1,000.
What is the difference between relative and cumulative frequency?
Relative frequency is one class's count divided by the total, such as 4 of 15 = 26.67%. Cumulative frequency is the running total of the counts up to and including that class, such as 3 + 3 + 4 = 10.
How do I find the class width?
Subtract the smallest value from the largest to get the range. Divide by the number of classes you want, then round up to a handy number. With a range of 51 and 5 classes, 51 ÷ 5 = 10.2, so a width of 11 works.
What is the midpoint of a class used for?
It stands in for the whole class when you work from the table instead of the raw data. For example, you can use it to estimate the mean or to plot a frequency polygon (a line graph of the counts). For the class 12–22 it's (12 + 22) ÷ 2 = 17.
How this calculator is checked
Method: Standard grouped frequency distribution conventions from introductory statistics: equal-width classes that include their lower limit, width from range ÷ number of classes rounded up, midpoints from class limits, relative and cumulative frequencies, and the grouped-data mean. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.
Embed this calculator
Put this Frequency Table Generator on your own website or blog for free. Paste this code where you want it to appear: