🏆 US-Registered Digital Marketing Agency
Advertisement
Advertisement
STATISTICS

Frequency Distribution Calculator — binned table and chart

Paste raw data and get a full frequency table with class limits, relative and cumulative frequency, drawn as a bar chart.

Separate values with commas, spaces, tabs, or new lines. Non-numeric entries are ignored.
Sturges' rule picks a sensible class count from the sample size. Override it whenever the shape looks wrong.
Used when the class setup is set to a fixed number of classes.
Used when the class setup is set to a fixed width. Round numbers read far better than exact ones.
Modal class
 
0
Observations
0
Number of classes
0
Class width
0
Range of the data
Tip: change the class count and watch the shape. A distribution that looks bimodal at one width and smooth at another is telling you the sample is too small to settle the question.
Advertisement

A frequency distribution groups raw values into classes and counts how many observations fall in each. It is the step between a list of numbers and a picture of their shape, and it is where a dataset first becomes readable. This calculator builds the whole table — class limits, midpoints, absolute frequency, relative frequency and both cumulative columns — and draws the corresponding bar chart from your numbers with no external libraries involved.

Arb Digital built this page because the binning decision is usually made badly and then never revisited. Our relative frequency calculator answers the narrow question of what proportion one count represents, and that is the right page when you already have the counts. This one starts from raw ungrouped data, chooses classes, and shows you what the choice did to the shape — which is the part that changes conclusions.

What This Frequency Distribution Calculator Does

It sorts your data, chooses class boundaries — automatically by Sturges' rule, or manually by class count or class width — and assigns every observation to exactly one class. For each class it reports the lower and upper limits, the midpoint, how many values landed there, that count as a percentage of the total, and the running cumulative count and percentage. The bars beside the table are drawn to scale from the frequencies, so the histogram shape is visible without exporting anything.

Classes are half-open: a value equal to a boundary belongs to the class above, except at the very top where the final class includes its upper limit. That convention means no value is counted twice and none is dropped, which is the failure that makes hand-built frequency tables disagree with software.

How to Use It

  1. Paste your raw values. Any separator works, including a column copied straight out of a spreadsheet.
  2. Start with automatic classes. Sturges' rule gives a reasonable first view for most sample sizes.
  3. Then override it. Set a fixed class count or a round class width and compare — this is the single most useful thing you can do on this page.
  4. Read the modal class. It is the class with the highest frequency and it is where the data concentrates.
  5. Use the cumulative column to answer "how many are below this level", which is exactly what a percentile question asks.

The Method and How It's Calculated

The range is the maximum minus the minimum. Sturges' rule sets the number of classes at k = ⌈1 + log₂n⌉, where n is the number of observations. The class width is then the range divided by k, rounded up to a readable step. Each class runs from its lower limit up to but not including the next, and the midpoint is the average of its two limits. Relative frequency is the class count divided by n; cumulative frequency is the running total from the lowest class upward.

Work through the default: thirty exam scores between 55 and 98. The range is 43. Sturges gives k = ⌈1 + log₂30⌉ = ⌈5.91⌉ = 6, so the raw width is 43 ÷ 6 = 7.17, rounded up to 8. Starting at the minimum, the classes are 55–63, 63–71, 71–79, 79–87, 87–95 and 95–103, with frequencies of 2, 4, 6, 8, 7 and 3. They sum to 30, as they must. The modal class is 79–87 with eight observations, or 26.7% of the data, and the cumulative column shows that 20 of the 30 scores fall below 87. The NIST/SEMATECH e-Handbook page on the histogram sets out the same construction and what to read from the resulting shape.

Advertisement

The Class Width Decides What You See

This is the most important thing on the page and the least appreciated. The same data binned into four classes and into fifteen produces two genuinely different pictures. Wide classes smooth everything into a single mound and can hide a second peak entirely. Narrow classes expose every accident of sampling, and with thirty observations spread over fifteen classes most bars sit at one or two — noise that looks like structure.

There is no correct answer, only a defensible one, which is why this calculator makes the choice explicit rather than burying it. The practical method is to look at three or four widths before believing any shape. A feature that survives across all of them — a genuine second peak, a hard cut-off, a long right tail — is a property of the data. A feature that appears at one width and vanishes at the next is a property of the binning. Reporting a distribution without stating the class width is reporting half the result.

Sturges, Square Root and Freedman-Diaconis

Sturges' rule is the default here because it is the one taught most widely and it behaves sensibly for the sample sizes people paste into a web calculator. It has a known weakness: it is derived from a binomial approximation to the normal distribution, so it under-bins large samples and handles heavily skewed data poorly. Above a few hundred observations it tends to over-smooth.

