Standard Deviation Calculator

Find the standard deviation for your data set by entering the numbers in the calculator below. Keep reading to learn how to calculate standard deviation and the formula.

Separate numbers using a comma (,)
Separate numbers using a comma (,)

Results:

Standard Deviation (σ):
 
Variance (σ²):
 
Sum of Squares (SS):
 
Population Size (N):
 
Mean (μ):
 

Steps to Solve

Population Standard Deviation Formula

\sigma = \sqrt{\frac{\sum \left ( x_{i}-\mu \right )^{2}}{N}}

Step One: Find the Mean

The mean is equal to the sum of each observation xi divided by the population size N.

\mu = \frac{\sum_{i=1}^{N}x_{i}}{N}

Step Two: Find the Deviation From the Mean

The deviation from the mean for each observation is equal to its value minus the mean μ.

\text{deviation} = x_{i}-\mu

Step Three: Square the Deviations

Square each deviation from the mean.

\text{squared deviation} = \left ( x_{i}-\mu \right )^{2}

Step Four: Find the Sum of Squares

Add each squared deviation to find the sum of squares.

SS = \sum \left ( x_{i}-\mu \right )^{2}

Step Five: Find the Variance

The variance is equal to the sum of squares SS divided by the population size N.

\sigma^{2} = \frac{SS}{N}

Step Six: Calculate the Standard Deviation

The standard deviation is equal to the square root of the variance σ².

\sigma = \sqrt{\sigma^{2}}
Learn how we calculated this below


On this page:


How to Find the Standard Deviation

In statistics, the standard deviation is a measure of the dispersion or variability between observations in a data set. A smaller standard deviation value indicates that the data are relatively close to the mean, while a higher value suggests that the data are more widely spread out.

Standard deviation is sometimes shortened to SD but is often represented using the symbol σ (the Greek letter sigma) or the letter s for sample data.

A low standard deviation means that the data points in the set are close to the mean, while a higher standard deviation means the data is highly dispersed.

Standard Deviation Formula

The standard deviation is equal to the square root of the variance. However, the formula to calculate the variance is different for a population versus a sample, so there are actually different formulas to calculate the standard deviation for population and sample data sets.

Population Standard Deviation Formula

You can calculate the population standard deviation using the following formula:[1]

\sigma = \sqrt{\frac{\sum \left ( x_{i}-\mu \right )^{2}}{N}}

Thus, the standard deviation for a population σ is equal to the square root of the sum of squares ∑(xi – μ)² divided by the population size N.

Sample Standard Deviation Formula

You can calculate a sample standard deviation using the following formula:[2]

s= \sqrt{\frac{\sum \left ( x_{i}-\bar{x} \right )^{2}}{n-1}}

Thus, the standard deviation for a sample s is equal to the square root of the sum of squares ∑(xi – x̄)² divided by the sample size n minus 1.

Graphic showing the standard deviation formula for a population and a sample.

One thing you might notice that’s different in these formulas is that the standard deviation for a sample divides the sum of squares by n – 1 rather than just n. The reason for this is that when working with a sample, the estimation for the variance and standard deviation includes some amount of bias.

In the formula for a sample, the denominator n – 1 is referred to as degrees of freedom.

Since the sum of squares for a sample is lower than the sum of squares for a population, subtracting one from the sample size artificially increases the SD and variance to account for this bias. This is known as Bessel’s Correction.[3] Bessel’s Correction is more useful for smaller sample sizes, but for large sample sizes that approach the population size, it’s less necessary.

Steps to Calculate the Standard Deviation

We can break down the formulas above to find the standard deviation into six easy steps.[4]

Step One: Calculate the Mean

The first step to finding the standard deviation is to find the mean for the sample or population.

To calculate the mean, sum each observation in the dataset, then divide the result by the sample size or population size.

\text{mean}=\frac{\text{sum of observations}}{\text{count of observations}}

More formally, the mean formula looks more like this:

\mu=\frac{\sum_{i=1}^{N}x_{i}}{N}
\mu=\frac{x_{1}+x_{2}+…+x_{N}}{N}

