Standard Deviation Calculator Formula
Understand the math behind the standard deviation calculator. Each variable explained with a worked example.
Formulas Used
Sample Standard Deviation
samp_sd = sqrt(ss / 4)Population Standard Deviation
pop_sd = sqrt(ss / 5)Mean
data_mean = mnVariables
| Variable | Description | Default |
|---|---|---|
v1 | Value 1 | 4 |
v2 | Value 2 | 8 |
v3 | Value 3 | 6 |
v4 | Value 4 | 5 |
v5 | Value 5 | 7 |
mn | Derived value= (v1 + v2 + v3 + v4 + v5) / 5 | calculated |
ss | Derived value= pow(v1 - mn, 2) + pow(v2 - mn, 2) + pow(v3 - mn, 2) + pow(v4 - mn, 2) + pow(v5 - mn, 2) | calculated |
How It Works
How to Calculate Standard Deviation
Formula
Population SD (sigma) = sqrt( Sum of (xi - mean)^2 / N )
Sample SD (s) = sqrt( Sum of (xi - mean)^2 / (n - 1) )
Standard deviation is the square root of the variance and is expressed in the same units as the original data. About 68% of data in a normal distribution falls within one standard deviation of the mean.
Worked Example
Find the standard deviation of 4, 8, 6, 5, 7.
- 01Mean = 30 / 5 = 6
- 02Squared deviations: 4, 4, 0, 1, 1
- 03Sum of squares = 10
- 04Sample SD = sqrt(10 / 4) = sqrt(2.5) ≈ 1.5811
- 05Population SD = sqrt(10 / 5) = sqrt(2) ≈ 1.4142
Frequently Asked Questions
What does standard deviation tell you?
It tells you how much individual values typically deviate from the mean. A small SD means values cluster tightly around the mean; a large SD means they are widely spread.
What is the empirical rule?
For approximately normal distributions: ~68% of data falls within 1 SD of the mean, ~95% within 2 SDs, and ~99.7% within 3 SDs.
Can standard deviation be negative?
No. It is the square root of a sum of squared terms, so it is always zero or positive. It equals zero only when all values are identical.
Learn More
Guide
Understanding the Normal Distribution
Learn what the normal distribution is, why it matters in statistics, and how to use the bell curve for probability calculations, z-scores, and real-world data analysis.
Ready to run the numbers?
Open Standard Deviation Calculator