Frequency Table Calculator

StatisticsLast updated: August 22, 2026

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.

You can separate the numbers with commas, spaces, or line breaks. At least 4 observations are required.
Class intervals suit continuous measurements; a value-based table suits data that takes only a few distinct values.
Used only in the class interval table. If you leave it empty, k = 1 + 3.322·log₁₀(n) is applied.

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

  1. Paste the raw data into the box; commas, spaces, and line breaks are all accepted.
  2. Choose the table type: class intervals for continuous measurements, value based for data with only a few distinct values.
  3. Enter the number of classes if you want to; leave it empty and Sturges' rule is applied.
  4. Read from the frequency and relative frequency columns which interval dominates.
  5. Use the cumulative percentage column to answer "up to which class does 50% of the data accumulate?".
  6. 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

Frequently Asked Questions

How should I choose the number of classes?
By default, Sturges' rule (k = 1 + 3.322·log₁₀n) is applied, and it is a reasonable starting point for most data sets. For samples larger than 100, the √n rule or Rice's rule (2·n^(1/3)) gives more detailed tables. Changing the number of classes and checking whether the shape of the distribution survives is a good habit.
What is the difference between relative and cumulative frequency?
The relative frequency is a single class's share of the total (fᵢ/n) and answers "what percentage of the data lies in this interval?". The cumulative frequency is the total number of observations accumulated up to that class and answers "how many observations lie below this bound?". The median and the percentiles are read from the cumulative column.
How are class bounds set, and can an observation fall into two classes?
No. Classes are defined as half-open intervals, [lower, upper): a value equal to the lower bound belongs to that class, while a value equal to the upper bound moves to the next one. Only the topmost class also covers its upper bound, so the largest observation is never lost and the frequencies always add up to n.
How do I build a frequency table in Excel?
You can write the upper class bounds in a column and use the FREQUENCY array formula, or run the Histogram tool in the Data Analysis add-in. In SPSS, Analyze > Descriptive Statistics > Frequencies gives the value-based table directly; for a class-based table, bin the data first with Transform > Visual Binning. This calculator produces both approaches on one screen.
When is a value-based table the better choice?
For discrete variables that take only a few distinct values — Likert scales, number of children, defect counts — showing each value on its own row is more informative. In continuous measurements (height, income, duration) almost every observation is different, so a value-based table degenerates into an unusable list of n rows; there, class intervals should be used.
Are the modal class and the mode the same thing?
Not quite. The mode is the most frequently repeated value in the raw data; the modal class is the class interval with the highest frequency. A class-based table does not reveal a single mode value, only the interval the mode falls into; if needed, Czuber's formula produces an estimate of the mode inside that class.
Is an empty class in the table a problem?
An empty class shows that the data contains no observation in that interval. A stray empty class can point to a bimodal structure and is informative. Many empty classes, however, usually mean that too many classes were chosen for the size of the data; reducing the number of classes makes the table readable again.