Two alternatives are worth knowing. The square-root rule sets the class count at √n, which is simple and gives more classes than Sturges on large samples — for n = 1,000 it suggests about 32 against Sturges' 11. The Freedman-Diaconis rule sets the width from the interquartile range instead of the count, at 2·IQR ÷ n^(1/3), which makes it far more robust when outliers stretch the range. You can apply either by switching this tool to a fixed count or a fixed width; compute the IQR first with our interquartile range calculator if you want the Freedman-Diaconis figure.

Reading the Cumulative Column

The cumulative frequency answers a different question from the class frequency, and it is often the more useful one. "How many students scored below 87?" is a cumulative question, and the answer is read straight off the table without any further arithmetic. Plotted against the upper class limits, the cumulative percentages form an ogive — a rising curve whose steepest section marks where the data is densest.

The ogive is also how grouped percentiles are estimated. To find the median from grouped data, locate the class where the cumulative percentage crosses 50% and interpolate linearly within it. That estimate will differ slightly from the median of the raw values, because grouping discards the exact positions inside each class, and that discrepancy is a real cost of binning rather than an error. When you have the raw data, compute the percentile directly with our percentile calculator instead of reading it off a grouped table.

What Grouping Costs You

Every frequency table throws information away. Once values are in classes, all that survives is which class each fell in, and any statistic computed from the grouped table is an approximation. The grouped mean uses class midpoints as though every observation sat exactly at the centre of its class, which is only true on average and is systematically off when the data within a class leans one way.

That cost was worth paying when calculations were done by hand and grouping was the only way to summarise a thousand numbers. It is rarely worth paying now, so the sensible rule is to compute statistics from the raw data and use the frequency table purely for seeing shape. Our descriptive statistics calculator works on the ungrouped values and will give an exact mean, median and standard deviation, and the box plot calculator shows the same distribution in the complementary summary form. Penn State's STAT 200 elementary statistics course notes cover both presentations and when each is appropriate.

Frequency Tables for Categories Rather Than Numbers

Not every frequency distribution needs classes. When the variable is categorical — device type, region, response option — each category is its own class and no binning decision arises. The relative and cumulative columns still apply, though cumulative frequency is only meaningful when the categories have a natural order, such as satisfaction ratings from lowest to highest.

This calculator works on numeric data, so categories need to be coded as numbers first: 1 for the first option, 2 for the second and so on. Set the class width to 1 and each code becomes its own class, giving a clean count per category. It is a small trick but it turns the tool into a tally sheet for survey responses, and the bar chart then shows the response distribution directly.

Want your data looked at properly before conclusions are drawn?

Arb Digital's analysts plot the distribution before quoting an average, because shape decides whether the average means anything.

Browse All Free Tools Talk To Our Team

Common Mistakes to Avoid

  • Overlapping class limits — writing 55–63 and 63–71 without saying which class 63 belongs to double-counts or drops values, so use half-open classes throughout.
  • Reporting a shape without the class width — the same data supports several shapes, and the width is part of the result.
  • Using unequal class widths and comparing bar heights — with unequal widths the area, not the height, represents frequency, and the chart becomes misleading.
  • Computing the mean from the grouped table — midpoints are an approximation, and the raw data gives the exact answer for no extra effort.
  • Reading structure out of a small sample — with thirty observations across ten classes, most bars are noise rather than signal.

Related Free Tools From Arb Digital

Turn one count into a proportion with the relative frequency calculator, get the exact summary statistics with the descriptive statistics calculator, find a specific percentile with the percentile calculator, measure the middle spread with the interquartile range calculator, or view the same data as a box-and-whisker diagram with the box plot calculator. The free online tools hub lists every statistics calculator we publish.

Frequently Asked Questions

What is a frequency distribution?

It is a table that groups data values into classes and records how many observations fall into each class, usually alongside the relative and cumulative counts.

How many classes should I use?

Sturges' rule — one plus the base-two logarithm of the sample size, rounded up — is a reasonable starting point. Try two or three alternatives, because the class count changes the apparent shape.

How is class width calculated?

Divide the range by the number of classes and round up to a convenient value. Round widths produce class limits that are far easier to read than exact ones.

Which class does a value on the boundary belong to?

The class above it. Classes are half-open, so a value equal to a lower limit is counted in that class and never in the one below, except at the very top where the final class includes its upper limit.

What is the modal class?

The class containing the most observations. It identifies where the data concentrates, and it is not the same thing as the mode of the raw values.

What is cumulative frequency used for?

It answers how many observations fall below a given level, which is what percentile and quartile questions ask, and plotting it produces an ogive.

Can I build a frequency table for categories?

Yes. Code each category as a number, set the class width to one, and every code becomes its own class with its own count.

Is a frequency distribution the same as a histogram?

They are the table and the picture of the same thing. The distribution is the counts per class; the histogram is those counts drawn as adjacent bars.

This page explains a statistical method for educational purposes only. It is not medical, legal, or financial advice, and no result from it should be used as the sole basis for a decision.

Advertisement
Advertisement

Take it further