What Is a Frequency Distribution Calculator?
A Frequency Distribution Calculator organizes raw data into a clear, summarized table that shows how often each value or range of values appears in a data set. Instead of scanning a long list of numbers, you get an at-a-glance picture of where your data clusters, where the gaps are, and how spread out the values are. This calculator also computes key summary statistics — the mean, median, and standard deviation — and lets you customize bin sizes so you can group continuous data into meaningful intervals.
How to Use the Calculator
- Enter your data values, separated by commas or spaces (for example: 12, 15, 15, 18, 22, 22, 22, 30).
- Choose how you want the data grouped — either by individual values or by class intervals (bins).
- Set a bin size or number of bins if you are grouping ranges of data.
- Click calculate to generate the frequency table, relative and cumulative frequencies, and the summary statistics.
The Formulas Explained
A frequency table lists each value or class alongside how many times it occurs. Two related measures add context:
- Relative frequency = frequency ÷ total count. It expresses each frequency as a proportion or percentage.
- Cumulative frequency = running total of frequencies up to and including a class.
The summary statistics use standard formulas: the mean is the sum of all values divided by the count; the median is the middle value when data is sorted; and the standard deviation measures how far values typically fall from the mean, calculated as the square root of the average squared deviation.
$$\begin{gathered} k = \left\lceil \frac{\max - \min}{h} \right\rceil, \qquad f_i = \#\{\, x : L_i \le x < L_i + h \,\} \\[1.5em] \text{where}\quad \left\{ \begin{aligned} x &= \text{Data values} \\ h &= \text{Bin Size} \;\text{or}\; \left\lceil \sqrt{n} \right\rceil \\ L_i &= \min + i\,h \end{aligned} \right. \end{gathered}$$
Worked Example
Suppose you collect test scores: 70, 75, 75, 80, 80, 80, 85, 90. The value 80 appears three times, so its frequency is 3 and its relative frequency is \(3 \div 8 = 0.375\) (37.5%). The mean is $$(70+75+75+80+80+80+85+90) \div 8 = 79.4.$$ With 8 values, the median is the average of the 4th and 5th sorted values: $$(80+80) \div 2 = 80.$$ The standard deviation comes out to about 6.0, showing scores stay fairly close to the mean.
How to Build a Frequency Table by Hand
- Find the minimum and maximum of the data set.
- Compute the range: \(\text{range} = \max - \min\).
- Choose the number of bins \(k\). Two common rules are Sturges' rule, \(k = 1 + \log_2(n)\), and the square root rule, \(k = \lceil \sqrt{n} \rceil\). Round \(k\) up to a whole number. Both are only starting points.
- Set the bin width: \(h = \lceil \text{range} / k \rceil\). Rounding up (often to a convenient whole number) ensures the bins cover the whole range.
- Define non-overlapping class limits starting at the minimum: \(L_i = \min + i\,h\). Each bin is \([L_i, L_i + h)\), so the lower limit is inclusive and the upper limit is exclusive. A value equal to a bin's upper limit goes into the next bin.
- Tally each value into exactly one bin to get the frequency \(f_i\).
- Compute relative frequency \(f_i / n\) and cumulative frequency (running total of \(f_i\)).
- Check: the frequencies must sum to \(n\), the relative frequencies to 1 (allowing for rounding), and the last cumulative frequency must equal \(n\).
Short grouped example
Data (n = 12): 4, 7, 8, 9, 11, 12, 12, 14, 15, 18, 19, 22.
Min = 4, max = 22, so the range is \(22 - 4 = 18\). Sturges' rule gives \(k = 1 + \log_2(12) \approx 4.58\), which rounds up to 5 bins. The width is \(18 / 5 = 3.6\), rounded up to \(h = 4\).
| Bin | Values | Frequency | Relative | Cumulative |
|---|---|---|---|---|
| [4, 8) | 4, 7 | 2 | 0.167 | 2 |
| [8, 12) | 8, 9, 11 | 3 | 0.250 | 5 |
| [12, 16) | 12, 12, 14, 15 | 4 | 0.333 | 9 |
| [16, 20) | 18, 19 | 2 | 0.167 | 11 |
| [20, 24) | 22 | 1 | 0.083 | 12 |
Check: \(2 + 3 + 4 + 2 + 1 = 12 = n\), and the last cumulative frequency is 12.
Key Terms in Frequency Distributions
- Frequency (\(f\)): the number of observations that fall in a category or bin.
- Relative frequency: \(f / n\), the proportion of all observations in the bin. Multiply by 100 for a percentage.
- Cumulative frequency: the running total of frequencies up to and including a given bin.
- Class interval (bin): a range of values that groups data, such as [8, 12).
- Class width (\(h\)): the distance from one bin's lower limit to the next bin's lower limit.
- Class limits vs. boundaries: limits are the stated endpoints of a bin (for whole-number data, 10–19). Boundaries are the points halfway between adjacent bins (9.5 and 19.5), so there are no gaps. With the half-open convention [L, L + h), the lower limit is inclusive and the upper is exclusive.
- Class midpoint: \((\text{lower} + \text{upper}) / 2\). It is used to represent every value in the bin when estimating statistics from grouped data.
- Mode: the most frequent value. In grouped data, the modal class is the bin with the highest frequency.
- Range: maximum minus minimum.
- Standard deviation: a measure of typical distance from the mean. The population version is \(\sigma = \sqrt{\frac{\sum (x_i - \mu)^2}{N}}\), used when the data are the entire population. The sample version is \(s = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n - 1}}\), used when the data are a sample drawn from a larger population. Dividing by \(n - 1\) corrects for the tendency of a sample to understate the spread.
Interpreting Your Frequency Distribution
Reading the shape
- Symmetric: the two sides of the histogram mirror each other around the center. The mean and median are close.
- Right-skewed (positive skew): a long tail extends toward larger values, and most observations sit on the low side.
- Left-skewed (negative skew): a long tail extends toward smaller values, and most observations sit on the high side.
- Bimodal: two distinct peaks, which often indicates two subgroups mixed in one data set.
- Uniform: the bins have roughly equal frequencies, with no clear peak.
Mean versus median
In a right-skewed distribution the mean is typically greater than the median. In a left-skewed one the mean is typically less than the median. When the two are about equal, the distribution is usually roughly symmetric. This is a common tendency, not a strict rule, and it can fail for multimodal or irregular data.
Effect of outliers
The mean and standard deviation are sensitive to extreme values, because each is computed from every observation and the SD squares the deviations. The median and mode are much less affected. One very large value can pull the mean noticeably toward it and widen the SD while leaving the median almost unchanged.
Standard deviation and spread
A larger SD means values are more spread out around the mean. For data that are roughly normal (bell-shaped), about 68% of values lie within 1 SD of the mean, about 95% within 2 SD, and about 99.7% within 3 SD. These percentages do not hold in general for skewed or heavy-tailed data.
Bin width changes the apparent shape
Very narrow bins produce a jagged histogram with many small peaks that may just be noise. Very wide bins smooth the data so much that real features, such as a second peak or a skew, can disappear. The same data set can look unimodal with one bin width and bimodal with another, so it is worth checking a few bin widths before drawing conclusions about shape. Rules such as Sturges' or the square root rule give a reasonable starting point, not a single correct answer.
Frequently Asked Questions
What is the best number of bins to use? A common rule of thumb is the square root of the number of data points, but you can adjust bins to reveal the pattern most clearly. Too few bins hide detail; too many create noise.
What is the difference between frequency and relative frequency? Frequency is the raw count of occurrences, while relative frequency is that count as a fraction or percentage of the total, making it easier to compare data sets of different sizes.
Can I use this for grouped continuous data? Yes. Set a bin width to group continuous values into intervals such as 0–9, 10–19, and so on, then read off the frequency for each range.