Standard deviation calculator (and variance)

By Jude Wallis · Published

A standard deviation calculator measures how spread out data is: it finds the mean, squares each deviation, divides by n-1 (sample) or n (population) for the variance, then takes the square root. For 4, 7, 8, 10, 16 the sample s is about 4.47 and the population sigma is 4.

sample standard deviation (s)

4.4721

Variance: 20

Steps

  1. 1.n = 5, mean = (4 + 7 + 8 + 10 + 16) / 5 = 9
  2. 2.deviations from the mean: -5, -2, -1, 1, 7
  3. 3.squared deviations: 25, 4, 1, 1, 49
  4. 4.sum of squared deviations = 80
  5. 5.variance = 80 / 4 = 20 (divide by n - 1 for a sample)
  6. 6.standard deviation = sqrt(20) = 4.4721

AP Statistics: Unit 1 (topics 1.7 Summary Statistics for One Quantitative Variable). Standard deviation and variance are Unit 1 topic 1.7 (Summary Statistics for One Quantitative Variable) in the Fall 2026 AP Statistics course, and the sample standard deviation formula with n-1 is on the provided formula sheet.

What standard deviation and variance measure

Standard deviation is a single number that tells you how spread out a data set is. A small standard deviation means the values sit close to the mean; a large one means they are scattered widely. Variance is the same idea one step earlier, it is the standard deviation squared, reported in squared units.

Two data sets can share a mean and still look very different. The values 8, 9, 10 average to 9 with little spread, while 4, 9, 14 also average 9 but vary much more, so the second set has the larger standard deviation. The sample standard deviation is written ss, and the population version is written σ\sigma (say "sigma").

The formula this calculator uses

For a sample, the calculator uses the formula from the AP formula sheet:

s=(xixˉ)2n1s = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n-1}}

Here xix_i is each data value, xˉ\bar{x} (say "x-bar") is the sample mean, and nn is the number of values. The population version replaces the sample mean with the true mean μ\mu (say "mu") and divides by nn instead of n1n-1:

σ=(xiμ)2n\sigma = \sqrt{\frac{\sum (x_i - \mu)^2}{n}}

The quantity inside the square root is the variance. So the sample variance is s2s^2 and the population variance is σ2\sigma^2. Used as a variance calculator, the same tool reports these squared values next to the standard deviations.

Sample vs population: which setting to choose

The only difference between the two formulas is the number you divide by: n1n-1 for a sample and nn for a population. The sample and population toggle on the calculator switches between them.

Choose population only when your data includes every member of the group you care about, such as the scores of all 30 students in one class when that class is the whole group. Choose sample when your data is a subset drawn from a larger group, which covers most real data and every AP problem that asks for ss.

Because n1n-1 is smaller than nn, the sample standard deviation always comes out somewhat larger than the population value for the same numbers, and the gap shrinks as nn grows. When you are unsure, use the sample setting: it is the default a graphing calculator reports as ss or SxSx, and the formula sheet gives only the sample version.

How to use the standard deviation calculator

Enter your data values separated by commas or spaces, then pick the sample or population setting. The calculator runs the same steps you would do by hand.

  1. It finds the mean of your values.
  2. It subtracts the mean from each value and squares the result.
  3. It adds those squared deviations.
  4. It divides by n1n-1 for a sample or nn for a population to get the variance.
  5. It takes the square root to return the standard deviation.

To see the arithmetic written out on a small data set, work through the standard deviation by hand guide. To watch the spread change as you move points around, try the descriptive statistics sandbox.

Reading the result

The standard deviation is in the same units as your data, so you can read it directly: a standard deviation of quiz points is measured in points, not points squared. For roughly bell-shaped data, the empirical rule says about 68% of values fall within one standard deviation of the mean, which gives the number a concrete meaning.

Do not confuse the standard deviation of a data set with the standard error, which measures how much a sample mean varies from sample to sample. The guide on standard error vs standard deviation explains when each one applies.

Standard deviation and variance of five values

Find the sample and population standard deviation of the data set 4, 7, 8, 10, 16, and report the variance for each.

  1. Find the mean: xˉ=4+7+8+10+165=455=9\bar{x} = \frac{4 + 7 + 8 + 10 + 16}{5} = \frac{45}{5} = 9.

  2. Subtract the mean from each value to get the deviations xixˉx_i - \bar{x}: 49=54-9=-5, 79=27-9=-2, 89=18-9=-1, 109=110-9=1, 169=716-9=7. As a check, they sum to 521+1+7=0-5-2-1+1+7=0.

  3. Square each deviation: (5)2=25(-5)^2=25, (2)2=4(-2)^2=4, (1)2=1(-1)^2=1, (1)2=1(1)^2=1, (7)2=49(7)^2=49.

  4. Add the squared deviations: 25+4+1+1+49=8025+4+1+1+49=80.

  5. Divide for the variance. Sample uses n1=4n-1=4: s2=804=20s^2 = \frac{80}{4} = 20. Population uses n=5n=5: σ2=805=16\sigma^2 = \frac{80}{5} = 16.

  6. Take the square root of each variance: sample s=204.4721s = \sqrt{20} \approx 4.4721 and population σ=16=4\sigma = \sqrt{16} = 4.

The sample standard deviation is s=204.47s = \sqrt{20} \approx 4.47 with variance s2=20s^2 = 20. The population standard deviation is σ=4\sigma = 4 with variance σ2=16\sigma^2 = 16. The sample value is larger because it divides by n1=4n-1 = 4 instead of n=5n = 5.

Frequently asked questions

Is variance just the standard deviation squared?

Yes. Variance is the value you get before taking the square root, and standard deviation is its square root. Variance is in squared units, while standard deviation is in the original units, which makes it easier to interpret. For the data set 4, 7, 8, 10, 16, the sample variance is 20 and the sample standard deviation is 204.47\sqrt{20} \approx 4.47.

Should the calculator divide by n or n-1?

Divide by n1n-1 when your data is a sample and by nn when you have the entire population. Most data sets are samples, so n1n-1 is the usual choice, and it is the only version printed on the AP formula sheet. A calculator reports this sample value as ss or SxSx.

Why does the calculator show two different standard deviations?

It reports both the sample value ss (divide by n1n-1) and the population value σ\sigma (divide by nn) so you can pick the right one. The sample value is always slightly larger for the same numbers. Pick the setting that matches your data: a subset of a larger group, or the whole group itself.