Standard Deviation Calculator, Sample & Population SD

Calculate sample or population standard deviation from any data set. The Standard Deviation Calculator shows the deviation table and every step of the working.

01 calculator

0 values read

Results update as you type. No submit button.

Result

    Show the working

      The Standard Deviation Calculator measures how far the values in a data set sit from their mean, returning either the sample standard deviation or the population standard deviation depending on what the data represents. Paste values separated by commas, spaces or line breaks, and the calculator returns the result alongside the variance, the mean, the sum of squares and a step table showing every deviation it used.

      The step table matters more than the number. Most people arriving here need to reproduce the calculation by hand for coursework, and a result without the working teaches nothing.

      Calculate standard deviation from a data set

      Concept diagram: Inputs leads to standard deviation from a data set leads to ResultInputsstandard deviation froma data setResult
      Calculate standard deviation from a data set.

      Standard deviation answers one question: how spread out is this data? A small standard deviation means the values cluster tightly around the mean. A large one means they scatter. Two data sets can share an identical mean and describe completely different situations, and the standard deviation is what separates them.

      Paste your values into the data field. Commas, spaces, tabs and line breaks all work, so a column copied straight out of a spreadsheet needs no reformatting. The calculator reports how many values it read directly beneath the field, check that count against what you pasted before reading the result, because a stray character is the most common cause of a wrong answer.

      The calculator then sorts the data, computes the mean, and works outward from there. Every intermediate value is shown, so you can follow along or verify a hand calculation at any step.

      Choose between sample and population

      Concept diagram: Inputs leads to between sample and population leads to ResultInputsbetween sample andpopulationResult
      Choose between sample and population.

      This choice changes the answer, and it is the one thing on this page worth getting right before anything else. The two formulas differ only in their denominator, but on small data sets the gap is substantial. Use population standard deviation (σ) when your data includes every member of the group you want to describe.

      The test scores of all 24 students in one class, when the class is what you care about. Every measurement from a completed batch. The denominator is N, the full count.

      Use sample standard deviation (s) when your data is a subset drawn from a larger group, and you want to estimate that larger group's spread. A survey of 200 voters standing in for a national electorate. Thirty measured components representing a production run. The denominator is n − 1.

      Sample is the more common case in practice, which is why this calculator defaults to it. Most real data is a sample of something, and treating a sample as a population produces a figure that is systematically too small.

      If you are working from a textbook problem, the question almost always says which one it wants. Look for the words "population" or "sample", or for a phrase like "all of the" versus "a random selection of".

      Apply the standard deviation formula

      Formula s = √(Σ(x − x̄)² / (n − 1)), with variables: x is value, x̄ is mean, s is deviations = √(Σ(x − x̄)² / (n − 1))xvaluemeansdeviation
      Apply the standard deviation formula.

      Both formulas follow the same five steps and diverge only at the fourth.

      Population:   σ = √( Σ(x − x̄)² / N )
      Sample:       s = √( Σ(x − x̄)² / (n − 1) )

      Working through it:

      1. Find the mean. Add every value and divide by the count. 2. Find each deviation. Subtract the mean from each value. Some are negative. 3. Square each deviation. This removes the negatives and gives more weight to values far from the mean. The total is the sum of squares. 4. Divide. By N for a population, by n − 1 for a sample. The result is the variance. 5. Take the square root. This returns the answer to the original units.

      Step 3 is where the negatives disappear, and step 5 is why the square root exists at all. Squaring the deviations pushes the result into squared units, squared marks, squared centimetres, which cannot be interpreted directly. The square root brings it back to something comparable with the original measurements.

      Calculate standard deviation for 2, 4, 4, 4, 5, 5, 7, 9

      Concept diagram: Inputs leads to standard deviation for 2, 4, 4, 4,… leads to ResultInputsstandard deviation for2, 4, 4, 4,…Result
      Calculate standard deviation for 2, 4, 4, 4, 5, 5, 7, 9.

      This eight-value set gives a population standard deviation of exactly 2 and a sample standard deviation of 2.138. Every step below can be checked by hand. 1. Find the mean. 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40 40 ÷ 8 = 5

      2. Find each deviation and square it.

      xx − x̄(x − x̄)²
      2−39
      4−11
      4−11
      4−11
      500
      500
      724
      9416
      Σ = 0Σ = 32

      3. Divide, then take the square root.

      Population: 32 ÷ 8 = 4, and √4 = 2 Sample: 32 ÷ 7 = 4.571, and √4.571 = 2.138

      Two things to notice. The deviations column sums to exactly zero, and it always will, that is a property of the mean and a useful check that you have not made an arithmetic slip. And the two answers differ by 6.9% on eight values. That gap is not rounding. It is the correction described in the next section.

      Read the deviation step table

      Process with 3 steps: Enter deviation step table; Read the main result; Check the breakdown1Enter deviation steptable2Read the main result3Check the breakdown
      Read the deviation step table.

      The step table lists every value, its deviation from the mean, and that deviation squared, with column totals at the bottom. The calculator builds it for whatever data you enter. Read it left to right and the whole formula is visible.

      The middle column shows which values pull the mean up and which pull it down, and it always totals zero. The right column shows which values dominate the result, in the example above, the single value of 9 contributes 16 of the 32 total, half the spread from one observation out of eight.

      That last observation is worth sitting with, because it explains why standard deviation is sensitive to outliers. Squaring means a value three units from the mean contributes nine times as much as a value one unit away. One extreme observation can move the result substantially, which is why a boxplot or a look at the raw data should accompany any standard deviation you rely on.

      For data sets over 30 values the table collapses to the first and last five rows with the totals intact. The full table remains available and copies as tab-separated values for pasting into a spreadsheet or a report.

      Understand why the sample formula divides by n − 1

      Formula result = f(inputs), with variables: in is inputs, f is formula, out is resultresult = f(inputs)ininputsfformulaoutresult
      Understand why the sample formula divides by n − 1.

      This is the most-asked question about standard deviation, and the usual answer, "it corrects for bias", explains nothing. Here is what is actually happening. When you calculate a sample standard deviation, you do not know the population mean. You use the sample mean instead.

      But the sample mean is calculated *from those same values*, which means it sits closer to them than the true population mean does. It is, by construction, the point that minimises the sum of squared deviations for that particular sample.

      So every deviation you measure is slightly too small. Not randomly too small, systematically, in one direction, every time. Dividing by n gives a variance that consistently underestimates the population variance.

      Dividing by n − 1 instead compensates for that. The adjustment is called Bessel's correction, and the n − 1 is the degrees of freedom: once the mean is fixed, only n − 1 of the deviations can vary independently, because the last one is forced by the requirement that they sum to zero.

      The size of the correction depends entirely on sample size:

      Sample sizeDifference between dividing by n − 1 and n
      525% larger variance
      1011%
      303.4%
      1001.0%
      1,0000.1%

      At n = 5 the choice changes the answer materially. Past a few hundred values it stops mattering in any practical sense. That is why the distinction is drilled in introductory courses, where the examples are small, and why practitioners working with large data sets rarely think about it.

      Interpret a standard deviation value

      Concept diagram: Inputs leads to Interpret a standard deviation value leads to ResultInputsInterpret a standarddeviation valueResult
      Interpret a standard deviation value.

      A standard deviation on its own means little. It is expressed in the units of the original data, so a value of 12 could be enormous or trivial depending on what is being measured and what the mean is. Two ways to give it context.

      Compare it to the mean. The coefficient of variation divides the standard deviation by the mean and expresses the result as a percentage. A standard deviation of 12 against a mean of 500 is a CV of 2.4%, which is tight. Against a mean of 20, it is 60%, which is enormous. The CV also lets you compare spread between data sets measured in different units, which a raw standard deviation cannot.

      Use the empirical rule. For data that follows an approximately normal distribution, about 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. So a test with a mean of 70 and a standard deviation of 8 puts roughly two thirds of students between 62 and 78, and a score of 94, three standard deviations up, in the top 0.15%.

      The empirical rule only holds for roughly normal data. On strongly skewed distributions it breaks down badly, and income data is the standard example: the mean sits above the median, the distribution has a long right tail, and "within two standard deviations" stops describing 95% of anything. Check the shape of your data with a histogram before leaning on the rule.

      Calculate the standard error of the mean

      Histogram of 7 bins with the mean markedmean
      Calculate the standard error of the mean.

      The standard error measures the precision of the mean itself, rather than the spread of the individual values. It answers a different question: if this sample were drawn again, how much would the mean move?

      SE = s / √n

      For the example set, SE = 2.138 ÷ √8 = 0.756.

      Note the √n in the denominator. Quadrupling the sample size halves the standard error, which is the mathematical reason larger samples give more reliable estimates, and the reason the returns diminish. Going from 100 to 400 observations halves the uncertainty in the mean. Going from 400 to 800 improves it by only 29%.

      The standard error is what confidence intervals are built from, and it is the figure to quote when reporting how well a sample mean pins down a population mean.

      Use standard deviation in practice

      Concept diagram: Inputs leads to standard deviation in practice leads to ResultInputsstandard deviation inpracticeResult
      Use standard deviation in practice.

      Four places the measure does real work, and what a change in it actually signals. Quality control. A production line is monitored on the standard deviation of a measured dimension, not just its average. A process can hold a perfect mean while the spread widens, and widening spread means more parts falling outside tolerance.

      Control charts flag a rising standard deviation before any individual part fails inspection.

      Test scores and grading. Standard deviation converts a raw score into a position. A 78 means nothing until you know the mean is 65 and the standard deviation is 7, at which point the score is nearly two standard deviations above average. This is exactly the calculation a z-score performs.

      Investment risk. Volatility is the standard deviation of returns. Two funds averaging 8% annually are not equivalent investments if one has a standard deviation of 3% and the other 22%, the second will produce years that test an investor's nerve, and sequence of returns matters for anyone drawing income.

      Measurement and instrumentation. Repeated measurements of the same quantity scatter, and their standard deviation quantifies the instrument's precision. It is how a laboratory states uncertainty, and how two instruments measuring the same thing are compared.

      Frequently asked questions

      What is standard deviation?

      Standard deviation measures how far the values in a data set typically sit from their mean, expressed in the same units as the original data. A small standard deviation means values cluster near the mean; a large one means they scatter widely. It is calculated by squaring each deviation from the mean, averaging those squares, and taking the square root.

      Should I use sample or population standard deviation?

      Use population standard deviation when your data covers every member of the group you are describing, and divide by N. Use sample standard deviation when your data is a subset representing a larger group, and divide by n − 1. Sample is more common in practice, since most real data is a sample of something. Textbook questions almost always specify which is wanted.

      Why does the sample formula divide by n − 1?

      Because the sample mean is calculated from the same values you are measuring deviations against, it sits closer to them than the true population mean does. Every deviation is therefore systematically too small, and dividing by n would consistently underestimate the population variance. Dividing by n − 1, known as Bessel's correction, compensates. At n = 10 it makes an 11% difference; at n = 1,000, 0.1%.

      What is a good standard deviation?

      There is no universally good value, because standard deviation carries the units of the data. Judge it against the mean using the coefficient of variation: a standard deviation that is 5% of the mean indicates tight data, while 50% indicates wide scatter. What counts as acceptable depends entirely on the field, a manufacturing tolerance and a set of survey responses have very different expectations.

      How is standard deviation different from variance?

      Variance is the average squared deviation from the mean; standard deviation is its square root. Variance is in squared units, which cannot be interpreted directly against the original measurements, so the square root is taken to return the figure to usable units. Both describe the same spread, and standard deviation is the one you report.

      What does the empirical rule say?

      For approximately normally distributed data, about 68% of values fall within one standard deviation of the mean, 95% within two, and 99.7% within three. A test with a mean of 70 and a standard deviation of 8 therefore places roughly two thirds of scores between 62 and 78. The rule breaks down on strongly skewed data, so check the distribution's shape first.

      Can standard deviation be negative?

      No. Standard deviation is the square root of an average of squared values, so it can never be less than zero. It equals exactly zero only when every value in the data set is identical, which means there is no spread at all. A negative result indicates an arithmetic error, usually a sign mistake in the deviation step.

      What is the standard error and how does it differ?

      Standard deviation describes the spread of individual values; standard error describes how precisely the sample mean estimates the population mean. Standard error equals the sample standard deviation divided by the square root of the sample size, so it shrinks as the sample grows. Confidence intervals are built from standard error, not standard deviation.

      How do I calculate standard deviation in Excel?

      Use =STDEV.S(range) for a sample and =STDEV.P(range) for a population. The older =STDEV() behaves like STDEV.S and is kept for compatibility. Excel's variance functions follow the same naming: VAR.S and VAR.P. Confirm which one your assignment expects, since the two return different numbers on small data sets.

      Summary

      The Standard Deviation Calculator returns either the sample or the population standard deviation from any pasted data set, along with the variance, the mean, the sum of squares and a full deviation table.

      Both formulas square each value's deviation from the mean, sum those squares, divide, and take the square root; they differ only in dividing by n − 1 for a sample or N for a population.

      Choose sample when the data represents a larger group, which is the usual case, and expect a meaningful difference between the two only on small data sets, 11% at ten values, 1% at a hundred. Interpret the result against the mean using the coefficient of variation, or against the empirical rule when the data is roughly normal, and remember that squaring makes the measure sensitive to outliers.