Standard Deviation Calculator for Grouped Data

This standard deviation calculator for grouped data works from a frequency table. Enter class intervals and counts to get the mean, variance and standard deviation, with the complete working table.

Each line is “lower limit, upper limit, frequency”.

Checks on your data

  • Grouped data are summarised with class midpoints, so the mean and SD are estimates. If you still have the raw values, calculate from them for exact results. Use raw data →

Results

Sample standard deviation (s)
11.2457
Mean of grouped data
25.8889
Sample variance
126.465
Total frequency (N)
45
Σ f(x − x̄)²
5564.44
Estimated median
25.938
by interpolation within the median class
Coefficient of variation
43.44 %
Frequency histogram of the grouped data
0510150 – 10: 4410 – 20: 9920 – 30: 161630 – 40: 111140 – 50: 5501020304050
Calculation table
ClassMidpoint xFrequency ff·x(x − x̄)²f(x − x̄)²
0 – 105420436.351745.4
10 – 20159135118.571067.1
20 – 3025164000.7901212.642
30 – 40351138583.012913.14
40 – 50455225365.231826.2
Total4511655564.44
Show step-by-step solution
  1. Find the midpoint x of every class: (lower + upper) ÷ 2.
  2. Mean x̄ = Σ f·x ÷ N = 1165 ÷ 45 = 25.8889.
  3. Σ f(x − x̄)² = 5564.44.
  4. Variance = 5564.44 ÷ (45 − 1) = 126.465.
  5. Standard deviation = √126.465 = 11.2457.
UsesClass midpoints
MeanΣfx / N
VarianceΣf(x − x̄)² / (N − 1)
ResultAn estimate, not exact

What Is Standard Deviation for Grouped Data?

When data are grouped into class intervals, you no longer have the individual values. The calculation uses the class midpoint as the representative value for each class, so the mean and standard deviation are estimates rather than exact figures.

The calculator finds each midpoint, the mean of the grouped data, the sum f(x − x̄)², the sample variance and standard deviation, the coefficient of variation and an estimated median. The working table shows each class so you can follow or check a textbook solution.

Below you will find the formulas, a variables table, a worked example and answers to common questions such as why grouped results are approximate and whether to divide by N or N − 1.

How to Use the Standard Deviation for Grouped Data Calculator

  1. Type one class per line as “lower, upper, frequency”.
  2. Choose sample or population.
  3. Check the working table; it matches the layout most textbooks use.
  4. Remember the answer is an approximation because the exact values inside each class are unknown.

Standard Deviation for Grouped Data Formula

Class midpoint

xi=Li+Ui2x_i=\frac{L_i+U_i}{2}

Mean

xˉ=∑fixiN,N=∑fi\bar{x}=\frac{\sum f_i x_i}{N},\quad N=\sum f_i

Sample variance and SD

s2=∑fi(xi−xˉ)2N−1,s=s2s^2=\frac{\sum f_i (x_i-\bar{x})^2}{N-1},\quad s=\sqrt{s^2}

Median of grouped data

Median=L+(N/2−Ff)w\text{Median}=L+\left(\frac{N/2-F}{f}\right)w

Standard Deviation for Grouped Data Variables Explained

SymbolMeaningNotes
xClass midpoint(lower + upper) ÷ 2
fClass frequency
NTotal frequencyΣf
x̄Mean of grouped dataΣfx ÷ N
sStandard deviation√(Σf(x − x̄)² ÷ (N − 1))

Standard Deviation for Grouped Data Worked Example

Using the example values (press “Load example” above to try them):

  1. Find the midpoint x of every class: (lower + upper) ÷ 2.
  2. Mean x̄ = Σ f·x ÷ N = 1165 ÷ 45 = 25.8889.
  3. Σ f(x − x̄)² = 5564.44.
  4. Variance = 5564.44 ÷ (45 − 1) = 126.465.
  5. Standard deviation = √126.465 = 11.2457.

Result: Sample standard deviation (s) = 11.2457; Mean of grouped data = 25.8889.

How accurate is a grouped estimate?

Grouping throws away information, so the result is an estimate. The estimate is best when classes are narrow, the data within each class are roughly evenly spread, and there are many observations. Wide classes inflate the variance slightly because every value is placed at the midpoint; a correction called Sheppard’s correction subtracts w²/12 from the variance for equal-width classes, but most courses do not require it.

Open-ended and unequal classes

Classes such as “50 and over” have no midpoint and cannot be used directly; you must assume an upper limit. Unequal class widths are fine for this calculation, but a histogram of unequal widths should plot frequency density, not raw frequency. This tool draws the bar chart by class midpoint when the classes are not contiguous.

Discrete frequency tables

If your table lists exact values (for example, 1 child: 8 families), enter each value as a class from value to value plus a small width, or use the mean and standard deviation calculator after expanding the list. For a discrete table the midpoint method is not required.

Where Standard Deviation for Grouped Data Is Used

Frequency table exercises

Finding mean and SD from class intervals and counts.

Published grouped data

Estimating spread when only a frequency table is available.

Checking working

Comparing each row of a hand calculation with the table.

Estimating the median

Getting a median estimate from grouped data.

Common Standard Deviation for Grouped Data Mistakes to Avoid

  • Check that class limits do not overlap and no class is missing.
  • Total frequency should match your sample size.
  • Use the sample formula unless your table covers the whole population.

Standard Deviation for Grouped Data Terms and Definitions

Class midpoint
The centre of a class interval; used to represent all values in that class.
Frequency
The number of observations in a class.

Standard Deviation for Grouped Data FAQs

How do you find the standard deviation of grouped data?

Compute class midpoints, find the mean Σfx ÷ N, then take Σf(x − mean)², divide by N − 1 (sample) or N (population) and take the square root.

Why are the results only estimates?

The individual values inside each class are unknown, so each class is represented by its midpoint.

Should I divide by N or N − 1?

Divide by N − 1 for a sample and N for a full population. Many school textbooks use N for grouped data, so check your course.

Can I use unequal class widths?

Yes. The calculation uses midpoints and frequencies, so widths can differ.

What if a class has frequency 0?

Include it with frequency 0 or omit it. It does not change the result.

How do I find the mean of grouped data?

Multiply each midpoint by its frequency, add the products and divide by the total frequency.

Related calculators

Last updated 2026-11-09. See our disclaimer.