Frequency Distribution Calculator

Generate a complete frequency distribution table for any dataset. Choose ungrouped for discrete data or grouped for continuous data with custom class widths.

๐Ÿ“Š Frequency Distribution Calculator
Dataset (comma or space separated)
Dataset (comma or space separated)
Number of Classes5
classes
220
Total Count (N)
Unique Values
Minimum
Maximum
Range
Total Count (N)
Number of Classes
Class Width
Minimum
Maximum

๐Ÿ“Š What is a Frequency Distribution?

A frequency distribution is an organized summary of a dataset that shows how many times each value (or range of values) appears. It transforms a raw list of numbers into a structured table with columns for frequency, relative frequency, and cumulative frequency, making patterns in the data immediately visible. It is one of the most fundamental tools in descriptive statistics and is the basis for histograms, ogive curves, and many probability models.

There are two main types. An ungrouped frequency distribution lists every distinct value in the dataset and counts exact occurrences. It is ideal for discrete data: quiz scores with values of 0 to 10, survey responses on a 1-to-5 scale, the number of defects per product, or die roll outcomes. An grouped frequency distribution divides the data into class intervals (for example 50-60, 60-70, 70-80) and counts how many values fall in each interval. It is essential for continuous data such as heights, weights, temperatures, or incomes where individual values rarely repeat.

You use a frequency distribution any time you need to understand the shape of a dataset. A quality engineer studying defect counts per batch uses it to spot whether the distribution is symmetric or skewed. A teacher analyzing exam grades uses it to identify whether students cluster around a particular score range. A researcher reporting survey data uses relative frequencies to compare subgroups of different sizes. A financial analyst examining daily stock returns uses a grouped distribution to estimate the probability of returns falling in certain bands.

The four columns this calculator produces cover everything you need. Frequency (f) is the raw count. Relative frequency (rf) converts counts to proportions so you can compare datasets of different sizes. Cumulative frequency (CF) is the running total, which is used to find medians and percentiles. Cumulative relative frequency (CRF) is the running proportion and directly estimates the probability that a randomly chosen observation is at most a given value.

๐Ÿ“ Formula

rfi  =  fi ÷ N
fi = frequency of class or value i (raw count)
N = total number of observations in the dataset
rfi = relative frequency of class i (proportion, 0 to 1)
CFk  =  f1 + f2 + … + fk
CFk = cumulative frequency up to and including class k
Class Width  =  (Max − Min) ÷ k
Max = largest value in the dataset
Min = smallest value in the dataset
k = number of classes chosen
Midpoint = (Lower boundary + Upper boundary) ÷ 2
Example: Dataset of 30 values from 20 to 80 with 5 classes: class width = (80 − 20) ÷ 5 = 12. Classes are 20-32, 32-44, 44-56, 56-68, 68-80.

๐Ÿ“– How to Use This Calculator

Steps

1
Select a distribution mode - Choose Ungrouped for discrete data with few unique values (dice, grades, ratings) or Grouped for continuous data where you want class intervals.
2
Enter your dataset - Type or paste your numbers into the data box, separated by commas or spaces. The calculator accepts up to 500 values.
3
Set the number of classes (Grouped mode only) - Drag the slider or type a value between 2 and 20. A good starting point is 5 to 7 classes for most datasets.
4
Click Calculate - Press the Calculate button to generate the full frequency distribution table with all columns.
5
Read the table - Review frequency, relative frequency, cumulative frequency, and cumulative relative frequency for each value or class interval.

๐Ÿ’ก Example Calculations

Example 1 - Die Rolls (Ungrouped, Discrete Data)

Record of 15 rolls of a standard six-sided die

1
Raw data: 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9. Oops, these are not all valid die values. Let us use a realistic die roll sequence: 2, 5, 3, 3, 6, 1, 4, 3, 6, 2, 1, 5, 4, 3, 6. N = 15.
2
Count occurrences: 1 appears 2 times, 2 appears 2 times, 3 appears 4 times, 4 appears 2 times, 5 appears 2 times, 6 appears 3 times.
3
Relative frequency of 3: f/N = 4/15 = 26.67%. Cumulative frequency at 3: 2 + 2 + 4 = 8. Cumulative relative frequency: 8/15 = 53.33%.
Result: value 3 is the most frequent (mode), with relative frequency 26.67%
Try this example →

Example 2 - Student Heights (Grouped, Continuous Data)

Heights (cm) of 12 students measured to the nearest centimetre, 5 classes

1
Raw data: 155, 160, 162, 165, 168, 170, 172, 175, 178, 180, 182, 185. Min = 155, Max = 185, Range = 30.
2
With 5 classes: class width = 30 / 5 = 6 cm. Classes are 155-161, 161-167, 167-173, 173-179, 179-185.
3
Frequencies: 155-161: 2, 161-167: 2, 167-173: 3, 173-179: 2, 179-185: 3. Relative frequencies: 16.67%, 16.67%, 25%, 16.67%, 25%.
Result: Classes 167-173 and 179-185 are most frequent (25% each), showing a bimodal pattern
Try this example →

