Skip to content
Return to Calculators Hub

Standard Deviation Calculator

Math

Calculate sample and population standard deviation, variance, mean, sum of squares, and standard error with a detailed step-by-step deviation table.

Presets:
Separate numbers by commas, spaces, or newlines.
Sample Standard Deviation (s)
5.237229 (Variance: 27.428571)
Arithmetic Mean (x̄) 18
Sample Size (N) 8
Median 18.5
Sum (∑x) 144
Sample Standard Deviation (s) 5.23723
Population Standard Deviation (σ) 4.89898
Standard Error (SE) 1.85164
Coefficient of Variation (CV) 29.10%

Step-by-Step Calculation

1 1. Calculate the Arithmetic Mean (x̄)
x̄ = (∑ x_i) / N = 144 / 8 = 18

Sum all values in the dataset and divide by total number of observations N.

2 2. Compute Sum of Squared Differences (SS)
SS = ∑ (x_i - x̄)² = 192

Subtract the mean from each data point, square each deviation to eliminate negative signs, and sum the results.

3 3. Calculate Sample Variance (s²)
s² = SS / (n - 1) = 192.000000 / (8 - 1) = 27.428571

Bessel's correction (dividing by n - 1) removes bias when estimating a population from sample data.

4 4. Sample Standard Deviation (s)
s = √s² = √(27.428571) ≈ 5.237229

Take the square root of the variance to return to the original units of measurement.

📋 Deviation & Squared Differences Table

8 data points
# x_i x_i - x̄ (x_i - x̄)²
1 10 -8 64
2 12 -6 36
3 23 +5 25
4 23 +5 25
5 16 -2 4
6 23 +5 25
7 21 +3 9
8 16 -2 4
Total 144 0.00 192

How This Calculator Works

Standard deviation measures the degree of dispersion or spread in a dataset relative to its mean. A low standard deviation indicates that data points cluster tightly around the mean, while a high standard deviation indicates values spread across a wide range.

📐 Sample vs Population Standard Deviation Formulas
Sample: s = √[ ∑(x_i - x̄)² / (n - 1) ] | Population: σ = √[ ∑(x_i - μ)² / N ]
s: Sample standard deviation, computed with n - 1 degrees of freedom
σ: Population standard deviation, computed across the entire population size N
x̄, μ: Arithmetic sample mean and population mean respectively
s²: Variance: the square of the standard deviation
SE: Standard Error of the Mean = s / √n

Key Mathematical Rules & Properties

Bessel's Correction (n - 1)

When estimating population variance from a random sample, dividing by n underestimates true spread. Dividing by n - 1 yields an unbiased estimator.

The Empirical Rule (68-95-99.7%)

For normally distributed data, approximately 68.27% of observations fall within ±1 SD of the mean, 95.45% within ±2 SD, and 99.73% within ±3 SD.

Standard Error vs Standard Deviation

Standard deviation quantifies variability between individual data points. Standard error quantifies variability between sample means across repeated experiments.

✎

Worked Example: 4 Sample Values

Calculate sample standard deviation for the values: 2, 4, 4, 6.

  1. 1. Calculate mean: x̄ = (2 + 4 + 4 + 6) / 4 = 16 / 4 = 4.
  2. 2. Calculate deviations from mean: (2-4)=-2, (4-4)=0, (4-4)=0, (6-4)=+2.
  3. 3. Square deviations: (-2)² = 4, 0² = 0, 0² = 0, 2² = 4.
  4. 4. Sum squared deviations: 4 + 0 + 0 + 4 = 8.
  5. 5. Divide by (n - 1) = (4 - 1) = 3: Sample variance s² = 8 / 3 ≈ 2.6667.
  6. 6. Take square root: s = √2.6667 ≈ 1.633.
Final Answer: s ≈ 1.633 (Population σ = √2 = 1.414)

Frequently Asked Questions

When should I choose Sample vs Population standard deviation?

Choose Sample whenever your data is a subset or sample drawn from a larger group (e.g. 50 survey respondents). Choose Population only when you possess measurements for every single member of the target group (e.g. all 30 students in a classroom).

Can standard deviation ever be negative?

No. Because deviations are squared before summing, the variance and standard deviation are always greater than or equal to zero. An SD of zero means all values in the dataset are identical.

Understanding your calculation

Method, example and limitations

How the calculation works

Standard deviation measures spread around the mean. Population variance divides squared deviations by n; the usual sample estimate divides by n − 1.

Example to check

For 2, 4 and 6, the mean is 4. Population standard deviation is √(8/3), about 1.633; sample standard deviation is 2.

Before using the result

Select sample or population deliberately. Sample standard deviation needs at least two observations and can be sensitive to outliers.

Calculation methodology · Report a result that needs review