Statistics
Frequency table standard deviation calculator
Enter each distinct value and the number of times it occurs. The calculator gives the standard deviation of all the observations the table stands for — sample or population — with the mean, the variance and a full working table.
| Value (x) | Frequency (f) | Remove |
|---|---|---|
One row per distinct value, with how many times it occurs. For class intervals such as 10–19, use the grouped-data calculator instead.
Show the working, step by step
The formulas
With values x, frequencies f and total frequency n = Σf:
x̄ = Σfx ÷ Σf s² = Σf(x − x̄)² ÷ (n − 1) (sample) σ² = Σf(x − x̄)² ÷ n (population)
The standard deviation is the square root of the variance. Each squared deviation is counted
f times, exactly as if the value had been written out f times, so
the result is identical to the standard deviation of the raw list.
The shortcut formula
Textbooks often compute the sum of squares without the mean, from Σfx and Σfx²:
Σf(x − x̄)² = Σfx² − (Σfx)² ÷ n
It is quicker by hand because it needs only three column totals. On a computer it can lose precision when the values are large and close together, so the calculator uses the deviation form and reports Σfx² only as a check.
A worked example
Forty customers rate a service from 1 to 5. The counts are the calculator's default rows:
| Rating (x) | f | fx | fx² | f(x − x̄)² |
|---|---|---|---|---|
| 1 | 4 | 4 | 4 | 16.4025 |
| 2 | 9 | 18 | 36 | 9.455625 |
| 3 | 14 | 42 | 126 | 0.00875 |
| 4 | 8 | 32 | 128 | 7.605 |
| 5 | 5 | 25 | 125 | 19.503125 |
| Σ | 40 | 121 | 419 | 52.975 |
- Mean: x̄ = 121 ÷ 40 = 3.025.
- Sum of squares: Σf(x − x̄)² = 52.975. The shortcut agrees: 419 − 121² ÷ 40 = 419 − 366.025 = 52.975.
- Sample variance: 52.975 ÷ 39 = 1.35833, so s = 1.16548.
- Population variance: 52.975 ÷ 40 = 1.32438, so σ = 1.15081.
Note that n is 40, the total frequency — not 5, the number of rows. The standard error of the mean is 1.16548 ÷ √40 = 0.184278.
Frequency table or grouped data?
| Frequency table | Grouped frequency table | |
|---|---|---|
| Rows are | Exact values (1, 2, 3…) | Class intervals (10–19, 20–29…) |
| x in the formula | The value itself | The class midpoint |
| Result | Exact | An estimate |
| Typical data | Ratings, dice rolls, family size, defects per unit | Heights, incomes, test scores in bands |
| Calculator | This page | Grouped data SD |
If you have the raw list instead, you can also paste it into the
standard deviation calculator using the 10:3 shorthand — value
10, three times — which is often quicker than filling a table.
Common mistakes
- Using the number of rows as n. n is Σf.
- Forgetting to multiply the squared deviations by f. Each row's deviation must be counted as many times as the value occurs.
- Mixing up the columns. Swapping values and frequencies gives a plausible-looking but wrong answer. Frequencies must be whole numbers; this calculator rejects anything else.
- Sample or population. A survey of 40 customers is a sample of all customers, so s (n − 1) is usually the right choice. Use σ only when the table covers everyone you care about.
Related calculators
-
Grouped data SD
For class intervals rather than exact values, using midpoints.
-
Standard deviation calculator
Raw values, or value:count shorthand for a frequency list.
-
Weighted SD
When the weights are not whole-number counts.
-
SD on a TI-84
Using a frequency list with 1-Var Stats.
Common questions
How do you find the standard deviation of a frequency table?
Multiply each value by its frequency and divide the total by Σf to get the mean. Then
multiply each squared deviation from the mean by its frequency, add them up, divide by
n − 1 for a sample (or n for a population), and take the square root:
s = √(Σf(x − x̄)² ÷ (Σf − 1)).
Is n the number of rows or the total frequency?
The total frequency, Σf. A table with 5 rows whose frequencies add up to 40 describes 40 observations, so n = 40 and a sample divides by 39. Using the number of rows is the most common mistake with frequency tables.
What is the difference between a frequency table and grouped data?
A frequency table lists exact values — 1, 2, 3 — with how often each occurs, so the standard deviation is exact. Grouped data lists class intervals such as 10–19, and every observation in a class has to be treated as sitting at its midpoint, so the result is an estimate. For intervals, use the grouped data calculator.
Can I type a frequency table into the main standard deviation calculator?
Yes. Write each value as value:count, so 3:14 means fourteen 3s.
The standard deviation calculator expands them and gives the same answer as
this table.
How do I do this on a TI-84 or in Excel?
On a TI-84, put values in L1 and frequencies in L2, then run
1-Var Stats L1, L2; Sx is the sample SD. In Excel, with values in A and
frequencies in B, the sample SD is
=SQRT(SUMPRODUCT(B2:B6,(A2:A6-SUMPRODUCT(A2:A6,B2:B6)/SUM(B2:B6))^2)/(SUM(B2:B6)-1)).