Mathematics · Statistics
Standard Deviation Calculator
Calculate the population or sample standard deviation and variance from a dataset. Shows step-by-step computation.
Calculator
Formula
σ (sigma) is the population standard deviation, computed by dividing the sum of squared deviations from the mean by N (the total population size). s is the sample standard deviation, which divides by N−1 (Bessel's correction) to produce an unbiased estimator of the population variance when only a sample is available.
Source: Bessel F. Untersuchungen über die Wahrscheinlichkeit der Beobachtungsfehler. 1838. Standard references: NIST/SEMATECH e-Handbook of Statistical Methods.
How it works
Standard deviation is computed in four steps: (1) find the mean of the dataset; (2) subtract the mean from each value and square the result; (3) average the squared deviations; (4) take the square root to return to the original units.
The critical distinction between population and sample standard deviation is whether you have measured every member of the group (population) or only a subset (sample). When working with a sample, dividing by N−1 rather than N (Bessel's correction) compensates for the tendency of samples to underestimate true population variability.
In practice, use sample standard deviation (s) whenever your data represents a subset of a larger population — which is the case in almost all real-world statistical work. Use population standard deviation (σ) only when you have measured the entire population.
Worked example
Dataset: 12, 15, 14, 18, 16 (N = 5, sum = 75, Σx² = 1,165)
Mean = 75 ÷ 5 = 15.0
Squared deviations: (12−15)² + (15−15)² + (14−15)² + (18−15)² + (16−15)² = 9 + 0 + 1 + 9 + 1 = 20
Sample variance = 20 ÷ (5−1) = 5.0
Sample std dev = √5.0 = 2.236
Frequently asked questions
When should I use sample vs population standard deviation?
Use sample standard deviation (s, divides by N−1) when your data represents a sample drawn from a larger population — this is the correct choice for almost all practical applications. Use population standard deviation (σ, divides by N) only when your data covers the complete population, such as the scores of every student in a specific class.
What does a standard deviation of zero mean?
A standard deviation of zero means all values in the dataset are identical. There is no variation around the mean. This can indicate a data entry error, a constant variable, or simply that the measured phenomenon does not vary within the observed group.
What is the empirical rule (68-95-99.7 rule)?
For data following a normal distribution, approximately 68% of values fall within one standard deviation of the mean, 95% within two, and 99.7% within three. This rule is useful for quickly assessing whether a given value is unusual: a value more than three standard deviations from the mean occurs less than 0.3% of the time in normally distributed data.
What is the relationship between variance and standard deviation?
Variance is the square of the standard deviation (s² or σ²). While variance is mathematically convenient (it is additive for independent variables), standard deviation is more interpretable because it is expressed in the same units as the original data. To convert: standard deviation = √variance.
How does standard deviation differ from standard error?
Standard deviation measures variability within a dataset. Standard error measures the uncertainty in a sample mean as an estimator of the population mean. Standard error = standard deviation ÷ √N. As sample size increases, standard error decreases (the estimate becomes more precise), while standard deviation remains relatively stable.
Last updated: 2025-01-15 · Formula verified against primary sources.