Standard Deviation Calculator — How to Calculate SD and Variance
Calculate sample (n−1) or population (n) standard deviation and variance from a pasted number list. Example: 2, 4, 4, 4, 5, 5, 7, 9 → population SD = 2 (sample SD ≈ 2.14). Runs in your browser; numbers stay on your device.
How it works
Paste numbers, pick sample or population, then calculate. The tool finds the mean, sums squared deviations, divides by n−1 (sample) or n (population) for variance, and takes the square root for standard deviation. Results stay in your browser and are not uploaded to a server.
Formula
Let x̄ be the mean of the numbers. Variance is the average of squared deviations; standard deviation is its square root:
- Mean: x̄ = (Σ xᵢ) / n
- Sample variance: s² = Σ(xᵢ − x̄)² / (n − 1); sample SD s = √s²
- Population variance: σ² = Σ(xᵢ − x̄)² / n; population SD σ = √σ²
Example
Classic set 2, 4, 4, 4, 5, 5, 7, 9 has mean 5 and sum of squared deviations 32. Population: σ² = 32/8 = 4 → σ = 2. Sample: s² = 32/7 ≈ 4.571 → s ≈ 2.138. (The well-known “SD = 2” demo is the population value.)
When to use it
- Homework: check sample vs population SD on a short list of exam or lab scores.
- Quick spread check for a small CSV column before charting or reporting.
- Compare volatility of two short numeric series using the same mode (sample or population).
Frequently asked questions
What is the difference between sample and population standard deviation?
Sample SD divides by n−1 (Bessel’s correction) and estimates the SD of a larger population. Population SD divides by n when your list is the complete set.
How are variance and standard deviation related?
Variance is the average of squared deviations from the mean. Standard deviation is the square root of variance, so it is in the same units as the original numbers.
Why does the classic example equal 2?
For 2, 4, 4, 4, 5, 5, 7, 9 the population standard deviation is exactly 2. The sample (n−1) standard deviation is about 2.14 — textbooks often show the population figure.
Are my numbers uploaded?
No. Parsing and math run in your browser tab. Values stay on your device and are not uploaded to a server.
Questions or feedback
Something unclear, broken, or missing? Draft a message below — we read every note about these tools.