Skip to main content

Standard Deviation Calculator

Standard Deviation Calculator

Separate the numbers with commas, spaces or new lines – you can paste a column from Excel.

or press Ctrl + Enter
Example
Decimal places

Type or paste a list of numbers to get the sample standard deviation and population standard deviation, variance, mean, median and more – plus the step-by-step working with x − x̄ and (x − x̄)². You can paste a whole column from Excel or Google Sheets. Everything runs in your browser; your data is not uploaded.


How to use the standard deviation calculator​

  1. Enter numbers separated by commas, spaces or new lines, for example 2, 4, 4, 4, 5, 5, 7, 9, or paste a column from a spreadsheet – up to 10,000 values. Then click Calculate or press Ctrl + Enter.
  2. Both results appear side by side: Sample – standard deviation s and variance s² (divided by n − 1), the one to use in most cases; and Population – σ and σ² (divided by n), only when your data is the entire group.
  3. Summary statistics lists the count, sum, mean, median, minimum, maximum, range, coefficient of variation (CV) and standard error (SE).
  4. Calculation steps shows each value’s deviation from the mean, the squared deviations and their sum, then plugs them into the formula.
  5. Choose the Decimal places (2, 4, 6 or all) and click the icon next to a result to copy it.

What is standard deviation?​

Standard deviation measures how spread out a set of numbers is: a small standard deviation means the values sit close to the mean, a large one means they are widely scattered.

ClassScoresMeanStandard deviation (population)
Class A68, 69, 70, 71, 72701.41
Class B50, 60, 70, 80, 907014.14

Both classes average 70, but the standard deviation shows that Class A’s scores are all close together while Class B’s range from very low to very high. Standard deviation is also used for investment risk (volatility of returns), quality control and measurement error.

How to calculate standard deviation by hand​

Take the five numbers 6, 8, 10, 12 and 14:

  1. Find the mean: x̄ = (6 + 8 + 10 + 12 + 14) ÷ 5 = 50 ÷ 5 = 10
  2. Subtract the mean from each value and square the result:
xx − x̄(x − x̄)²
6−416
8−24
1000
1224
14416
Total040
  1. Divide the sum of squares by n − 1 (sample) or n (population) to get the variance:
    • Sample variance s² = 40 ÷ (5 − 1) = 10
    • Population variance σ² = 40 ÷ 5 = 8
  2. Take the square root to get the standard deviation:
    • Sample standard deviation s = √10 ≈ 3.162
    • Population standard deviation σ = √8 ≈ 2.828

The x − x̄ column always adds up to 0 – a quick way to check your work.

Standard deviation formulas​

Sample standard deviation (divide by n − 1):

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

Population standard deviation (divide by N):

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

Here xix_i is each value, xˉ\bar{x} the sample mean, μ\mu the population mean and nn, NN the number of values. The part under the root is the variance (s2s^2 or σ2\sigma^2), so the standard deviation is the square root of the variance.

Sample or population standard deviation?​

  • Population: the data covers everyone or everything you want to describe – for example the test scores of all 30 students in a class, when you only care about that class.
  • Sample: the data is part of a larger group and you want to draw conclusions about the whole – a survey of 100 customers, 10 lab measurements, 12 months of stock returns.

In practice most data is a sample, so when in doubt, use the sample standard deviation. Excel’s STDEV, the sx key on scientific calculators and most statistics software default to it. Use the population version only when the question says “population” or the data is the complete set.

Why divide by n − 1? The sample mean x̄ is calculated from the same data, so the values are on average a little closer to x̄ than to the true population mean μ. Dividing by n would systematically underestimate the variance; dividing by n − 1 (the degrees of freedom) corrects this – it is called Bessel’s correction. With more data the difference shrinks.

Variance, coefficient of variation and standard error​

  • Variance: the square of the standard deviation. Its unit is squared (e.g. cm²), which is why the standard deviation is usually reported instead.
  • Coefficient of variation (CV): standard deviation ÷ mean × 100%. It compares the spread of data with different units or sizes, such as height in cm and weight in kg. It is meaningless when the mean is close to 0.
  • Standard error (SE): sample standard deviation ÷ √n – how precise the sample mean itself is. Bigger samples give smaller standard errors.

Standard deviation in Excel and Google Sheets​

What you needExcelGoogle SheetsCalculator key
Sample standard deviationSTDEV.S (STDEV)STDEV, STDEV.Ssx, σn−1
Population standard deviationSTDEV.P (STDEVP)STDEVP, STDEV.Pσx, σn
Sample varianceVAR.SVAR, VAR.S—
Population varianceVAR.PVARP, VAR.P—
MeanAVERAGEAVERAGEx̄
MedianMEDIANMEDIAN—

For data in A1 to A10, =STDEV.S(A1:A10) gives the sample standard deviation.

Reading standard deviation: the 68–95–99.7 rule​

If the data is roughly normally distributed (a bell curve), about:

  • 68% of values lie within 1 standard deviation of the mean
  • 95% within 2 standard deviations
  • 99.7% within 3 standard deviations

For a test with a mean of 70 and a standard deviation of 10, about 68% of students score between 60 and 80 and about 95% between 50 and 90; a score of 95 is 2.5 standard deviations above the mean – an outstanding result. (How many standard deviations a value is from the mean is its z-score.)

FAQ​

What is the difference between sample and population standard deviation?​

The variance is divided by n − 1 for a sample and by n for a population. Use the sample standard deviation when your data is part of a larger group you want to generalise to, and the population standard deviation only when the data is the entire group. Most real data is a sample, so use the sample version when in doubt.

Why does the sample standard deviation divide by n − 1?​

Because the sample mean is computed from the same data, the values are slightly closer to it than to the true population mean, so dividing by n underestimates the variance. Dividing by n − 1 (the degrees of freedom) corrects this bias – Bessel’s correction. The difference gets smaller as n grows.

What is the difference between standard deviation and variance?​

The variance is the average squared distance from the mean; the standard deviation is its square root. The standard deviation is in the same unit as the data (points, cm), which makes it easier to interpret; the variance is in squared units and is mostly used in formulas.

How do I calculate standard deviation in Excel?​

Use =STDEV.S(range) for the sample standard deviation and =STDEV.P(range) for the population standard deviation; the older STDEV and STDEVP work the same way. For variance use VAR.S and VAR.P. You can also paste the column into this calculator to see both results and the working.

What does a high standard deviation mean?​

It means the values are more spread out and differ more from each other. Two classes can both average 70, but a class with a standard deviation of 14 has far bigger differences between students than one with 1.4. In investing, a higher standard deviation of returns means more volatility and risk. The smallest possible value is 0, when all values are equal.

Other math tools