Standard deviation calculator

This standard deviation calculator works out how spread out a set of numbers is. Paste your values and read the sample or population standard deviation together with the mean, variance, standard error and coefficient of variation, with the working shown step by step.

Your numbers are calculated in your browser and are not sent or stored.

Standard deviation calculatorOr describe it in Studio →

Use sample when the numbers are a sample from a larger group. This is the usual case in research.

Sample standard deviation

2.1381

Mean
5
Variance
4.5714
Count (n)
8
Sum
40
Sum of squares
32
Standard error (SEM)
0.7559
Coefficient of variation
42.76%
Median
4.5
Min to max
2 to 9

To report

M = 5.00, SD = 2.14, n = 8

Confidence interval of the mean

Levelt × SEMInterval
90%1.895 × 0.7559 = ±1.43223.5678 to 6.4322
95%2.365 × 0.7559 = ±1.78753.2125 to 6.7875
99%3.499 × 0.7559 = ±2.64542.3546 to 7.6454
Frequency table
ValueCountShare
2112.5%
4337.5%
5225%
7112.5%
9112.5%
Show the steps
xx − mean(x − mean)²
2-39
4-11
4-11
4-11
500
500
724
9416

Σ(x − mean)² = 32; ÷ (n − 1) = 7 = 4.5714; √ = 2.1381

Check your result: the SD is never negative and never larger than the range. For the opening data the squared deviations add up to 32, so the sample SD is √(32 ÷ 7) = 2.1381, well below the range of 7. For roughly normal data about two values in three sit within one SD of the mean; here 6 of 8 do.
sample SD of the opening data
2.1381
sample SD of the opening data
population SD of the same eight values
2
population SD of the same eight values
larger: the sample SD at n = 8
6.9%
larger: the sample SD at n = 8
  • Sample (n − 1) or population (n)
  • Mean, variance, SEM, CV, 95% CI
  • Shows every step
  • Paste straight from Excel
  • Runs in your browser, free

01

How to calculate standard deviation

  1. Find the mean of the numbers.
  2. Subtract the mean from each number and square the result.
  3. Add the squares up.
  4. Divide by n − 1 for a sample, or by n for a whole population. This is the variance.
  5. Take the square root.
−2 SD−1 SDmean+1 SD+2 SD68%
What one standard deviation covers. For data that follow a normal curve, about 68% of values lie within one standard deviation of the mean (the shaded band) and about 95% within two. The standard deviation describes this spread of individual values; the standard error is smaller and describes how precisely the mean itself is known.

02

Standard deviation formulas

sample: s = √( Σ(x − x̄)² ÷ (n − 1) )
population: σ = √( Σ(x − μ)² ÷ n )

Dividing by n − 1 (Bessel’s correction) makes up for the fact that a sample’s values sit closer to their own mean than to the true population mean.

03

Worked example

The calculator opens with 2, 4, 4, 4, 5, 5, 7, 9. The mean is 40 ÷ 8 = 5. The squared differences are 9, 1, 1, 1, 0, 0, 4 and 16, which add up to 32.

Divide 32 byVarianceStandard deviation
Population842
Sample74.57142.1381

04

Sample or population?

Use the sample formula when your numbers are some members of a larger group and you want to describe that group: the usual case in experiments and surveys, and what Excel’s STDEV.S and most statistics software report. Use the population formula (STDEV.P) only when you have every member of the group, such as the marks of all students in one class.

05

Standard deviation vs standard error

The standard deviation describes how much individual values vary. The standard error of the mean describes how precisely the mean is known, and shrinks as the sample grows:

SEM = s ÷ √n

Say which one your error bars show. To compare the means of two groups, use the t-test calculator.

06

Confidence interval of the mean

mean ± t × SEM, with t from the t distribution on n − 1 degrees of freedom

The calculator lists the 90%, 95% and 99% intervals. For the example above (n = 8, SEM = 0.7559) the 95% multiplier is t = 2.365, giving 5 ± 1.787, or 3.21 to 6.79.

Many calculators use the normal value 1.96 whatever the sample size, which gives ± 1.482 here: too narrow for eight values. The two only agree for large samples.

07

Coefficient of variation

CV = s ÷ |mean| × 100%

The CV expresses spread relative to the mean, which lets you compare variability between measurements on different scales, such as assay repeatability at low and high concentrations. It is not meaningful when the mean is close to zero.

08

Standard deviation mistakes that change the result

  • Using the population formula on a sample. Dividing by 8 instead of 7 gives 2 instead of 2.1381 for the opening data; the sample SD is 6.9% larger at n = 8 and 22.5% larger at n = 3.
  • Reporting the SEM as the SD. For the opening data the SEM is 0.756, √8 = 2.83 times smaller than the SD of 2.1381, so error bars look 2.83 times tighter.
  • Confusing variance with SD. The sample variance of the opening data is 4.5714 in squared units; the SD, 2.1381, is in the units of the data.

Trust

How this page is checked

  • The calculation runs on code with automated tests against worked reference values. Every number in the examples on this page was produced by that same code, not typed by hand.
  • The formulas and conventions used are stated on the page, so you can reproduce the result yourself or compare it with your own software.
  • Last reviewed by the Sciloom team, Zebra Nine Studio Inc. It is a tool for research and teaching, not a substitute for a statistician, a validated lab method or medical advice.

Cite this page

Sciloom. (2026). Standard deviation calculator. Zebra Nine Studio Inc. https://sciloom.si/standard-deviation-calculator

Read the full methodology · Who makes Sciloom

Frequently asked questions

How do I find the standard deviation of a data set?

Paste the numbers into the calculator. It finds the mean, squares each difference from the mean, averages those squares (dividing by n − 1 for a sample) and takes the square root.

Should I divide by n or n − 1?

Divide by n − 1 when the data are a sample from a larger population, which is the usual case. Divide by n only when the data are the entire population.

What is the difference between variance and standard deviation?

The standard deviation is the square root of the variance. It is in the same units as the data, which makes it easier to interpret.

Can the standard deviation be zero or negative?

It is zero when all values are identical and can never be negative.

Reporting these numbers under a figure? The figure legend generator states n, the centre and the error bars for you.
Free to start, no sign-up.
Back to the tool ↑

More research tools