Saved

Press the star next to a tool's name to save it.

All my tools

Frequency Distribution Calculator

Use this frequency distribution calculator to group data into classes with the class width, relative and cumulative frequencies, a histogram and frequency polygon points.

Restored your last values ·

Paste your data and choose a rule for the number of classes, or choose the number of classes or the class width yourself. You get a frequency table with relative and cumulative frequencies and midpoints, the class width, a histogram and the points of the frequency polygon.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Enter your data, choose how to set the classes, then press Calculate.

A frequency distribution calculator groups your data into classes and counts how many values fall into each. Paste your values and it gives the class width, the frequency, relative frequency and cumulative frequency of each class, a histogram and the points of the frequency polygon. It chooses the number of classes by a standard rule, or you can choose it.

How to use the frequency distribution calculator

  1. Paste your values.
  2. Choose a rule for the number of classes, or choose the number of classes or the class width.
  3. Press Calculate to see the table, the histogram and the polygon points.

Frequencies

The Wikipedia article on frequency defines the frequency of an event as the number of times it occurred in the study, the relative frequency as the ratio of that count to the sample size, and the cumulative frequency as the total of the frequencies of all events at or below a point in an ordered list.[1] It describes a frequency distribution as a summarised grouping of data into mutually exclusive classes with the number of occurrences in each, and says that the class width is generally the same for all classes.[1] The tally method it describes marks a vertical bar for each value in a class as you go through the data.[1]

The class width

The page gives the class width as the range divided by the number of classes, when all classes have the same width, where the range is the maximum minus the minimum.[1] The calculator therefore sets the width to the range divided by the number of classes. If you choose the width yourself, the number of classes is the range divided by the width, rounded up, which is the form on the histogram page.[2] For the values 1 to 10, the range is 9, and with 4 classes the width is 2.25.

How many classes

The article on histograms gives several rules, and says there is no best number of bins.[2] The square-root choice takes the square root of the number of values and rounds up. Sturges' formula is k = ⌈log2 n⌉ + 1, which the page says can perform poorly if n is below 30. The Rice rule is k = ⌈2 n to the power 1/3⌉, offered as a simple alternative to Sturges.[2] The frequency page adds the rule C = 1 + 3.3 log10 n, and notes that these formulas are not hard rules.[1] For 20 values the calculator gives 5 classes with the square-root rule and 6 with each of the others.

Our class limits

The pages do not say which end of a class is included. We start the first class at the minimum, include the lower limit of each class and exclude its upper limit, except that the last class includes the maximum. The table prints the limits that way, for example 1 to under 3.25. The midpoint of each class is the average of its lower and upper limits; the page mentions the midpoint of the first class only, so the other midpoints are our own working.[1]

Worked example

For the values 1 to 10 with the square-root rule there are 4 classes of width 2.25. The classes are 1 to under 3.25 with 3 values, 3.25 to under 5.5 with 2, 5.5 to under 7.75 with 2, and 7.75 to 10 with 3. The relative frequencies are 30, 20, 20 and 30 percent, and the cumulative frequencies are 3, 5, 7 and 10. The midpoints are 2.125, 4.375, 6.625 and 8.875.

The histogram

The page says that a histogram's bins are consecutive, non-overlapping intervals, usually of equal size, and that empty intervals are shown as empty, not skipped.[2] With equal widths the height of each bar is proportional to the frequency. The calculator draws a simple bar for each class. The page adds that the total area of a histogram equals the number of data, which is why the frequency density, the frequency divided by the width, is used when the widths differ.[2]

The frequency polygon

A frequency polygon joins the points at the midpoint of each class and its frequency. The pages we read do not describe this construction, so this is standard practice that we report as our own working. The calculator lists the points, which you can enter in a spreadsheet to draw the polygon. The first and last points are often joined to the axis one class width beyond the ends.

Reading the table

The table lists each class with its count, its share of the data and the running total. The cumulative column tells you how many values lie below the upper limit of each class, so you can read off the share of values under a given point. The histogram column draws a bar of up to twenty blocks for the largest class, and the others are scaled to it. If one class is much larger than the others, the data may be skewed, and you may want to try a different number of classes to see how stable the shape is.

Common mistakes

  • Too many or too few classes. Try two or three choices before you settle.
  • Unequal widths without density. Use frequency density if the widths differ.
  • Forgetting the edge rule. A value on a boundary belongs to the upper class.

What next

Use this often? Add Frequency Di to your Home screen.

Frequently asked questions

What is a frequency distribution calculator?

A tool that groups data into classes and counts the values in each, with relative and cumulative frequencies, a histogram and the polygon points.

How do I calculate the class width?

Divide the range, the maximum minus the minimum, by the number of classes. If you choose the width, the number of classes is the range divided by the width, rounded up.

How many classes should I use?

There is no best number. Sturges' rule is ⌈log2 n⌉ + 1, the square-root choice is √n and the Rice rule is ⌈2n^(1/3)⌉.

What is relative frequency?

The frequency of a class divided by the sample size. Multiply by 100 for a percent.

What is cumulative frequency?

The total of the frequencies of all classes up to and including the current one.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Math Tools