Skip to content
ScienceQuest
Maths & Data Calculator Undergraduate

Standard Deviation Calculator

Paste a column of measurements for mean, sample and population standard deviation, SEM, quartiles, a 95% confidence interval and outlier flags.

Calculator

7 values read.

Mean
12.5
n
7
Sample SD
Denominator n − 1. Use this when your data is a sample of a larger population, which is almost always.
0.26458
SEM
Standard error of the mean, SD / √n. Describes uncertainty in the mean, not spread of the data.
0.1

Centre

Mean
12.5
Median
12.5
Sum
87.5

Spread

Sample SD (n−1)
0.264575
Population SD (n)
0.244949
Sample variance
0.07
Coefficient of variation
2.117%
Range
0.8

Uncertainty in the mean

SEM
0.1
95% CI half-width
0.2447
t critical (95%)
2.447
Reported value
12.5 ± 0.2

Quartiles

Minimum
12.1
Q1 (25%)
12.35
Q3 (75%)
12.65
Maximum
12.9
IQR
0.3

Citing this tool

Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.

Teaching with this? You can put it on a class page or LMS for free, with no ads inside the frame. Get the embed code.

The equation

s=∑i(xi−xˉ)2n−1s = \sqrt{\frac{\sum_i (x_i - \bar{x})^2}{n-1}}

Pearson (1894), standard deviation

Sample and population standard deviation

Standard deviation summarises how far the values in a set sit from their mean. Both versions start the same way: subtract the mean from each value, square the differences, and add them up. They differ in the divisor. The population standard deviation divides that sum by n and describes a set that is the whole thing being measured. The sample standard deviation divides by n - 1 and estimates the spread of a larger population from a subset of it.

The n - 1 divisor exists because the sample mean is itself estimated from the same data, and deviations taken from it are on average slightly too small. Dividing by n - 1 removes that bias from the variance, and most of it from the standard deviation. The gap matters most at small n: at n = 5 the sample figure is about 12 percent larger, while at n = 100 the difference is under one percent. Laboratory replicates are nearly always a sample, so n - 1 is the default here.

Worked example

Take the set 2, 4, 4, 4, 5, 5, 7, 9.

  • mean = 40 / 8 = 5
  • Squared deviations: 9, 1, 1, 1, 0, 0, 4, 16, which sum to 32.
  • Population standard deviation: sqrt(32 / 8) = 2.000
  • Sample standard deviation: sqrt(32 / 7) = 2.138
  • Standard error of the mean: 2.138 / sqrt(8) = 0.756

Standard deviation and standard error answer different questions. Standard deviation describes the spread of the observations and does not shrink as more of them are collected, because the underlying variability is a property of the system. Standard error describes how precisely the mean has been located and falls as 1 / sqrt(n), so quadrupling the number of measurements halves it.

Interpreting the numbers

A 95 percent confidence interval for the mean is mean ± t × SEM, and for small samples the multiplier is not 1.96. That value is the large-sample limit. At n = 5 the correct multiplier from the t distribution is 2.776, so using 1.96 makes the interval about 30 percent narrower than it should be, which overstates the strength of the result.

The conventional outlier fence sits at 1.5 times the interquartile range beyond the first and third quartiles. A point outside it is a prompt to check the pipetting, the instrument log and the sample identity. It is not a licence to delete the point. An outlier removed without an identified cause is a decision about the conclusion, not about the data.

Common mistakes

  • Using the population formula on sample data. Three replicates divided by n rather than n - 1 understate the spread by about 18 percent.
  • Quoting standard error as if it were spread. Error bars drawn from standard error look reassuringly tight but say nothing about how variable the measurements were. Label which one a figure shows.
  • Applying 1.96 to small samples. Use the t multiplier for the relevant degrees of freedom whenever n is below about 30.
  • Deleting outliers without cause. Record the value, investigate it, and report the analysis both with and without it if the conclusion changes.

Common questions

Should I divide by n or by n − 1?

Use n − 1 for the sample standard deviation, which is nearly always what you want, because you are estimating the spread of a wider population from a limited sample. Dividing by n systematically underestimates that spread. Use n only when your data genuinely is the entire population.

What is the difference between SD and SEM?

Standard deviation describes how spread out the individual measurements are and does not shrink as you collect more data, while standard error describes how precisely you know the mean and falls as 1/√n. Quote SD to describe variability, SEM or a confidence interval to describe confidence in the average.

Why is the confidence interval based on t rather than 1.96?

Because 1.96 assumes you know the population standard deviation, which you do not when estimating it from a small sample. At n = 5 the correct multiplier is 2.776, so using 1.96 would understate the interval by roughly 30 percent. This tool uses the t value for your degrees of freedom.