Grouped Data Standard Deviation Calculator

Quick answer

The grouped data standard deviation calculator finds the mean, variance and standard deviation of data given as class intervals with frequencies, using class midpoints. It also estimates the median, names the modal class and shows the full working table and a chart.

For example "10-20, 9" or "10 20 9". Classes can have different widths.

Standard deviation
11.2061
Mean (x̄)
24.75
Variance
125.5769
Total frequency (N)
40
Sample standard deviation (÷ N − 1)
11.2061
Population standard deviation (÷ N)
11.0651
Sample variance
125.5769
Population variance
122.4375
Estimated median
24.6667
Modal class
20–30 (frequency 15)
Coefficient of variation
45.28 %
Σf(m − x̄)²
4,897.5
Working table
Class Midpoint m f Cum. f f·m f·(m − x̄)² ──────────────────────────────────────────────────── 0–10 5 4 4 20 1,560.25 10–20 15 9 13 135 855.5625 20–30 25 15 28 375 0.9375 30–40 35 8 36 280 840.5 40–50 45 4 40 180 1,640.25 Total 40 990 4,897.5
Frequency chart

Data are often published only as a frequency table: so many commutes took 0–10 minutes, so many 10–20 minutes, and so on. The original values are lost, but the mean and standard deviation can still be estimated by assuming that every value in a class sits at the class midpoint. This is the grouped-data method taught in statistics courses and used for census tables, survey summaries and histograms.

Each midpoint is weighted by its class frequency. The mean is Σf·m ÷ N, and the variance adds up the squared distances of the midpoints from the mean, again weighted by frequency, and divides by N − 1 for a sample or N for a population. The result is an approximation, since values are rarely spread exactly around the midpoints, but with reasonably narrow classes it is close to the value from the raw data.

Type one class per line as “lower–upper, frequency”. The calculator sorts the classes, builds the working table with midpoints, cumulative frequencies and squared deviations, and also estimates the median by interpolation inside the median class.

How to use the Grouped Data Standard Deviation Calculator

  1. Classes and frequencies (one per line: lower–upper, frequency): For example “10-20, 9” or “10 20 9”. Classes can have different widths.
  2. Data are a

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

How it works

For each class compute the midpoint m, then f·m and f·(m − x̄)². Sum the columns: the mean is Σf·m ÷ N and the variance is Σf·(m − x̄)² ÷ (N − 1) or ÷ N. The standard deviation is the square root of the variance.

Worked example

Commute times of 40 people:

Class (min) f Midpoint m f·m f·(m − 24.75)²
0–10 4 5 20 1,560.25
10–20 9 15 135 855.56
20–30 15 25 375 0.94
30–40 8 35 280 840.50
40–50 4 45 180 1,640.25
Total 40 990 4,897.5

Mean = 990 ÷ 40 = 24.75 minutes. Sample variance = 4,897.5 ÷ 39 = 125.58, so the sample standard deviation is 11.21 minutes (population: 4,897.5 ÷ 40 = 122.44, σ = 11.07). The estimated median is 20 + (20 − 13)/15 × 10 = 24.67 minutes and the modal class is 20–30.

Shortcut formula

An equivalent form avoids computing every deviation: s² = (Σf·m² − (Σf·m)² ÷ N) ÷ (N − 1). For the example Σf·m² = 29,400, so s² = (29,400 − 990² ÷ 40) ÷ 39 = (29,400 − 24,502.5) ÷ 39 = 125.58, the same result.

Formula

mᵢ = (lower + upper) ÷ 2 · x̄ = Σfᵢmᵢ ÷ N · s² = Σfᵢ(mᵢ − x̄)² ÷ (N − 1) (sample) or ÷ N (population) · median ≈ L + (N/2 − F) ÷ f × w

Worked example

Inputs: Classes and frequencies (one per line: lower–upper, frequency): 0-10, 4
10-20, 9
20-30, 15
30-40, 8
40-50, 4; Data are a: Sample (divide by n − 1).
Results: Standard deviation = 11.2061; Mean (x̄) = 24.75; Variance = 125.5769; Total frequency (N) = 40; Sample standard deviation (÷ N − 1) = 11.2061; Population standard deviation (÷ N) = 11.0651.

Key terms

Grouped data
Data summarised as class intervals with frequencies.
Class midpoint
(lower limit + upper limit) ÷ 2, the representative value of a class.
Frequency (f)
The number of observations in a class.
Modal class
The class with the highest frequency.
Cumulative frequency
The running total of frequencies.

Frequently asked questions

How do you find the standard deviation of grouped data?

Use class midpoints m: mean x̄ = Σfm ÷ N, variance = Σf(m − x̄)² ÷ (N − 1), and take the square root.

What is the standard deviation of the example table?

Mean = 990 ÷ 40 = 24.75; Σf(m − x̄)² = 4,897.5; sample variance = 4,897.5 ÷ 39 = 125.58; SD = 11.21.

How do I find the class midpoint?

Add the lower and upper class limits and divide by 2: (10 + 20) ÷ 2 = 15.

Is the grouped standard deviation exact?

No, it assumes every value lies at its class midpoint. It is usually close if the classes are narrow.

Should I divide by N or N − 1?

By N − 1 if the table summarises a sample, by N if it covers the whole population. Both results are shown.

How is the median of grouped data estimated?

Find the class where the cumulative frequency passes N/2 and interpolate: L + (N/2 − F) ÷ f × width. For the example: 20 + (20 − 13) ÷ 15 × 10 = 24.67.

What is the modal class?

The class with the highest frequency, which is 20–30 in the example.

Can classes have different widths?

Yes. The midpoint method works for any widths, although the bar chart then shows frequencies, not densities.

Sources

  1. OpenStax: Introductory Statistics 2e
  2. NIST/SEMATECH e-Handbook: Measures of scale
  3. Khan Academy: Statistics and probability

Cite this calculator

Speedy Calculator. (2026). Grouped Data Standard Deviation Calculator. Speedy Calculator. https://speedycalculator.com/calculators/statistics/grouped-data-standard-deviation/