The mean is equal to the sum of each observation xi divided by the total number of observations N.

Step Two: Calculate the Deviations From the Mean

The next step is to find the deviation from the mean for each value in the data set. The formula below illustrates this:

\text{deviation} = x_{i}-\mu

Step Three: Square Each Deviation

Then, for each deviation from the mean, calculate its square.

\text{squared deviation} = \left ( x_{i}-\mu \right )^{2}

Step Four: Calculate the Sum of Squares

The next step is to find the sum of squares. You can use the sum of squares formula to calculate it.

SS = \sum \left ( x_{i}-\mu \right )^{2}

The sum of squares SS is equal to the sum of the deviations of each value from the mean, squared.

Step Five: Calculate the Variance

Next, using the sum of squares, it’s time to calculate the variance in the data. The formula to calculate the variance for a population and sample is slightly different:

Variance for a Population

The variance for a population is equal to the sum of squares divided by the population size.

\sigma^{2} = \frac{SS}{N}
Variance for a Sample

The variance for a sample is equal to the sum of squares divided by the sample size minus one, or rather, the sum of squares divided by the degrees of freedom.

s^{2} = \frac{SS}{n-1}

Step Six: Calculate the Standard Deviation

Finally, using the variance, you can calculate the standard deviation.

Standard Deviation for a Population
\sigma = \sqrt{\sigma^{2}}
Standard Deviation for a Sample
s = \sqrt{s^{2}}

Thus, the standard deviation is equal to the square root of the variance.

For example, let’s calculate the standard deviation for the sample data [1,3,4,7,8,9].

We’ll use the six steps for the SD calculation shown above.

Step One: Find the mean by adding the values together, then dividing by the sample size.

\bar{x}=\frac{1+3+4+7+8+9}{6}
\bar{x}=\frac{32}{6}=5.33

Step Two: Find the deviations from the mean by subtracting the mean from each sample observation.

Observation Deviation from
1 1 – 5.33 = -4.33
3 3 – 5.33 = -2.33
4 4 – 5.33 = -1.33
7 7 – 5.33 = 1.67
8 8 – 5.33 = 2.67
9 9 – 5.33 = 3.67

Step Three: Square the deviations from the mean by raising each deviation to the power of 2.

Deviation Squared Deviation
-4.33 -4.33² = 18.78
-2.33 -2.33² = 5.44
-1.33 -1.33² = 1.78
1.67 1.67² = 2.78
2.67 2.67² = 7.11
3.67 3.67² = 13.44

Step Four: Find the sum of squares by adding the squared deviations together.

SS = 18.78+5.44+1.78+2.78+7.11+13.44
[formula may scroll beyond screen]
SS = 49.33

Step Five: Find the variance by dividing the sum of squares by the sample size minus 1.

s^{2} = \frac{49.33}{6-1}
s^{2} = 8.22

Step Six: Find the SD by taking the square root of the variance.

s = \sqrt{8.22}
s = 2.87

So, for the data points in this sample, the standard deviation is equal to 2.87.

If you know the standard deviation of the population, then you can also use the central limit theorem to find the sample standard deviation.

References

  1. NIH National Library of Medicine, Standard Deviation, https://www.nlm.nih.gov/nichsr/stats_tutorial/section2/mod8_sd.html
  2. Oja, M., Elementary Statistics for Behavioral and Social Sciences - 3.6: Introduction to Standard Deviations and Calculations, LibreTexts Statistics, https://stats.libretexts.org/Courses/Taft_College/PSYC_2200%3A_Elementary_Statistics_for_Behavioral_and_Social_Sciences_(Oja)/Unit_1%3A_Description/3%3A_Descriptive_Statistics/3.06%3A_Introduction_to_Standard_Deviations_and_Calculations
  3. Oxford College Department of Mathematics and Computer Science, Bessel's Correction, http://math.oxford.emory.edu/site/math117/besselCorrection/
  4. PennState Eberly College of Science, STAT 200 Elementary Statistics - Measures of Spread, https://online.stat.psu.edu/stat200/lesson/2/2.2/2.2.5