Standard Deviation & Variance Calculator
Calculate population (σ) and sample (s) standard deviation, variance, mean, and sum of squares from any data set — instantly, with formulas.
Separate numbers with commas, spaces, or new lines.
8 values detected
Sample Standard Deviation (s)
2.4495
Sample Variance
6
Mean
5.5
Count (n)
8
Sum of Squares
42
Both, side by side
Values vs Mean
Step-by-Step Solution
Here's exactly how this answer was calculated, one step at a time.
- 1
List the data set and count the values
Data: 4, 8, 6, 5, 3, 7, 9, 2 (n = 8)
This is your full data set, with n being the total number of values.
- 2
Calculate the mean (x̄)
x̄ = Σx / n = (4 + 8 + 6 + 5 + 3 + 7 + 9 + 2) / 8 = 5.5
Add up every value and divide by how many values there are to find the average.
- 3
Find each value's deviation from the mean
(4 − 5.5) = -1.5, (8 − 5.5) = 2.5, (6 − 5.5) = 0.5, (5 − 5.5) = -0.5, (3 − 5.5) = -2.5, (7 − 5.5) = 1.5, (9 − 5.5) = 3.5, (2 − 5.5) = -3.5
- 4
Square each deviation
(-1.5)² = 2.25, (2.5)² = 6.25, (0.5)² = 0.25, (-0.5)² = 0.25, (-2.5)² = 6.25, (1.5)² = 2.25, (3.5)² = 12.25, (-3.5)² = 12.25. Squaring makes every term positive, so deviations above and below the mean don't cancel out.
- 5
Add up all the squared deviations (sum of squares)
Σ(xᵢ − x̄)² = 42
Adding every squared deviation together gives the total sum of squares for the data set.
- 6
Divide the sum of squares by n − 1
s² = Σ(xᵢ − x̄)² / (n − 1) = 42 / 7 = 6
Dividing by n − 1 instead of n (Bessel's correction) gives the sample variance, correcting for the bias of estimating spread from a sample.
- 7
Take the square root of the variance
s = √6 = 2.4495
The square root brings the measure of spread back into the same units as the original data — this is the standard deviation.
✓ Final Answer: Sample s = 2.4495
Standard Deviation & Variance Calculator
This standard deviation and variance calculator helps you measure how spread out the numbers in a data set are, relative to the mean. Enter your values once and instantly get both population standard deviation (σ) and sample standard deviation (s), along with population variance, sample variance, the mean, and the sum of squares — all calculated together from the same data set.
Standard deviation and variance are two of the most important concepts in statistics, used to understand data spread, consistency, and reliability. This free online calculator is built for students, teachers, researchers, data analysts, engineers, and anyone working with statistical data who needs fast, accurate results without doing the calculations by hand.
What is Standard Deviation and Variance?
Variance measures how far each number in a data set is from the mean, on average, in squared units. Standard deviation is the square root of variance, which brings the measure of spread back into the same units as the original data, making it easier to interpret. A low standard deviation means the values are clustered close to the mean, while a high standard deviation means the values are spread out over a wider range.
Population vs Sample: Which Should You Use?
The formula you use depends on whether your data represents an entire population or just a sample drawn from a larger population.
- Population standard deviation (σ): use this when your data set includes every member of the population you're studying, such as the test scores of every student in a class.
- Sample standard deviation (s): use this when your data set is a sample taken from a larger population, such as the test scores of 30 students out of a school of 2,000. The sample formula divides by (n − 1) instead of n — this is called Bessel's correction — which corrects for the bias that comes from estimating a population's spread using only a sample.
Standard Deviation & Variance Formulas
Let x₁, x₂, ..., xₙ be the values in the data set, x̄ (x-bar) be the mean, and n be the number of values. Σ means 'sum of'.
- Mean formula: x̄ = Σx / n
- Population variance formula: σ² = Σ(xᵢ − x̄)² / n
- Population standard deviation formula: σ = √(Σ(xᵢ − x̄)² / n)
- Sample variance formula: s² = Σ(xᵢ − x̄)² / (n − 1)
- Sample standard deviation formula: s = √(Σ(xᵢ − x̄)² / (n − 1))
- Sum of squares formula: Σ(xᵢ − x̄)² — the sum of each value's squared deviation from the mean
How to Calculate Standard Deviation Step by Step
Follow these steps to calculate standard deviation manually, or let this calculator do it instantly:
- Step 1: Calculate the mean (average) of your data set by adding all values and dividing by n.
- Step 2: Subtract the mean from each value to find each value's deviation from the mean.
- Step 3: Square each deviation, so all values become positive.
- Step 4: Add up all the squared deviations to get the sum of squares.
- Step 5: Divide the sum of squares by n (for population) or by n − 1 (for sample) to get the variance.
- Step 6: Take the square root of the variance to get the standard deviation.
Worked Example
Consider the data set: 4, 8, 6, 5, 3, 7, 9, 2.
- Mean = (4 + 8 + 6 + 5 + 3 + 7 + 9 + 2) / 8 = 44 / 8 = 5.5
- Sum of squared deviations = (4−5.5)² + (8−5.5)² + (6−5.5)² + (5−5.5)² + (3−5.5)² + (7−5.5)² + (9−5.5)² + (2−5.5)² = 44
- Population variance (σ²) = 44 / 8 = 5.5, so population standard deviation (σ) = √5.5 ≈ 2.345
- Sample variance (s²) = 44 / 7 ≈ 6.286, so sample standard deviation (s) = √6.286 ≈ 2.507
Common Uses of Standard Deviation and Variance
Standard deviation and variance are used across statistics, science, finance, and everyday data analysis. Common applications include measuring the volatility or risk of stock returns in finance, analyzing quality control and consistency in manufacturing, evaluating the spread of exam scores or survey responses in education, comparing variability between two or more data sets, and testing scientific hypotheses that rely on standard deviation as part of significance testing.
Frequently Asked Questions
What is the formula for standard deviation?
For a population, standard deviation (σ) equals the square root of the average of squared deviations from the mean: σ = √(Σ(x − x̄)² / n). For a sample, standard deviation (s) uses n − 1 instead of n: s = √(Σ(x − x̄)² / (n − 1)).
What is the difference between population and sample standard deviation?
Population standard deviation divides the sum of squared deviations by n, and is used when your data includes the entire population. Sample standard deviation divides by n − 1 instead, which corrects for bias when your data is only a sample of a larger population.
What is the relationship between variance and standard deviation?
Standard deviation is simply the square root of variance. Variance is expressed in squared units of the original data, while standard deviation is expressed in the same units as the original data, which makes it easier to interpret.
Why do we divide by n − 1 for sample standard deviation?
Dividing by n − 1, known as Bessel's correction, adjusts for the fact that a sample's mean is only an estimate of the true population mean. Without this correction, the sample variance would systematically underestimate the true population variance.
Can standard deviation be negative?
No. Standard deviation is always zero or positive, since it's calculated from squared deviations and a square root. A standard deviation of zero means every value in the data set is identical.