# Grouped Data Standard Deviation Calculator

URL: https://speedycalculator.com/calculators/statistics/grouped-data-standard-deviation/
Last updated: 2026-11-08

> 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.

## Inputs

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

## Results

- Standard deviation
- Mean (x̄)
- Variance
- Total frequency (N)
- Sample standard deviation (÷ N − 1)
- Population standard deviation (÷ N)
- Sample variance
- Population variance
- Estimated median
- Modal class
- Coefficient of variation
- Σf(m − x̄)²
- Working table
- Frequency chart

## 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
```

## Explanation

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

- **Classes and frequencies (one per line: lower–upper, frequency)**: For example "10-20, 9" or "10 20 9". Classes can have different widths.
- **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)fMidpoint mf·mf·(m − 24.75)²0–1045201,560.2510–20915135855.5620–3015253750.9430–40835280840.5040–504451801,640.25Total409904,897.5Mean = 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.

## 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.

## FAQ

**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

- [OpenStax: Introductory Statistics 2e](https://openstax.org/details/books/introductory-statistics-2e)
- [NIST/SEMATECH e-Handbook: Measures of scale](https://www.itl.nist.gov/div898/handbook/eda/section3/eda356.htm)
- [Khan Academy: Statistics and probability](https://www.khanacademy.org/math/statistics-probability)
