Statistics

Standard Deviation Calculator

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is a standard deviation calculator?

A standard deviation calculator measures how spread out a set of numbers is around their mean. Enter your data points and the calculator instantly reports the count, the mean, the variance, and the standard deviation — for both the population and a sample interpretation of your data. A small standard deviation means the values cluster tightly around the average; a large one means they are widely scattered.

Standard deviation is one of the most widely used measures of dispersion in statistics. It appears everywhere from quality control and finance (where it is often called volatility) to test-score analysis and scientific research, because it expresses variability in the same units as the original data.

Population versus sample

There are two closely related versions of variance and standard deviation, and choosing the right one matters.

  • Population statistics describe a complete data set — every member you care about is included. The population variance divides the sum of squared deviations by the count NN, and its symbols are σ2\sigma^2 (variance) and σ\sigma (standard deviation).
  • Sample statistics describe a smaller subset drawn from a larger population, and you want to estimate the spread of that whole population from the sample. The sample variance divides by n1n - 1 instead of nn (this is known as Bessel’s correction), which corrects the bias that arises from using the sample mean instead of the unknown true mean. Its symbols are s2s^2 (variance) and ss (standard deviation).

Because dividing by the smaller n1n - 1 produces a slightly larger result, the sample standard deviation is always greater than or equal to the population standard deviation for the same data. The sample version requires at least two data points; with a single value there is no spread to estimate.

How does it work?

The population standard deviation is the square root of the average squared distance of each value from the mean:

σ=1Ni=1N(xiμ)2\sigma = \sqrt{\frac{1}{N}\sum_{i=1}^{N} (x_i - \mu)^2}

where μ\mu is the population mean and NN is the number of values. The sample standard deviation uses the sample mean xˉ\bar{x} and divides by n1n - 1:

s=1n1i=1n(xixˉ)2s = \sqrt{\frac{1}{n-1}\sum_{i=1}^{n} (x_i - \bar{x})^2}

The calculation follows four steps:

  1. Find the mean by adding all values and dividing by how many there are.
  2. Find each deviation by subtracting the mean from every value.
  3. Square each deviation and add the squares together.
  4. Divide by NN (population) or n1n - 1 (sample), then take the square root to get the standard deviation. Skipping the square root leaves you with the variance.

Worked example

Consider the data set 2,4,4,4,5,5,7,92, 4, 4, 4, 5, 5, 7, 9, which has N=8N = 8 values.

First, the mean:

μ=2+4+4+4+5+5+7+98=408=5\mu = \frac{2 + 4 + 4 + 4 + 5 + 5 + 7 + 9}{8} = \frac{40}{8} = 5

Next, the squared deviations from the mean of 55 are 9,1,1,1,0,0,4,169, 1, 1, 1, 0, 0, 4, 16, which sum to 3232. The population variance and standard deviation are:

σ2=328=4σ=4=2\sigma^2 = \frac{32}{8} = 4 \qquad \sigma = \sqrt{4} = 2

Treating the same numbers as a sample instead, divide the sum of squares by n1=7n - 1 = 7:

s2=3274.5714s=4.57142.1381s^2 = \frac{32}{7} \approx 4.5714 \qquad s = \sqrt{4.5714} \approx 2.1381

As expected, the sample standard deviation 2.13812.1381 is larger than the population standard deviation 22.

For a smaller set such as 1,2,3,4,51, 2, 3, 4, 5, the mean is 33, the sum of squared deviations is 1010, the population standard deviation is 21.4142\sqrt{2} \approx 1.4142, and the sample standard deviation is 2.51.5811\sqrt{2.5} \approx 1.5811.

Practical notes

Use the population formula when your numbers represent the entire group you are analyzing — for example, the test scores of every student in a single class when that class is all you care about. Use the sample formula when your numbers are a subset used to infer something about a larger group, which is the common case in surveys, experiments, and most real-world statistics.

Standard deviation pairs naturally with the average and with interval estimates such as the confidence interval, which uses the standard deviation and sample size to bound the true mean. It also underlies the critical values used in hypothesis testing.

Frequently asked questions

What is the difference between variance and standard deviation?

Variance is the average of the squared deviations from the mean, expressed in squared units. Standard deviation is the square root of the variance, which returns the measure to the original units of the data and makes it easier to interpret.

Should I use the population or sample standard deviation?

Use the population version (σ\sigma, divide by NN) when your data covers the entire group of interest. Use the sample version (ss, divide by n1n - 1) when your data is a sample from a larger population and you want an unbiased estimate of that population’s spread.

Can the standard deviation be zero or negative?

It can be zero, which happens only when every value in the data set is identical — there is no spread. It can never be negative, because it is the square root of a sum of squared (non-negative) terms.

Report a bug

This field is required.