Descriptive statistics
Frequency Table Calculator
Turn a column of values into a frequency table — ungrouped, or grouped into classes.
Also called frequency table calculator, frequency distribution calculator, tally chart maker.
Have a spreadsheet? Drop a CSV here
Or . CSV, TSV or plain text. You pick which column is which after it loads — the names in your file do not have to match ours. The file is read in your browser and never uploaded.
How to read this result
Relative frequencies are the empirical probability distribution of your sample. They sum to 1 (up to rounding), and they are the best estimate of the underlying probabilities that the data alone can give.
Cumulative frequencies answer "how many at or below". They are what percentiles are computed from, and plotting them gives the empirical cumulative distribution function.
Group when there are too many distinct values to read. Continuous measurements produce a table with one row per observation, which is no summary at all. Grouping into classes trades detail for readability — and the class boundaries then matter, in the same way histogram bins do.
Grouped data loses the original values. Statistics computed from a grouped table use the class midpoints as proxies, so a mean from grouped data is an approximation. Compute summaries from the raw values when you still have them.
The formula
For grouped tables, the class width is the range divided by the number of classes, and the midpoint is the average of the class boundaries.
Worked example
Counting dice rolls
Thirty rolls of a die produce these results: 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 1, 2, 3, 4, 5, 6, 3, 4, 5.
- Count each distinct value.1 appears 2×, 2 appears 3×, 3 appears 5×, 4 appears 6×, 5 appears 7×, 6 appears 7×
- Relative frequency: divide each count by 30.0.067, 0.100, 0.167, 0.200, 0.233, 0.233
- Cumulative: add the counts as you go.2, 5, 10, 16, 23, 30
- Check the total.the relative frequencies sum to 1.000
A fair die would give 5 of each in 30 rolls. Whether this deviation is meaningful is a job for the chi-square goodness-of-fit test, which on these counts returns a comfortably non-significant result.
Checked against a direct count — verified against R's table.
The calculator above is loaded with these numbers by the Load the worked example button.
Assumptions, and when to use something else
None for the ungrouped table — it is a count. The grouped version needs a choice of class count, and that choice changes the picture: too few classes hide structure, too many turn the table into the raw data again. Sturges' rule is the default and is what most software uses.
Classes here are closed on the left and open on the right, except the last, which includes its upper bound — otherwise the maximum value would fall outside every class.
- You want the pictureHistogram makerThe same grouping, drawn, with several bin-count rules to compare.
- You want summary statisticsDescriptive statisticsMean, median, spread and shape from the raw values.
- You want to test the counts against an expectationChi-square goodness of fitTests whether observed counts match a distribution you specify.
- The data are small enough to keep the digitsStem-and-leaf plotA frequency table that keeps every original value visible.
Questions people ask
How many classes should a grouped frequency table have?
Sturges' rule — ⌈log₂n⌉ + 1 — is the usual default: about 6 classes for 30 values, 9 for 200. The square root rule and Freedman-Diaconis are alternatives, and the histogram maker shows what each suggests for your data.
What is relative frequency?
The count divided by the total — the proportion of observations in that category. Multiply by 100 for a percentage. Relative frequencies always sum to 1.
Can I compute the mean from a grouped frequency table?
Approximately: multiply each class midpoint by its frequency, sum, and divide by n. It is an approximation because the original values inside each class are gone — if you still have them, compute the mean from those instead.