Frequency Distribution Calculator
Create a frequency distribution table from raw data. Calculate class intervals, frequencies, relative frequencies, cumulative frequencies, and identify the mode class. See also our Histogram Calculator, Mean Calculator, and Standard Deviation Calculator.
How to Use the Frequency Distribution Calculator
A frequency distribution organizes raw data into classes (intervals) and counts how many observations fall into each class. This summarizes large datasets, reveals patterns, and forms the basis for histograms. It transforms a list of numbers into a structured table showing the distribution shape — whether data is symmetric, skewed, uniform, or multimodal.
Enter your data as comma-separated numbers and specify the desired number of classes. The calculator automatically determines the class width by dividing the range by the number of classes (rounded up). It then counts frequencies, calculates relative frequencies (proportions), and builds cumulative frequency columns. The mode class (most frequent interval) is highlighted.
Choosing the right number of classes is important. Too few classes oversimplify the data; too many create sparse, noisy tables. Common rules include Sturges' formula (k = 1 + 3.322×log₁₀(n)), the square root rule (k = √n), and Rice's rule (k = 2n^(1/3)). For most datasets of 20-100 observations, 5-10 classes work well. Experiment with different values to find the most informative representation.
The cumulative frequency column is particularly useful for finding percentiles and medians from grouped data. The cumulative relative frequency at any class boundary estimates the proportion of data below that value. When the cumulative relative frequency reaches 0.5, you have found the approximate median class. This technique is essential when working with large datasets or when only grouped data is available.
Formula
Class Width:
Width = ⌈(Max - Min) / k⌉ (rounded up)
Relative Frequency:
Rel. Freq = Class Frequency / Total n
Cumulative Frequency:
Cum. Freq = Sum of all frequencies up to and including current class
Cumulative Relative Frequency:
Cum. Rel. Freq = Cumulative Frequency / n
Sturges' Rule (number of classes):
k = 1 + 3.322 × log₁₀(n)
Square Root Rule:
k = √n
Rice's Rule:
k = 2 × n^(1/3)
Example Calculation
Data: 12, 15, 18, 22, 25, 28, 30, 32, 35, 38, 40, 42, 45, 48, 50, 52, 55, 58, 60, 65
n = 20, Min = 12, Max = 65, Range = 53
Classes = 5, Width = ⌈53/5⌉ = 11
Class 12-23: Freq=4, Rel=0.20, Cum=4
Class 23-34: Freq=4, Rel=0.20, Cum=8
Class 34-45: Freq=5, Rel=0.25, Cum=13
Class 45-56: Freq=4, Rel=0.20, Cum=17
Class 56-67: Freq=3, Rel=0.15, Cum=20
Mode class: 34-45 (highest frequency = 5)
Reference Table
| Sample Size (n) | Suggested Classes | Method |
|---|---|---|
| 10-20 | 4-5 | Sturges: 1 + 3.322×log(n) |
| 20-50 | 5-7 | Square root: √n |
| 50-100 | 7-10 | Sturges or Rice |
| 100-200 | 8-12 | Rice: 2×n^(1/3) |
| 200-500 | 9-15 | Freedman-Diaconis |
| 500-1000 | 10-20 | Scott or FD rule |
| 1000+ | 15-30 | Depends on distribution |
Frequently Asked Questions
What is a frequency distribution?
A frequency distribution is a summary of data showing how often different values or ranges of values occur. It organizes raw data into classes (bins) and counts the number of observations in each class. This reveals the shape of the data distribution — whether it's symmetric, skewed left or right, uniform, bimodal, or has outliers. It is the foundation for histograms and many statistical analyses.
How do I choose the number of classes?
Several rules of thumb exist: Sturges' formula (k = 1 + 3.322×log₁₀(n)) works well for roughly normal data. The square root rule (k = √n) is simple and effective. Rice's rule (k = 2n^(1/3)) works for larger datasets. The Freedman-Diaconis rule uses the interquartile range for bin width. In practice, try several values and choose the one that best reveals the data's structure without being too sparse or too detailed.
What is relative frequency?
Relative frequency is the proportion of observations in each class, calculated as class frequency divided by total sample size. It always sums to 1.0 (or 100%). Relative frequency is useful for comparing distributions with different sample sizes and for estimating probabilities. If the relative frequency of the 20-30 class is 0.25, approximately 25% of observations fall in that range.
What is cumulative frequency used for?
Cumulative frequency shows the running total of observations up to each class boundary. It answers questions like "how many observations are below 50?" The cumulative relative frequency gives the proportion below each boundary, which estimates the cumulative distribution function (CDF). It's used to find percentiles, medians, and quartiles from grouped data, and to create ogive (cumulative frequency) curves.
What is the mode class?
The mode class (or modal class) is the class interval with the highest frequency — the most common range of values. It indicates where data is most concentrated. For grouped data, the mode class replaces the exact mode (which may not be meaningful for continuous data). If two non-adjacent classes have equal highest frequency, the distribution is bimodal, suggesting two distinct groups in the data.
Should class intervals overlap?
No. Class intervals must be mutually exclusive (non-overlapping) so each observation belongs to exactly one class. Use conventions like "10 to <20" and "20 to <30" (left-closed, right-open) to avoid ambiguity at boundaries. The last class is typically closed on both ends to include the maximum value. All classes should have equal width for standard frequency distributions, though unequal widths are sometimes used for highly skewed data.