Standard Deviation Calculator
Paste a list of numbers to get the sample standard deviation (s, dividing by n − 1) and the population standard deviation (σ, dividing by n), with the variance, mean, median, standard error, a confidence interval for the mean and a table of the deviations from the mean, so you can check each step by hand.
Sample standard deviation (s)
Mean 13.730 from 10 values. Divides by n − 1.
- Count (n)
- 10
- Mean
- 13.730
- Median
- 13.800
- Sample SD (s)
- 0.819
- Population SD (σ)
- 0.777
- Sample variance (s²)
- 0.671
- Population variance (σ²)
- 0.604
- Standard error (SEM)
- 0.259
- 95% CI for the mean
- 13.144 to 14.316
- Coefficient of variation
- 5.97%
- sample SD / mean
- Minimum to maximum
- 12.500 to 15.000
- range 2.500
- Q1 to Q3
- 13.125 to 14.325
- IQR 1.200
- Sum
- 137.300
- Sum of squares Σ(x − x̄)²
- 6.041
Step by step: deviations from the mean
| # | x | x − x̄ | (x − x̄)² |
|---|---|---|---|
| 1 | 13.200 | −0.530 | 0.281 |
| 2 | 14.100 | 0.370 | 0.137 |
| 3 | 12.800 | −0.930 | 0.865 |
| 4 | 15.000 | 1.270 | 1.613 |
| 5 | 13.700 | −0.030 | 0.001 |
| 6 | 12.500 | −1.230 | 1.513 |
| 7 | 14.400 | 0.670 | 0.449 |
| 8 | 13.900 | 0.170 | 0.029 |
| 9 | 13.100 | −0.630 | 0.397 |
| 10 | 14.600 | 0.870 | 0.757 |
Σ(x − x̄)² = 6.041. Sample variance = 6.041 / 9 = 0.671, so s = √0.671 = 0.819. Population variance = 6.041 / 10 = 0.604, so σ = 0.777.
Report it like this
The 10 values had a mean of 13.730 (SD = 0.819, SEM = 0.259; 95% CI 13.144 to 14.316), CV 6.0%.
How to use the calculator
- Paste your data. Separate the numbers with spaces, commas or new lines. A column copied from Excel or Google Sheets works as it is.
- Choose sample or population. Research data are almost always a sample, so the default is the sample standard deviation. Switch to population only when your list holds every member of the group you want to describe, such as all the students in one class.
- Read the result. The headline is the standard deviation you chose; the grid shows both versions with the variance, standard error and the rest. Open the step-by-step table to see each deviation from the mean.
Standard deviation formula
s = √[Σ(x − x̄)² / (n − 1)] σ = √[Σ(x − μ)² / N]
To calculate the standard deviation by hand: find the mean, subtract it from each value, square each difference, add the squares up (the sum of squares), divide by n − 1 for a sample or by N for a population (that gives the variance), and take the square root.
The sample formula divides by n − 1 (Bessel’s correction) because deviations from the sample mean are a little smaller than deviations from the unknown population mean. Dividing by n − 1 makes the variance unbiased. With large samples the two versions are almost the same; with 5 or 10 values the difference is noticeable.
Excel’s STDEV.S (and the older STDEV), R’s sd() and SPSS report the sample standard deviation. STDEV.P and NumPy’s default np.std() give the population version.
Worked examples
- Textbook example: for 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5 and the squared deviations add up to 32. The population SD is √(32 / 8) = 2.000 and the sample SD is √(32 / 7) = 2.138.
- Hemoglobin of 10 patients (the default): mean 13.73 g/dL, sum of squares 6.041, sample variance 6.041 / 9 = 0.671, so s = 0.819 g/dL. The standard error is 0.819 / √10 = 0.259 and the 95% CI for the mean is 13.14 to 14.32.
- A whole class of 8 (population): exam scores 72, 85, 90, 66, 78, 88, 95, 70 have mean 80.5 and σ = 9.85. If the same 8 scores were a sample from a larger cohort, s = 10.53.
Standard deviation, variance and standard error
The standard deviation describes how spread out the individual values are, in the same units as the data. For roughly normal data, about 68% of values lie within one SD of the mean and about 95% within two SDs.
The variance is the square of the SD. It is used in calculations (ANOVA, power analysis, pooled SDs) but is hard to read because its units are squared.
The standard error of the mean (SEM = SD / √n) describes how precisely the sample mean estimates the population mean. It shrinks as the sample grows, while the SD does not. Use the SD to describe your sample and the SEM or a confidence interval to show the uncertainty of the mean; the confidence interval calculator also covers proportions and differences between groups.
To compare spread between variables measured on different scales, divide the SD by the mean: that is the coefficient of variation, which the coefficient of variation calculator gives as a percentage.
How to report a standard deviation
Give the mean and SD together with the sample size, using the same number of decimals for both. In APA style, write M and SD in italics:
Mean hemoglobin was 13.73 g/dL (SD = 0.82, n = 10).
Most journals ask for “mean (SD)” or “mean ± SD” in tables; say which one you use in the table footnote. Do not label a standard error as an SD, because the SEM is always smaller and makes data look less variable than they are. If you compare two group means next, the t-test calculator takes the means, SDs and sample sizes directly.
Questions
- How do you calculate standard deviation?
- Find the mean, subtract it from each value and square the result, add up the squares, divide by n − 1 (or by n for a whole population) to get the variance, then take the square root. For 2, 4, 4, 4, 5, 5, 7, 9 the squares add up to 32, so the sample SD is √(32 / 7) = 2.14.
- Should I use the sample or the population standard deviation?
- Use the sample standard deviation (dividing by n − 1) whenever your data are a sample and you want to describe or generalise to a larger group, which covers nearly all research. Use the population standard deviation only when you have measured every member of the group you are describing.
- What is the difference between standard deviation and standard error?
- The standard deviation measures how much individual values vary around the mean. The standard error of the mean, SD divided by the square root of n, measures how precisely the mean itself is estimated, and it gets smaller as the sample grows.
- What is the difference between variance and standard deviation?
- The variance is the average squared deviation from the mean, and the standard deviation is its square root. The SD is in the same units as the data, which makes it easier to interpret; the variance is used inside calculations such as ANOVA.
- Which Excel function gives the standard deviation?
- STDEV.S gives the sample standard deviation and matches this calculator’s default. STDEV.P gives the population standard deviation. VAR.S and VAR.P give the matching variances.
- What is a good or a high standard deviation?
- There is no universal cut-off, because the SD depends on the units and the scale of the data. Judge it against the mean, against previous studies of the same measure, or with the coefficient of variation, which expresses the SD as a percentage of the mean.
Sources
- Altman DG, Bland JM. Standard deviations and standard errors. BMJ 2005;331(7521):903. doi:10.1136/bmj.331.7521.903
- Hyndman RJ, Fan Y. Sample quantiles in statistical packages. Am Stat 1996;50(4):361–365. doi:10.1080/00031305.1996.10473566
- NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.5.6: Measures of scale
- American Psychological Association. Publication Manual of the American Psychological Association, 7th ed. 2020: statistical abbreviations and symbols
Calculations run in your browser; nothing you enter is sent or stored. Results are checked against SciPy and statsmodels in our test suite. Last updated 29 November 2026.