Saved

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

All my tools

Grouped Data Standard Deviation Calculator

Use this grouped data standard deviation calculator to find the mean, variance and standard deviation of a frequency table, from class midpoints, as a sample or a population.

Restored your last values ·

Type one class per line: the lower limit, a hyphen, the upper limit, a space and the frequency. Choose the sample or the population standard deviation. You get the mean, the variance and the standard deviation worked from the class midpoints.

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

–

–

Enter the classes and their frequencies, then press Calculate.

A grouped data standard deviation calculator finds the mean, variance and standard deviation of data that is given as a frequency table of classes, such as 100–129 or 130–159, instead of single values. Type each class with its frequency, choose sample or population, and read the result.

How to use the grouped data standard deviation calculator

  1. Type one class per line: lower limit, hyphen, upper limit, space, frequency.
  2. Choose the sample or the population standard deviation.
  3. Press Calculate.

What grouped data is

Grouped data is data that has been sorted into ranges, called classes, with a count of how many values fall in each class, called its frequency [1]. A survey may report that 5 people eat between 100 and 129 kilocalories, and 4 between 130 and 159, without giving any individual figure. The original values are not available, so the mean and the spread must be estimated from the classes. That is the job of this calculator, which saves you from building the working table by hand.

The class midpoint

Each class is represented by its midpoint [1]. For a class with the endpoints a and b, the midpoint is M = (a + b) ÷ 2, the average of the two limits. The class 100–129 has the midpoint 114.5. The method then treats every value in the class as if it were at that midpoint. This is an assumption, and it is the reason why the result is an estimate: if the values in each class are spread out evenly, the errors tend to cancel, but the result is never quite the same as that of the raw data.

The mean

The sample size is the sum of all the frequencies, n = ΣF. The mean is the sum of each midpoint multiplied by its frequency, divided by n: μ = Σ(M·F) ÷ n [1]. In an example of five classes, the frequencies are 5, 4, 12, 6 and 3, so n = 30, and the sum of the midpoint products is 5,175, giving a mean of 172.5. The calculator shows this sum and n, so you can check every step.

The variance

The variance is estimated as σ² = [Σ(F·M²) − n·μ²] ÷ (n − 1). This is the corrected sample variance with the frequencies as weights [2], rearranged by algebra. You multiply each squared midpoint by its frequency, add them up, subtract n times the squared mean, and divide by n − 1. For the example, ΣF·M² is 930,367.5 and n·μ² is 892,687.5, so the numerator is 37,680, and the variance is 37,680 ÷ 29, about 1,299.31. The calculator prints the numbers so that you can follow the working.

The standard deviation

The standard deviation is the square root of the variance: σ = √σ² [2]. For the example, √1,299.31 is about 36.05. It is in the same unit as the data, which makes it easier to interpret than the variance. A larger value means that the data is more spread out around the mean, and a smaller value means that it is bunched together.

Sample or population

The Wikipedia page on the standard deviation defines the population value with a divisor of N and the corrected sample value with a divisor of N − 1 [2]. We give both: the sample option is the default, and the population option divides the same sum by n. For the example, the population value is √(37,680 ÷ 30) = √1,256, about 35.44.

Frequencies as weights

A frequency table is a weighted data set, in which each midpoint has a weight equal to its frequency. The Wikipedia page covers values that carry unequal weights and uses the sum of the weights in place of N [2]. Our own working here is simply that a class with a frequency of 12 counts as 12 equal values at its midpoint, which is why the formulas above sum the frequency times the midpoint, and why the total weight is n.

Typing the classes

Write one class on each line, for example 100-129 5. You can also write 100 to 129, 5 with the word to, or use an en dash. Negative limits are accepted, as in -10--5 2, but the second hyphen is then ambiguous to a reader, so a line such as -10 to -5 2 is clearer. The frequencies can be decimals if your table has weights. Lines that do not follow the pattern are reported, so you can correct them.

Limits of the method

The result depends on how the data was grouped. Wide classes lose more detail than narrow ones, and open-ended classes, such as 250 and over, have no midpoint, so they cannot be used. Wikipedia notes that an estimate from grouped data can differ from the value found from the raw data [1], and no correction for the grouping is applied here. The result is therefore an estimate. If you have the raw values, use the ordinary standard deviation calculator, which is exact. The grouped version is for tables that are all you have.

Using the calculator

Enter your table, one class per line, and press Calculate. Read the mean, the variance, the standard deviation and the table of midpoints. Try the same data with the sample and population options to see how small the difference is when n is large, and how much larger it is when n is small. With a handful of values, the choice of the divisor matters, with hundreds, it hardly does.

Common mistakes

  • Using the class limits instead of the midpoints. The midpoint is the average of the two limits.
  • Forgetting that the frequencies must be counts. Do not enter percentages unless you want weights.
  • Mixing up sample and population. Pick the option that matches your data.
  • Including an open-ended class. It has no midpoint.

What next

Use this often? Add Grouped Data to your Home screen.

Frequently asked questions

What is a grouped data standard deviation calculator?

A tool that estimates the mean, variance and standard deviation of data given as classes with frequencies.

How do you find the standard deviation of grouped data?

Find the class midpoints, the mean as the sum of midpoint times frequency over n, then the variance as (Σ F M² − n μ²) ÷ (n − 1), and take the square root.

Why use the midpoint of each class?

The individual values are not known, so each value in the class is treated as if it were at the midpoint.

Is the grouped standard deviation exact?

No. It is an estimate, because the true values within each class are not known.

Should I use n or n − 1?

Use n − 1 for a sample, which is the default, and n for a whole population.

What went wrong?

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

Thanks for your feedback.

More Math Tools