Skip to content
Statistics

Grouped Data Standard Deviation Calculator

Enter your class intervals (lower and upper boundaries) and the frequency for each class. The calculator finds the midpoint of every class, then computes the weighted mean, variance, and standard deviation. Switch between sample (n-1) and population (n) mode at any time, and inspect the full step-by-step breakdown table below your results.

Your details

How many class intervals your frequency table has (2 to 8).
Use "sample" when your frequency table represents a subset of a larger population (divides by n-1). Use "population" when it covers every member of the group (divides by n).
Standard Deviation
12.0655

Square root of the variance (same units as your data)

Mean68.25
Variance145.5769
Total observations (n)40
Mean68.25
Std Dev12.0655
Variance145.5769

Standard deviation: 12.0655

  • The sample mean is 68.25 and the standard deviation is 12.0655.
  • The coefficient of variation is 17.7%: moderate spread.
  • About 68% of observations fall roughly within one standard deviation of the mean (56.18 to 80.32), assuming an approximately normal distribution.
  • Total observations: 40. The n-1 (Bessel) correction was applied to estimate the population variance from this sample.

Next stepGrouped data calculations use class midpoints as approximations. For more precise results, use individual (ungrouped) data values when available.

Grouped Frequency Calculation Table

Class IntervalMidpoint (m)Frequency (f)f x mf x m^2
40 - 5045.003135.00006075.0000
50 - 6055.007385.000021175.0000
60 - 7065.0012780.000050700.0000
70 - 8075.0010750.000056250.0000
80 - 9085.008680.000057800.0000
Total402730.0000192000.0000
SummaryMean = 68.2500Variance = 145.5769SD = 12.0655

Midpoints approximate the true values in each class. All subsequent statistics derive from these approximations.

What is grouped data and why does it need a different formula?

When you record individual measurements, calculating standard deviation is straightforward. In many real situations, however, data arrives already summarised into class intervals (also called bins or classes): for instance, exam scores from 40 to 50, 50 to 60, 60 to 70, and so on, each with a count of how many observations fell there. You no longer know the exact values inside each class, so you cannot apply the ordinary formula directly. The standard approach is to treat every observation in a class as if it were at the midpoint of that interval. This introduces a small approximation but makes the calculation tractable and is the universally accepted method for frequency tables.

The grouped data standard deviation formula

For each class, compute the midpoint m = (lower + upper) / 2. Then the weighted mean is: mean = sum(f x m) / n where f is the frequency of that class and n is the total of all frequencies. The variance uses the computational shortcut: Variance = [sum(f x m^2) - n x mean^2] / denom where denom is n for a population and n-1 for a sample (the Bessel correction). Standard deviation is simply the square root of variance. This shortcut is numerically equivalent to summing the squared deviations weighted by frequency, but requires fewer arithmetic steps.

Sample vs. population mode

If your frequency table covers every member of the group you are describing (for example, all employees in a department, or all students in a class), use population mode (divide by n). If the table is based on a sample drawn from a larger group and you want to estimate how spread out the full population is, use sample mode (divide by n-1). The n-1 correction, known as Bessels correction, compensates for the fact that a sample tends to underestimate the true population variance. For large n the difference is negligible, but for small samples it can matter considerably.

How to read and use your results

The standard deviation is in the same units as your original data. A larger value means observations are more spread out around the mean; a smaller value means they cluster tightly. You can divide the standard deviation by the mean (multiplied by 100) to get the coefficient of variation, a unitless measure useful for comparing spread across datasets with different scales. Under a roughly normal distribution, about 68% of observations fall within one standard deviation of the mean, and about 95% fall within two standard deviations. These empirical rules are only approximate for grouped data because the true distribution shape within each class is unknown.

Population vs. Sample Standard Deviation

ModeFormula denominatorWhen to use
Population (sigma) nYou have data on every member of the group being studied
Sample (s) n - 1Your data is a subset; you want to estimate the population parameter

Choosing the correct denominator depends on whether your frequency table covers the entire population or just a sample of it.

Frequently asked questions

What is the difference between population and sample standard deviation for grouped data?

Population standard deviation divides the variance by n (the total number of observations). Sample standard deviation divides by n-1, applying Bessels correction to give an unbiased estimate of the population variance. Use the population formula when your frequency table covers every member of the group; use the sample formula when it covers only a subset and you want to generalise to a larger population.

Why do grouped data calculations use midpoints?

A frequency table records how many observations fall within each class interval, but not the exact values. The midpoint is the best single-number approximation for all values in a class when no further information is available. Using midpoints introduces a small rounding error compared to using the actual data, but the method is standard in statistics and is accurate enough for most practical purposes.

How accurate is grouped data standard deviation compared to the exact value?

The accuracy depends on the width of the class intervals and how evenly values are distributed within each class. Narrow intervals and evenly distributed data produce results very close to the true (ungrouped) standard deviation. Wide intervals or strongly skewed distributions within classes can lead to noticeable differences. Whenever raw data are available, use the ungrouped formula for an exact result.

How many class intervals should a frequency table have?

Most statistics textbooks recommend 5 to 15 classes for a well-constructed frequency table. Too few classes (fewer than 5) hide the shape of the distribution; too many (more than 20) make the table unwieldy and can give empty classes. A common rule of thumb is to use roughly the square root of the number of observations as the number of classes.

Can I use this calculator for discrete grouped data (e.g., number of accidents per day)?

Yes. When the data are discrete, treat each unique value or range as a class. If each class is a single integer, the midpoint equals that integer, so the midpoint approximation is exact. The formula and calculation procedure are otherwise identical to continuous grouped data.

Sources

Written by Dr. Hannah Brandt, PhD Statistician · Munich, Germany

Applied statistician translating rigorous probability theory into clear, accurate tools for researchers and practitioners.

Search 3,500+ calculators

Loading search…