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
- Type data set, for example 4, 8, 15, 16, 23, 42.
- Choose data type: Sample (n − 1) and Population (n).
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Data set | Text, such as 4, 8, 15, 16, 23, 42 | — |
| Data type | Choose 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).
| Result | Value |
|---|---|
| Population standard deviation (σ) | 2 |
| Variance | 4 |
| Mean | 5 |
| Count | 8 |
Example 2
Inputs: Data set = 2, 4, 4, 4, 5, 5, 7, 9; Data type = Sample (n − 1).
| Result | Value |
|---|---|
| Sample standard deviation (s) | 2.13809 |
| Variance | 4.571429 |
| Mean | 5 |
| Count | 8 |
Example 3
Inputs: Data set = 3 3 3; Data type = Sample (n − 1).
| Result | Value |
|---|---|
| Sample standard deviation (s) | 0 |
| Variance | 0 |
| Mean | 3 |
| Count | 3 |
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.
| Type | Standard deviation | Variance |
|---|---|---|
| Population (n) | 2 | 4 |
| Sample (n − 1) | 2.13809 | 4.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.
| Calculator | You enter | It returns |
|---|---|---|
| [Mean Median Mode Calculator](/statistics/mean-median-mode-calculator/) | data set | Mean |
| [Z-Score Calculator](/statistics/z-score-calculator/) | value, mean and standard deviation | Z-score |
| [Confidence Interval Calculator](/statistics/confidence-interval-calculator/) | sample mean, standard deviation and sample size | Confidence interval |
| [Mean Calculator](/statistics/mean/) | data set | Mean |
| [Relative Standard Deviation Calculator](/statistics/relative-standard-deviation-calculator/) | data set and data type | Relative 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.
Related calculators
- 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).
- Mean Calculator — Mean of a data set.
- Relative Standard Deviation Calculator — Relative standard deviation (RSD) as a percentage.
- Mean Absolute Deviation Calculator — Average distance of values from the mean.
- Mean Median Mode Range Calculator — Mean, median, mode and range of a data set.
- Median Calculator — Median of a data set.
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.