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.

Paste numbers separated by spaces, commas or new lines, for example a column copied from Excel.

These values are

Sample SD divides by n − 1. Use it when the data are a sample from a larger group, which is almost always the case in research.

Confidence level

Load a worked example

Sample standard deviation (s)

0.819

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
Deviation of each value from the mean
#xx − x̄(x − x̄)²
113.200−0.5300.281
214.1000.3700.137
312.800−0.9300.865
415.0001.2701.613
513.700−0.0300.001
612.500−1.2301.513
714.4000.6700.449
813.9000.1700.029
913.100−0.6300.397
1014.6000.8700.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

  1. Paste your data. Separate the numbers with spaces, commas or new lines. A column copied from Excel or Google Sheets works as it is.
  2. 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.
  3. 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