Sample standard
deviation calculator

Find how far your numbers spread.
The sample result, with the working behind it.

Example: 8 observations, sample standard deviation ≈ 2.138089935.

Sample standard deviation (s)

2.138089935

Uses n − 1. In the same units as your data.

Count (n)
8
Mean (x̄)
5
Sample variance (s²)
4.571428571
Population SD (σ)
2

s = √(32 ÷ (8 − 1)) ≈ 2.138089935

Your numbers stay in this tab. Results show up to 10 significant digits; browser arithmetic has finite precision.

Spread,
step by step.

This sample standard deviation calculator measures how much a set of observations varies around its mean. A small value indicates that the observations are close together; a larger value indicates more spread. It does not, by itself, say whether the data is good, bad, or normally distributed.

The sample standard deviation formula

s = √[Σ(xᵢ − x̄)² ÷ (n − 1)]

Here, xᵢ is each observation, x̄ is the mean, and n is the number of observations. The NIST statistical handbook defines sample variance using n − 1; sample standard deviation is its square root.

  1. Find the mean by adding all values and dividing by their count.
  2. Subtract the mean from each value and square each difference.
  3. Add those squared differences.
  4. Divide by n − 1 to get sample variance.
  5. Take the square root to get sample standard deviation.

A worked example

For 2, 4, 4, 4, 5, 5, 7, 9, the mean is 5. The squared deviations are 9, 1, 1, 1, 0, 0, 4, and 16. Their sum is 32. With eight observations:

s² = 32 ÷ 7 ≈ 4.5714
s = √(32 ÷ 7) ≈ 2.1381

The variance has squared units. Taking its square root returns standard deviation to the original units.

Sample or
population?

Use the sample result when your observations are a sample used to estimate variation in a larger population. Use the population result when the observations are the entire population you want to describe.

Population: σ = √[Σ(xᵢ − μ)² ÷ n]

For the same example, population variance is 32 ÷ 8 = 4 and population standard deviation is 2. The difference is the denominator, not a different set of values. Dividing by n − 1 corrects the usual sample variance estimator under the relevant sampling assumptions; it does not make the square root an exactly unbiased estimator of population standard deviation.

Input and precision

Enter at least two observations. Negative values, zeros, decimal points, and scientific notation such as 1.2e3 work. Each value may have up to 15 meaningful numeric digits; nonzero magnitudes must lie between 1e−100 and 1e100. Avoid unit labels and thousands separators.

The calculation centers the data before summing squared differences and uses compensated sums. This follows NIST’s guidance on numerical stability rather than subtracting two large, nearly equal sums of squares. Display rounding is applied after calculation.

Good questions.
Straight answers.

Why does sample standard deviation divide by n − 1?

The sample mean is estimated from those same observations, leaving n − 1 degrees of freedom. The resulting sample variance estimates population variance under the usual random-sampling assumptions.

Can I calculate it from one value?

No. With one observation, n − 1 is zero, so sample variance and sample standard deviation are undefined. Enter at least two values.

What if all my numbers are identical?

With at least two identical observations, every deviation is zero. Sample variance and standard deviation are both zero.

Are negative numbers allowed?

Yes. Standard deviation measures differences from the mean. It is nonnegative even when some or all observations are negative.

Will repeated numbers be counted?

Yes. Every entered value is one observation. Repeats are retained and contribute to the mean and variance.

Are the data uploaded?

No. Parsing, calculation, and copying happen in your browser. The tool does not upload or save your observations.

Keep the numbers in perspective.

Percentage change Significant figuresAll tools