Skip to content
ScienceQuest

Standard Deviation Calculator

CalculatorUndergraduate Updated

Support ScienceQuest on Buy Me a Coffee (opens in a new tab)

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
Cite this tool

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

What is the sample standard deviation formula?

The sample standard deviation formula measures how widely a sample’s values spread about their mean: s = √([∑ (xi − x̄)2] / (n − 1)), where xi are the individual sample values, x̄ is the sample mean, and n − 1 is the degrees of freedom (Bessel’s correction, which makes the variance s2 an unbiased estimate).

Sample and population standard deviation

The two versions start the same way: subtract the mean from each value, square the differences and add them up. The population standard deviation divides that sum by n and describes a data set that is the whole population. The sample standard deviation divides by n - 1 and estimates the spread of a larger population from a subset of it.

The sample mean is estimated from the same data, so deviations measured 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

The standard deviation describes the spread of the observations and does not shrink as you collect more of them, because the variability belongs to the system being measured. The standard error describes how precisely you have located the mean 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. The familiar 1.96 is the large-sample limit of that multiplier. At n = 5, with 4 degrees of freedom, the multiplier from the t distribution is 2.776, so using 1.96 makes the interval about 30 percent narrower than it should be and overstates the strength of the result.

The conventional outlier fence sits at 1.5 times the interquartile range beyond the first and third quartiles, and the calculator lists any value outside it as a possible outlier. Treat that as a prompt to check the pipetting, the instrument log and the sample identity. Removing the value without an identified cause can change the conclusion with no evidence that the measurement was wrong.

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 are narrower than the spread of the measurements by a factor of sqrt(n). 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.