Σ
SDCalc
中級Formulas·12 min

Standard Deviation from a Frequency Table: Step-by-Step Guide

Learn how to calculate standard deviation from a frequency table or grouped data using frequencies, class midpoints, and a practical step-by-step workflow.

By Standard Deviation Calculator Team · Data Science Team·Published

When a Frequency Table Changes the Workflow

A frequency table compresses repeated values into counts. Instead of listing every observation one by one, you record each value or class and how often it appears. The standard deviation logic stays the same, but the arithmetic changes because each value must be weighted by its frequency.

That makes this topic especially common in classrooms, survey summaries, quality-control reports, and exam score tables. If you already have raw data, the site's descriptive statistics calculator, sample standard deviation calculator, and population standard deviation calculator can do the computation directly. If your data are summarized in a table, this guide shows how to convert the table into the same result.

Two cases matter

If the table lists exact values with frequencies, the answer is exact. If the table lists class intervals such as 10-19 or 20-29, you usually estimate the standard deviation using class midpoints, so the result is approximate.
Data formatWhat you use in the formulaIs the result exact?
Exact values with countsThe observed value x and its frequency fYes
Grouped class intervalsThe class midpoint m and its frequency fApproximate
Raw ungrouped listEach individual observationYes

This article pairs well with Standard Deviation Formula Explained, Understanding Variance, and Sample vs Population, because frequency tables do not change the underlying statistical definitions.

Core Formulas

Let fᵢ be the frequency for value xᵢ. The total number of observations is n = Σfᵢ. The frequency-table version of the mean is:

Mean from a frequency table

x̄ = Σ(fᵢxᵢ) / Σfᵢ

For a sample, the standard deviation is:

Sample standard deviation from frequencies

s = √[ Σfᵢ(xᵢ - x̄)² / (n - 1) ]

For a population, use:

Population standard deviation from frequencies

σ = √[ Σfᵢ(xᵢ - μ)² / N ]

Many people prefer the computational shortcut because it reduces repetitive subtraction:

Variance shortcut for a frequency table

variance = [Σ(fᵢxᵢ²) / n] - x̄²

Why this works

A frequency table is just a compact way to repeat observations. A row with value 4 and frequency 5 means the value 4 appears five times in the dataset.

Worked Example: Ungrouped Frequency Table

Suppose test scores are summarized like this:

Score xFrequency ff × xf × x²
23612
452080
621272
8216128
Total1254292

First compute the mean: x̄ = 54 / 12 = 4.5.

If you treat the table as a population, the variance shortcut gives 292 / 12 - 4.5² = 24.333... - 20.25 = 4.0833. The population standard deviation is therefore σ ≈ 2.02.

If you treat the table as a sample, first convert the shortcut result into the sample version, or use the sample formula directly. The sample variance is (292 - 12 × 4.5²) / 11 = 49 / 11 ≈ 4.4545, so the sample standard deviation is s ≈ 2.11.

What the table really represents

The frequency table above is equivalent to the raw dataset [2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 8, 8]. Expanding the list and using the standard calculator would produce the same answer.
1

Find the total frequency

Add the frequencies to get n = 12.
2

Find the mean

Compute Σfx = 54, then x̄ = 54 / 12 = 4.5.
3

Find the weighted square total

Compute Σfx² = 292.
4

Choose sample or population

Use N for a full population or n - 1 for a sample. This is the same distinction explained in Sample vs Population.
5

Take the square root last

Always compute variance first, then take the square root to get the standard deviation.

If you want to check your arithmetic, enter the expanded values into the site's mean calculator, variance calculator, or sample standard deviation calculator.

Grouped Data and the Midpoint Method

Grouped data are different. Instead of exact values, you only know that observations fall inside intervals such as 10-19, 20-29, and 30-39. Since the exact values are hidden, the standard workaround is to use each class midpoint as a representative value.

Grouped-data midpoint

m = (lower class boundary + upper class boundary) / 2

Then you apply the same frequency formulas, replacing xᵢ with midpoint mᵢ:

Mean for grouped data

x̄ ≈ Σ(fᵢmᵢ) / Σfᵢ

Sample SD for grouped data

s ≈ √[ Σfᵢ(mᵢ - x̄)² / (n - 1) ]

Example grouped table:

ClassFrequency fMidpoint mf × m
10-19214.529.0
20-29524.5122.5
30-39734.5241.5
40-49444.5178.0
50-59254.5109.0
Total20-680.0

The estimated mean is 680 / 20 = 34.0. Using the midpoint-based square totals gives an estimated population variance of 124.75 and an estimated population standard deviation of √124.75 ≈ 11.17. If the grouped table is a sample, the estimated sample standard deviation is √131.32 ≈ 11.46.

Midpoints are an approximation

The midpoint method assumes values are spread fairly evenly within each class. If most observations pile up near a class boundary, the grouped-data standard deviation can be noticeably off.

Grouped-data methods are still useful because they let you estimate spread when raw data are unavailable. But if you can recover the underlying observations, use the exact values instead.

When the Answer Is Exact vs Approximate

Exact frequency tables

If each row lists a real observed value such as 12, 15, or 18 with its count, the result is mathematically identical to expanding the raw dataset. Nothing is lost.

Grouped class tables

If each row is a bin such as 10-19 or 20-29, exact values are missing. Midpoints provide an estimate, not a perfect reconstruction of the data.

This difference matters most when classes are wide, open-ended, or highly skewed internally. For example, a class labeled 60 and above does not have a natural midpoint, so any grouped-data SD based on that row depends on an extra assumption.

SituationBest practice
Exact values with countsUse the frequency formulas directly
Class intervals of equal widthUse midpoint formulas and report the result as an estimate
Open-ended classesAvoid precise SD claims unless additional assumptions are justified
Raw data available laterRecalculate from raw values instead of keeping the grouped estimate

Common Mistakes

  • Using frequencies to compute the mean, but forgetting to use them again in the variance step.
  • Mixing up the sample formula and the population formula.
  • Treating grouped midpoint calculations as exact rather than approximate.
  • Using class labels instead of true midpoints for grouped data.
  • Taking the square root too early instead of after the full variance calculation.
  • Ignoring whether the table represents all observations or only a sample.

These mistakes are common because standard deviation formulas already have several moving parts. Frequency tables add one more layer: every quantity must be interpreted through the count attached to it.

Frequency Table Checklist

  • Confirm whether the table contains exact values or grouped intervals.
  • Add frequencies first to get the total number of observations.
  • Compute Σfx and, if using the shortcut, Σfx² or Σfm².
  • Decide whether you need a sample SD or population SD.
  • Use midpoints only when the table is grouped.
  • Label grouped-data results as estimates when precision matters.
  • Check the final answer against the site's variance, mean, or descriptive statistics tools when you can expand the data.

Once you are comfortable with the workflow, a frequency table is not a new formula problem at all. It is the same standard deviation problem written in compressed form. The main question is whether the table preserves exact values or only grouped approximations.

Further Reading

Sources

References and further authoritative reading used in preparing this article.

  1. NIST/SEMATECH e-Handbook of Statistical Methods
  2. Frequency distribution - Wikipedia
  3. Standard deviation - Wikipedia