InfyCalculator
📊

Frequency Distribution Table Calculator

Turn a list of raw data into a grouped frequency distribution table: number of classes by Sturges’ rule, class width, class intervals and midpoints, absolute, relative and cumulative frequencies and percentages.

Data values
Number of classes
Loading calculator…

How it works

Range R = max − min · number of classes k = 1 + 3.322 × log₁₀(n) rounded up (Sturges) · class width w = R ÷ k rounded up to the data’s precision · classes [min, min + w), [min + w, min + 2w) … last class closed · midpoint = (lower + upper) ÷ 2 · relative frequency = f ÷ n · cumulative frequency = running total of f

A grouped frequency distribution summarizes many values by counting how many fall in each of a few equal-width intervals — the first step in drawing a histogram or ogive and in computing grouped statistics. The calculator chooses the number of classes with Sturges’ rule (or uses yours), rounds the class width up to the precision of the data so that every value fits, and builds the full table: class intervals (left-closed, right-open), midpoints (class marks), absolute, relative and cumulative frequencies and percentages.

Worked example

For the 30 exam scores in the default list (54 to 95), the range is 41. Sturges gives 1 + 3.322 × log₁₀(30) = 5.91 → 6 classes, and the width is 41 ÷ 6 = 6.83 → 7. The classes are [54, 61), [61, 68), [68, 75), [75, 82), [82, 89) and [89, 96], with frequencies 3, 5, 7, 7, 5 and 3 that add up to 30.

Sources: H. A. Sturges, The choice of a class interval, JASA 21 (1926) · Frequency distribution — Wikipedia

Frequently asked questions

How many classes should a frequency table have?

Usually 5 to 15. Sturges’ rule k = 1 + 3.322 log₁₀ n is the classic textbook choice (6 classes for 30 values, 8 for 100). Other rules — square root of n, Rice (2∛n) — give more classes for large data sets. You can type your own k.

How do I calculate the class width?

Divide the range (max − min) by the number of classes and round up — never down, or the largest value will not fit. With whole-number data round up to a whole number; with one decimal round to one decimal.

What is the difference between relative and cumulative frequency?

Relative frequency is the share of the data in a class (f ÷ n, adding up to 1 or 100%). Cumulative frequency is the running total up to and including that class; the last cumulative frequency equals n. Cumulative relative frequency ends at 1.

Which class does a value on a boundary belong to?

Classes are left-closed and right-open, [a, b): a value equal to b goes into the next class. The last class is closed on both sides so the maximum is included.

What is a class mark?

The midpoint of a class, (lower + upper) ÷ 2. It represents every value in the class when you estimate the mean or variance from grouped data.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.