Frequency Table Calculator
A frequency table is the first tool that turns a scattered pile of numbers into a readable summary. It shows side by side how many observations fall in each class (frequency), what share of the whole data that is (relative frequency), and how many observations have accumulated up to a given bound (cumulative frequency). It is the standard output of homework in statistics courses and of the descriptive section in field research.
This calculator either splits the raw data into equal-width classes or counts every distinct value as its own row. You can set the number of classes yourself; leave it empty and Sturges' rule is applied. The result is a complete six-column frequency table together with a histogram of the class frequencies and a pie chart of their shares, with the modal class marked separately.
Frequency Table Formulas
Range: R = x(max) − x(min) Number of classes: k = 1 + 3.322·log₁₀(n) (Sturges) Class width: h = R / k Class midpoint: mᵢ = (lower boundᵢ + upper boundᵢ) / 2 Relative frequency: gᵢ = fᵢ / n (percent: gᵢ × 100) Cumulative frequency: Fᵢ = f₁ + f₂ + … + fᵢ = Σ fⱼ (j ≤ i) Cumulative percent: Gᵢ = Fᵢ / n × 100 Check: Σ fᵢ = n and Σ gᵢ = 1
Class bounds are treated as half-open, [lower, upper); only the last class also covers its upper bound. This gives the same counts as Excel's FREQUENCY function and the SPSS Frequencies output.
How to Calculate
- Paste the raw data into the box; commas, spaces, and line breaks are all accepted.
- Choose the table type: class intervals for continuous measurements, value based for data with only a few distinct values.
- Enter the number of classes if you want to; leave it empty and Sturges' rule is applied.
- Read from the frequency and relative frequency columns which interval dominates.
- Use the cumulative percentage column to answer "up to which class does 50% of the data accumulate?".
- Compare the histogram with the pie chart: one shows the shape of the distribution, the other the share of each class.
Worked Examples
Class-based frequency table of exam scores
For 30 observations, Sturges' rule gives k = 1 + 3.322·log₁₀(30) ≈ 5.91 → 6 classes. Since the range is 100 − 40 = 60, the class width is h = 60 / 6 = 10. The densest class is 70–80 with 9 observations, that is 30% of the data. The cumulative percentage reaches 76.67% at the end of the 70–80 class; the mean is 70.97 and the median 71.50.
Number of observations (n): 30 · Number of classes (k): 6 · Class width (h): 10.00
Five classes set by hand
With the number of classes set manually to 5, the range 40 − 10 = 30 gives a class width of h = 30 / 5 = 6, and the classes are 10–16, 16–22, 22–28, 28–34, and 34–40. The modal class is 22–28 (6 observations, 30%), and at the end of that class the cumulative frequency is 14 and the cumulative percentage 70%. The mean is 23.90 and the median 23.50.
Number of observations (n): 20 · Number of classes (k): 5 · Class width (h): 6.00
Value-based table of survey answers
When 20 answers on a 5-point Likert scale are counted value by value, the table has 5 rows. The most frequent answer is 4: 7 people, that is 35.00%. The cumulative column shows that 40.00% of the respondents answered 3 or below and 75.00% answered 4 or below. With a mean of 3.60 and a median of 4.00, the distribution is left-skewed.
Number of observations (n): 20 · Number of distinct values: 5 · Range (R): 4.00