Skip to content
CalculatorAtlas

Standard Deviation Calculator

Tested

Spread of a data set.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

Standard deviation measures how spread out numbers are around their mean. Use the sample version (divide by n − 1) when your data is a sample of a larger group, and the population version (divide by n) when you have every value.

Enter the numbers separated by commas and choose the type. The calculator also shows the variance (the square of the standard deviation), the mean and the count.

Related tools: Mean Median Mode Calculator: Mean, median and mode of a data set. Z-Score Calculator: Standardize a value using a mean and standard deviation. Confidence Interval Calculator: Confidence interval for a mean (t or z).

How to use the Standard Deviation Calculator

  1. Type data set, for example 4, 8, 15, 16, 23, 42.
  2. Choose data type: Sample (n − 1) and Population (n).
  3. Press Calculate to see the result, and use Reset to start again.
Inputs of the Standard Deviation Calculator
InputWhat to enterAllowed values
Data setText, such as 4, 8, 15, 16, 23, 42—
Data typeChoose one: Sample (n − 1); Population (n)Starts at Sample (n − 1)

Formula and method

Formula

s = √(Σ(x − x̄)² ÷ (n − 1)); σ = √(Σ(x − μ)² ÷ n)

IEEE-754 double precision; shown to at most 6 decimal places.

Two-pass algorithm: compute the mean, then the squared deviations. Sample uses n − 1 (Bessel's correction).

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: Data set = 2, 4, 4, 4, 5, 5, 7, 9; Data type = Population (n).

Results of example 1
ResultValue
Population standard deviation (σ)2
Variance4
Mean5
Count8

Example 2

Inputs: Data set = 2, 4, 4, 4, 5, 5, 7, 9; Data type = Sample (n − 1).

Results of example 2
ResultValue
Sample standard deviation (s)2.13809
Variance4.571429
Mean5
Count8

Example 3

Inputs: Data set = 3 3 3; Data type = Sample (n − 1).

Results of example 3
ResultValue
Sample standard deviation (s)0
Variance0
Mean3
Count3

The first line is the headline result (population standard deviation (σ)). Below it the standard Deviation Calculator lists variance, mean and count, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.

Worked example

For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5 and the squared deviations from it add up to 32. The population standard deviation is √(32 ÷ 8) = 2 and the sample standard deviation is √(32 ÷ 7) = 2.138.

Same data, two denominators

Every figure in this table comes from running this calculator, so it matches what the form returns.

Same data, two denominators
TypeStandard deviationVariance
Population (n)24
Sample (n − 1)2.138094.571429

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • Data set: entering "9" shows "A sample needs at least two values." beside that field and no result.

Choosing between the Standard Deviation Calculator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Standard Deviation Calculator and similar calculators
CalculatorYou enterIt returns
[Mean Median Mode Calculator](/statistics/mean-median-mode-calculator/)data setMean
[Z-Score Calculator](/statistics/z-score-calculator/)value, mean and standard deviationZ-score
[Confidence Interval Calculator](/statistics/confidence-interval-calculator/)sample mean, standard deviation and sample sizeConfidence interval
[Mean Calculator](/statistics/mean/)data setMean
[Relative Standard Deviation Calculator](/statistics/relative-standard-deviation-calculator/)data set and data typeRelative standard deviation

Background: descriptive statistics

Population statistics divide by n and sample statistics divide by n − 1 (Bessel's correction), because a sample tends to understate variability. Use the population version when your data is every value in the group, and the sample version when it is a subset.

Defaults differ between tools, and so do quartile conventions, which can give slightly different values for small data sets; this page states the method it uses.

Assumptions and limitations

  • Sample needs at least two values
  • A constant data set has deviation 0

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for data set to confirm this.

Frequently asked questions

What does the Standard Deviation Calculator calculate?

Sample or population standard deviation with variance and mean. It returns Population standard deviation (σ), Variance, Mean and Count.

What formula does the Standard Deviation Calculator use?

s = √(Σ(x − x̄)² ÷ (n − 1)); σ = √(Σ(x − μ)² ÷ n). Two-pass algorithm: compute the mean, then the squared deviations.

What do I need to enter in the standard Deviation Calculator?

You enter Data set and Data type.

How is the result rounded or limited?

IEEE-754 double precision; shown to at most 6 decimal places. Sample needs at least two values.

What are the limits of this calculator?

Sample needs at least two values. A constant data set has deviation 0.

What does the “Data type” option change?

It sets how the standard Deviation is worked out. The choices are Sample (n − 1) and Population (n).

What is an example of a standard Deviation result?

With data set 2, 4, 4, 4, 5, 5, 7, 9 and data type Population (n), the population standard deviation (σ) is 2.

Sources

  • Standard statistics definition (e.g. NIST/SEMATECH e-Handbook of Statistical Methods)

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.