CheckCalculators

Standard Deviation Calculator

Enter a list of numbers separated by commas to calculate the standard deviation, variance, mean, sum and margin of error. Choose population or sample, and the calculator shows every step of the working.

The results also include a frequency table, confidence intervals with error bars, and a bell curve graph that marks the 68%, 95% and 99.7% ranges around the mean.

Data typeIt is a

How to use the standard deviation calculator

  1. Type or paste your numbers, separated by commas, spaces or new lines.
  2. Choose Population if your numbers cover the whole group, or Sample if they are only part of a larger group. Press the ? button if you are not sure which applies.
  3. Press Calculate to see the standard deviation and the other results.
  4. Scroll down for the steps, the margin of error table, the frequency table and the graph. Press Clear to start over.

Standard deviation formulas

Standard deviation is the square root of the variance. The only difference between the population and sample versions is whether the sum of squares is divided by N or by N − 1.

Population standard deviation
σ = √( Σ(xi − μ)² / N )

Sample standard deviation
s = √( Σ(xi − x̄)² / (N − 1) )

Mean
μ (or x̄) = Σx / N

Variance
σ² = Σ(xi − μ)² / N          s² = Σ(xi − x̄)² / (N − 1)

Standard error of the mean (SEM)
SEM = σ / √N                 (use s for a sample)

Margin of error
Margin of error = z × SEM
Confidence interval = mean ± margin of error

Here N is the number of values, xi is each value, and Σ means add them all up. The z-score depends on the confidence level you want: 1.960 for 95%, for example.

Population vs sample standard deviation

PopulationSample
Use it whenYour numbers include every member of the groupYour numbers are a subset used to estimate a larger group
Symbolσ (sigma)s
Mean symbolμ (mu)x̄ (x-bar)
Divides the sum of squares byNN − 1
Needs at least1 number2 numbers
ExampleTest scores for every student in a classTest scores for 30 students chosen from a school

A sample tends to cover less of the spread than the full group, so dividing by N − 1 nudges the estimate up to make up for it. With large data sets, N and N − 1 are so close that the two results are almost the same.

Worked example

Take the numbers 10, 12, 23, 23, 16, 23, 21, 16. They add up to 144, and there are 8 of them, so the mean is 144 / 8 = 18. The table shows how far each number is from the mean and the square of that distance.

xx − mean(x − mean)²
10−864
12−636
23525
23525
16−24
23525
2139
16−24
1440192
  • Population: variance σ² = 192 / 8 = 24, so σ = √24 ≈ 4.8990.
  • Sample: variance s² = 192 / 7 ≈ 27.4286, so s = √27.4286 ≈ 5.2372.
  • Margin of error (population): SEM = 4.8990 / √8 ≈ 1.7321, so the 95% margin is 1.960 × 1.7321 ≈ 3.395, giving 18 ± 3.395.

The 68–95–99.7 rule

For data that follows a normal (bell-shaped) distribution, the standard deviation tells you how much of the data to expect around the mean. This is what the shaded areas in the graph show. The last column applies the rule to the worked example (mean 18, σ ≈ 4.899).

RangeShare of dataExample range
μ ± 1σAbout 68.27%13.10 to 22.90
μ ± 2σAbout 95.45%8.20 to 27.80
μ ± 3σAbout 99.73%3.30 to 32.70

Real data is rarely a perfect bell curve, so treat these shares as a rough guide, especially for small or skewed data sets.

Margin of error and confidence levels

A higher confidence level gives a larger z-score and a wider interval. The last column shows the margin of error for the worked example, where the SEM is about 1.7321.

Confidence levelz-scoreMargin of error (example)
68.3%1.000±1.732
90%1.645±2.849
95%1.960±3.395
99%2.576±4.462
99.9%3.291±5.700
99.99%3.891±6.739
99.999%4.417±7.650
99.9999%4.892±8.473

Most studies use a 95% confidence level. The interval comes from z-scores, so it assumes your sample mean is roughly normally distributed. If you have only a handful of values, use a t-distribution for a more accurate interval.

Standard deviation calculator FAQ

What is standard deviation?

Standard deviation measures how spread out a set of numbers is around its mean. A small standard deviation means the numbers sit close to the mean, and a large one means they are spread over a wider range. It is in the same units as the data, which makes it easier to read than variance.

How do I calculate standard deviation?

Find the mean, subtract it from each number, square each difference, add the squares, divide by N for a population or N − 1 for a sample to get the variance, then take the square root. Paste your numbers into the calculator and it does all of this and shows each step.

What is the difference between population and sample standard deviation?

Population standard deviation divides by N and is used when your data includes every member of the group. Sample standard deviation divides by N − 1 and is used when your data is only part of a larger group. The N − 1 correction makes the sample result slightly larger, which offsets the tendency of a sample to underestimate the true spread.

Should I choose population or sample?

If you measured everyone or everything you care about, choose population. If you measured some of them and want to say something about the rest, choose sample. When in doubt, sample is the usual choice in statistics, surveys and experiments.

What is the difference between variance and standard deviation?

Variance is the average of the squared differences from the mean, and standard deviation is its square root. Variance is in squared units (for example, dollars squared), so standard deviation is usually easier to interpret because it uses the same units as your data.

Can standard deviation be negative or zero?

It can never be negative, because it is a square root. It is zero only when every number in the data set is identical, since there is no spread at all.

What counts as a high or low standard deviation?

It depends on the data. Compare the standard deviation with the mean and with the context. A standard deviation of 5 is large for numbers around 10 but small for numbers around 10,000. Dividing the standard deviation by the mean gives the coefficient of variation, which makes comparisons across data sets easier.

What is the margin of error shown in the results?

The calculator divides the standard deviation by the square root of the count to get the standard error of the mean (SEM). The margin of error at a confidence level is the matching z-score multiplied by the SEM, and the interval is the mean plus or minus that margin. The 95% level, with a z-score of 1.960, is the one most often used.

Are the confidence intervals exact?

They are approximate. The calculator uses z-scores and assumes the mean of your data is roughly normally distributed, which works best with larger data sets. For small samples, a t-distribution gives wider and more accurate intervals.

How should I enter my numbers?

Type or paste them separated by commas, spaces or new lines, for example 10, 12, 23, 23, 16. Negative numbers and decimals are fine. You can paste a column straight from a spreadsheet.

Is my data stored?

No. The calculation runs in your browser and nothing is saved, so refreshing the page resets the form.

More calculators

Working with school scores? Try the grade calculator to find a weighted course grade, or browse all calculators.