How to Calculate Standard Deviation Step-by-Step
Standard deviation measures the typical distance between each data point and the dataset's average (mean). While two datasets can share the exact same mean—such as [48, 50, 52] and [10, 50, 90] (both averaging 50)—their standard deviations reveal that the first group is tightly consistent while the second exhibits high volatility.
Sample Standard Deviation (s)
Used when analyzing a subset / sample of a larger population
Applies Bessel's correction (n − 1) in the denominator to produce an unbiased estimate of the true population variance.
Population Standard Deviation (σ)
Used when your dataset includes every member of the group
Divides by the total population size N because there is no sampling uncertainty when the entire population is measured.
The 5-Step Manual Calculation Process
Calculate the Mean (x̄ or μ): Add all observations together (Σx) and divide by the total count of numbers (n).
Find Each Deviation from the Mean: Subtract the mean from every individual value (xi − x̄). Values below the mean yield negative deviations; values above yield positive deviations.
Square Each Deviation: Multiply each deviation by itself (xi − x̄)2 so that negative and positive distances do not cancel each other out.
Compute the Variance (s² or σ²): Sum all squared deviations to obtain the Sum of Squares (SS), then divide by n − 1 (for a sample) or N (for a population).
Take the Square Root: Extract the square root of the variance to convert squared units back into the original unit of measurement.
Understanding Variance, Standard Error (SE), and Margin of Error
- Variance (s² / σ²): Represents the average squared distance from the mean. While crucial for ANOVA and regression modeling, variance is expressed in squared units (e.g., seconds² or dollars²), whereas standard deviation restores the original scale.
- Standard Error of the Mean (SE = s / √n): While standard deviation measures how widely individual observations vary from the average, Standard Error measures how accurately your sample mean (x̄) estimates the true population mean (μ). As sample size n grows, SE shrinks.
- 95% Margin of Error (MOE = t* × SE): Multiplies the Standard Error by the two-tailed critical value to define the radius of the 95% confidence interval around the sample mean.
Sample vs. Population Standard Deviation: Key Differences & When to Use Which
Choosing between Sample (s) and Population (σ) standard deviation depends on whether your dataset represents a partial subset drawn from a broader group or every single member of the target group.
| Feature / Criterion | Sample Standard Deviation (s) | Population Standard Deviation (σ) |
|---|---|---|
| Mathematical Symbol | Latin lowercase s (Variance: s²) | Greek lowercase sigma σ (Variance: σ²) |
| Formula | s = √[ Σ(xᵢ − x̄)² / (n − 1) ] |
σ = √[ Σ(xᵢ − μ)² / N ] |
| Denominator (Divisor) | n − 1 (Degrees of freedom / Bessel's correction) | N (Total population count) |
| Mean Referenced | Sample Mean (x̄) | True Population Mean (μ) |
| Relative Magnitude | Slightly larger than σ for the same numbers | Slightly smaller than s for the same numbers |
| When to Use | Clinical trials, customer surveys, quality-control batches, A/B tests, and scientific experiments | Complete national census, exam scores of one specific classroom (when not generalizing further) |
| Spreadsheet Function | =STDEV.S(range) in Excel / Google Sheets |
=STDEV.P(range) in Excel / Google Sheets |
Frequently Asked Questions (FAQ)
0 occurs only when every number in the dataset is identical (e.g., 10, 10, 10, 10).
Ctrl+C or Cmd+C), and click "Paste from Clipboard" (or press Ctrl+V inside the input box) to compute all metrics immediately.
Explore Our Free Calculator Series
Fast, privacy-first math & statistical utilities running 100% in your browser.