Standard Deviation Calculator

Standard deviation measures how spread out numbers are from the mean, calculated as the square root of variance. Enter a set of numbers to compute the mean, variance, range, and both population and sample standard deviation.

Quick Answer

For the data set {2, 4, 4, 4, 5, 5, 7, 9}, the mean is 5, the population standard deviation is 2, and the sample standard deviation is approximately 2.14.

Separate values with commas, spaces, or newlines

Common Examples

Input Result
2, 4, 4, 4, 5, 5, 7, 9 Mean: 5, Pop SD: 2.0, Sample SD: 2.14
10, 12, 23, 23, 16, 23, 21, 16 Mean: 18, Pop SD: 4.90, Sample SD: 5.24
1, 2, 3, 4, 5 Mean: 3, Pop SD: 1.41, Sample SD: 1.58
100, 100, 100 Mean: 100, Pop SD: 0, Sample SD: 0

How It Works

Mean (Average) = Sum of all values / N

Population Standard Deviation

σ = √(Σ(xᵢ − μ)² / N)

Where μ is the population mean and N is the total number of values. Use this when your data represents the entire population.

Sample Standard Deviation

s = √(Σ(xᵢ − x̄)² / (N − 1))

Where x̄ is the sample mean. Dividing by N − 1 instead of N is known as Bessel’s correction, which compensates for the bias in estimating a population variance from a sample.

Variance is the square of the standard deviation. Population variance divides by N; sample variance divides by N − 1.

Median is the middle value when the data is sorted in ascending order. For an even number of values, the median is the average of the two middle values.

Range = Maximum value − Minimum value

Worked Example

For the data set {2, 4, 4, 4, 5, 5, 7, 9}: Mean = (2+4+4+4+5+5+7+9)/8 = 40/8 = 5. Squared deviations: (2-5)²=9, (4-5)²=1, (4-5)²=1, (4-5)²=1, (5-5)²=0, (5-5)²=0, (7-5)²=4, (9-5)²=16. Sum = 32. Population variance = 32/8 = 4, so population SD = sqrt(4) = 2. Sample variance = 32/7 ≈ 4.571, so sample SD ≈ 2.14.

Related Calculators

Frequently Asked Questions

What is the difference between population and sample standard deviation?
Population standard deviation divides the sum of squared deviations by N (the total count), while sample standard deviation divides by N minus 1. This adjustment, called Bessel's correction, accounts for the fact that a sample tends to underestimate the variability of the full population.
When should I use sample vs. population standard deviation?
Use population standard deviation when your data includes every member of the group you are analyzing (e.g., test scores for an entire class). Use sample standard deviation when your data is a subset drawn from a larger group (e.g., a survey of 500 people representing a city of 100,000).
What does standard deviation tell you?
Standard deviation measures how spread out values are from the mean. A low standard deviation means values cluster closely around the average, while a high standard deviation means the values are more spread out. It is one of the most common measures of variability in statistics.
Can standard deviation be negative?
No. Standard deviation is always zero or positive because it is defined as the square root of variance, and variance is the average of squared differences (which are always non-negative). A standard deviation of zero means every value in the data set is identical.