Frequency Distribution Calculator

Paste a data set and build a grouped frequency table — class intervals, frequency, relative frequency (%), and cumulative frequency.

Quick Facts

Method
Equal-width classes: width = ⌈(max − min) / k⌉
Frequency = count per class; relative frequency = count ÷ n; cumulative = running total.

Your Results

Calculated
Data points (n)
-
Total values entered
Range
-
Max − min
Class width
-
Interval size per class
Classes
-
Number of intervals

Ready

Enter your data values and choose how many classes to group them into.

What a frequency distribution is

A frequency distribution takes a raw list of numbers and organizes it into a compact table that shows how the data is spread out. Instead of staring at dozens or hundreds of individual values, you sort them into a handful of equal-width intervals called classes (or bins) and count how many values fall into each one. The result is a table with one row per class showing its frequency (the count), its relative frequency (the proportion of the total), and its cumulative frequency (the running total from the first class down). This is the standard first step in descriptive statistics and the data behind every histogram.

The method this calculator uses

This tool builds a grouped frequency distribution with equal-width classes, the method taught in introductory statistics courses:

  • Range = maximum value − minimum value.
  • Class width = ⌈Range ÷ k⌉, where k is the number of classes you choose. The result is rounded up to the next whole number so that every data point, including the maximum, lands inside a class.
  • Class boundaries start at the minimum value; each successive class begins where the previous one ends (lower ≤ value < upper), and the final class includes its upper endpoint so the maximum is counted.
  • Frequency = the number of values in each class. The frequencies always add up to n, the total number of data points.
  • Relative frequency = frequency ÷ n. Expressed as a proportion (0–1) or a percentage; relative frequencies always sum to 1 (100%).
  • Cumulative frequency = the running total of frequencies through and including the current class. The last cumulative value equals n.

How many classes should you use?

There is no single correct number, but two conventions are widely used. The simplest is to pick a round number between 5 and 20 depending on how much data you have. A more formal choice is Sturges' rule: k = 1 + 3.322 · log₁₀(n). For 20 data points that gives k ≈ 5.3, so you would round to 5 or 6 classes. For 100 points it gives k ≈ 7.6, so 7 or 8. Too few classes flatten out the shape of the data; too many leave sparse, jagged bins that overstate random noise.

Why frequency distributions matter

Grouping data reveals its shape — where it clusters, whether it is symmetric or skewed, and whether there are gaps or outliers — none of which is visible in an unsorted list. A frequency table is also the direct input to a histogram, a frequency polygon, or an ogive (a cumulative-frequency curve). Relative frequencies let you compare two data sets of different sizes on the same footing, and cumulative frequencies answer "how many values are at or below this level?" — the basis for percentiles and medians estimated from grouped data.

A worked example

Take the 20 test scores 23, 45, 12, 67, 34, 89, 21, 55, 43, 78, 32, 61, 48, 27, 90, 14, 52, 39, 71, 26. The minimum is 12 and the maximum is 90, so the range is 78. With k = 5 classes the width is ⌈78 ÷ 5⌉ = ⌈15.6⌉ = 16. The classes run 12–28, 28–44, 44–60, 60–76, 76–92, and the counts are 6, 4, 4, 3, 3, which sum back to 20. The relative frequencies are 0.30, 0.20, 0.20, 0.15, 0.15 (30%, 20%, 20%, 15%, 15%), and the cumulative frequencies build to 6, 10, 14, 17, 20.

Frequently Asked Questions

How many classes should a frequency distribution have?
Most tables use between 5 and 20 classes. A common formal choice is Sturges' rule, k = 1 + 3.322·log₁₀(n), where n is the number of data points — 50 values gives about 7 classes, 100 values about 8. Fewer classes hide the shape of the data; more classes create sparse, noisy bins. Choose what makes the pattern clearest for your data.
What is the difference between frequency and relative frequency?
Frequency is the raw count of values that fall into a class. Relative frequency is that count divided by n, the total number of values, shown as a proportion (0–1) or percentage. Relative frequencies always sum to 1 (100%), which lets you compare distributions built from different sample sizes.
Which class does a value on a boundary go into?
This calculator uses the standard "lower bound inclusive, upper bound exclusive" convention (lower ≤ value < upper), so a value that lands exactly on a boundary is counted in the higher class. The single exception is the final class, whose upper endpoint is inclusive so that the maximum value is captured. This guarantees every value is counted exactly once and the frequencies sum to n.
Why is the class width rounded up?
Rounding the width up (⌈Range ÷ k⌉) guarantees that k classes starting at the minimum value stretch far enough to cover the maximum. If the width were rounded down, the classes could stop short and leave the largest value with no bin. The trade-off is that the last class may extend slightly past the maximum, which is normal and expected.