Example 3 - Exam Scores (Ungrouped, Discrete Data)

Scores out of 10 for 20 students on a short quiz

1
Raw data: 7, 8, 6, 9, 7, 8, 8, 5, 9, 7, 6, 8, 7, 9, 10, 6, 7, 8, 9, 7. N = 20.
2
Frequency counts: 5: 1, 6: 3, 7: 6, 8: 5, 9: 4, 10: 1. The mode is 7 with frequency 6.
3
Relative frequency of 7: 6/20 = 30%. Cumulative frequency at 7: 1 + 3 + 6 = 10, so exactly 50% of students scored 7 or below, meaning 7 is also the median.
Result: Score 7 is both the mode (30%) and the median; cumulative frequency shows 50% scored at most 7
Try this example →

โ“ Frequently Asked Questions

What is a frequency distribution in statistics?+
A frequency distribution is a table that summarizes how often each value or range of values occurs in a dataset. It displays frequency (raw count), relative frequency (proportion), cumulative frequency (running total), and cumulative relative frequency (running proportion). It is the starting point for understanding the shape, center, and spread of any dataset.
How do you calculate relative frequency in a frequency distribution?+
Relative frequency = class frequency / total count (N). If 12 out of 50 observations fall in a class, the relative frequency is 12/50 = 0.24 or 24%. All relative frequencies in the table must sum to exactly 1.00 (100%). This calculator computes and displays relative frequencies automatically as percentages.
What is cumulative frequency and how do you find it?+
Cumulative frequency for a class is the sum of all frequencies from the first class up to and including the current class. For classes with frequencies 4, 7, 9, 5, the cumulative frequencies are 4, 11, 20, 25. The last cumulative frequency always equals N. Cumulative frequencies are used to find medians, quartiles, and percentile ranks from a table.
What is the difference between ungrouped and grouped frequency distribution?+
Ungrouped frequency distribution lists every unique value and its exact count. It suits discrete data with few distinct values (quiz scores 0-10, number of children). Grouped frequency distribution organizes data into class intervals (20-30, 30-40) and is better for continuous data (heights, incomes) or large datasets where most values appear only once.
How many classes should I use for a grouped frequency distribution?+
Sturges' Formula gives a starting point: k = 1 + 3.322 x log10(N). For N = 30 use about 6 classes; for N = 100 use about 7 to 8; for N = 1000 use about 11. Between 5 and 15 classes works for most practical datasets. Too few classes hides detail; too many creates mostly empty intervals. Adjust until the distribution shape is clear.
How is class width calculated for grouped frequency distribution?+
Class width = (maximum value - minimum value) / number of classes. For data ranging from 40 to 100 with 6 classes: width = (100 - 40) / 6 = 10. This calculator divides the range evenly among the chosen number of classes and places the maximum value in the last class to ensure all data is captured.
What is the midpoint of a class interval and why does it matter?+
The midpoint (class mark) is the average of the lower and upper class boundaries: midpoint = (lower + upper) / 2. For the class 60-70, the midpoint is 65. Midpoints are used to estimate the mean and variance from grouped data because you treat all observations in a class as if they equal the midpoint. This estimate is less precise than using raw data but is necessary when only the grouped table is available.
Can I find the mean from a frequency distribution table?+
Yes. For ungrouped data: mean = sum of (value x frequency) / N. For grouped data: mean = sum of (midpoint x frequency) / N. For example, if values 2, 3, 4 have frequencies 3, 5, 2, then mean = (2x3 + 3x5 + 4x2) / 10 = (6 + 15 + 8) / 10 = 2.9. This estimate uses midpoints for grouped data and is a weighted average.
What is the relationship between frequency distribution and probability?+
Relative frequency is an empirical estimate of probability. If value 5 appears 8 times in 40 observations, the relative frequency is 0.20, which estimates the probability of observing a 5. By the law of large numbers, as N increases, relative frequencies converge to true probabilities. A relative frequency distribution approximates the theoretical probability distribution of the population.
How do you find the mode from a frequency distribution?+
The mode is the value or class with the highest frequency. In an ungrouped table, look for the largest number in the frequency column. In a grouped table, the modal class is the class with the highest frequency. To estimate the exact mode within a modal class you can use the formula: mode = L + [(f1 - f0) / (2f1 - f0 - f2)] x w, where L is the lower boundary, f1 is the modal class frequency, f0 and f2 are adjacent class frequencies, and w is class width.
How do you find the median from a frequency distribution table?+
For ungrouped data, the median is the value where the cumulative frequency first reaches or exceeds N/2. For N = 20, find the class where cumulative frequency reaches 10. For grouped data, use linear interpolation: median = L + [(N/2 - CF) / f] x w, where L is the lower boundary of the median class, CF is the cumulative frequency before the median class, f is the median class frequency, and w is class width.
What is the difference between a frequency table and a frequency distribution?+
The terms are often used interchangeably. Strictly speaking, a frequency table is the raw count display, while a frequency distribution includes relative and cumulative columns that fully describe how the data is distributed. This calculator generates a complete frequency distribution: counts, proportions, running totals, and running proportions for each class or value.