Skip to main content
CalcMax

Standard Deviation Calculator

Result

2.1381

Standard deviation

Variance
4.5714
Mean
5.0000
Sum of squared deviations
32.0000
Count
8
Sum
40.0000

The standard deviation says how far the values in a data set typically sit from their mean, measured in the same units as the data. Type or paste the numbers — one per line, or separated by semicolons, commas or spaces — and this calculator works out the count, the sum, the mean and the sum of squared deviations, then divides and takes a square root. That last step is what puts the answer back into the units you typed. Pick the sample version, which divides by n − 1, or the population version, which divides by n: the two answers differ by nothing except that divisor.

Formula

Standard deviation = √( Σ (xᵢ − x̄)² ÷ (n − 1) ) for a sample, or the same sum divided by n for a population

xᵢ
One value in the data set. Every value enters as its distance from the mean, and squaring that distance is what stops the distances above the mean from cancelling out the distances below it
x̄
The mean of the data: the sum of all the values divided by how many there are. It is printed next to the answer so the working can be checked
n
How many values the data set holds, up to 200 here. The divisor is n − 1 for a sample and n for a population, and that is the only difference between the two standard deviations
Σ (xᵢ − x̄)²
The sum of squared deviations: each value's distance from the mean is squared, then the squares are added up. It is in squared units, which is exactly why the final step takes a square root
s
The standard deviation, in the original units of the data. Adding the same constant to every value leaves it unchanged; doubling every value doubles it

Use it when one number has to stand for how spread out a set of measurements is: repeated readings of the same quantity, exam marks, daily takings, the weights of a batch of parts. Report the sample standard deviation when the numbers you have are a sample of something larger, and switch to the population version only when the list really is the whole group. It is also the number that turns a raw value into a z-score, and the one most outlier rules are built on. Note what the square root buys you: the sum of squared deviations carries squared units, and taking the root is what, in the words of NIST's Measures of Scale, "restores the units of the spread to the original data units (the variance squares the units)". Two things it will not tell you: whether the spread is symmetric, and whether an extreme value is a typo. A skewed data set is better described by its quartiles and median than by a standard deviation.

Worked examples

  1. Eight values, sample and population side by side

    1. Count: 8 values; sum: 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40
    2. Mean: 40 ÷ 8 = 5
    3. Deviations from the mean: −3, −1, −1, −1, 0, 0, 2, 4
    4. Squared deviations: 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32
    5. Sample variance: 32 ÷ (8 − 1) = 4.5714
    6. Sample standard deviation: √4.5714 = 2.1381

    The same eight values as a population give a variance of 32 ÷ 8 = 4 and a standard deviation of exactly 2. Choosing the wrong divisor is the single most common reason a standard deviation disagrees with another calculator, and it changes the answer by about 7% here — larger when n is small, smaller when n is large.

  2. Five exam scores

    1. Sum: 85 + 90 + 78 + 92 + 88 = 433, over 5 scores
    2. Mean: 433 ÷ 5 = 86.6
    3. Squared deviations: 2.56 + 11.56 + 73.96 + 29.16 + 1.96 = 119.2
    4. Sample variance: 119.2 ÷ 4 = 29.8
    5. Sample standard deviation: √29.8 = 5.4589

    Read the deviations and the squared deviations next to each other: the 78 sits 8.6 marks below the mean and contributes 73.96 to the sum, which is more than the other four scores put together. Squaring a distance is what gives the far-away values their weight, and it is also why a single bad day moves the standard deviation more than it moves the mean.

  3. A population of three, where the two divisors are far apart

    1. Sum: 4 + 8 + 6 = 18, over 3 values, so the mean is 6
    2. Deviations: −2, 2, 0; squared: 4, 4, 0, giving a sum of squares of 8
    3. Population variance: 8 ÷ 3 = 2.6667
    4. Population standard deviation: √2.6667 = 1.633

    Three values is the smallest list this page will treat as a sample, and it is where the divisor shows its teeth: the sample version divides the same 8 by 2 and reports 2 instead of 1.633 — a difference of more than 20%. Sample standard deviations are always the larger of the two, and the gap shrinks as the data set grows.

Limitations

This is the plain arithmetic standard deviation of a list of numbers. It has no way to use weights, so a value entered once counts once — a frequency table or a weighted survey needs a different calculation. It describes spread, not shape: a data set that is skewed has one short side and one long tail, and OpenStax's Measures of the Spread of the Data is explicit that in a skewed distribution the standard deviation "may not be much help", with quartiles and the median preferred instead. Every value counts, so one mistyped outlier inflates the answer. The list is capped at 200 values. A token like 1,500 is refused rather than guessed at, because a comma between digits is a decimal comma in much of the world and a thousands separator elsewhere; write 1500 or 1.5. Finally, the numbers are read exactly as typed, in every language: the separator you use never changes what the list means.

Frequently asked questions

What is the difference between the sample and the population standard deviation?
One divisor. Both start from the same sum of squared deviations, then the sample version divides by n − 1 and the population version divides by n. For the eight values 2, 4, 4, 4, 5, 5, 7, 9 the sum of squares is 32, so the sample standard deviation is √(32 ÷ 7) = 2.1381 and the population standard deviation is √(32 ÷ 8) = 2. The sample answer is always the larger of the two, and the two get closer together as the data set grows.
How do I find the standard deviation by hand?
Five steps. Add the values and divide by how many there are, to get the mean. Subtract the mean from each value to get its deviation. Square each deviation — squaring is what stops the ones above the mean cancelling out the ones below it. Add the squares. Divide by n − 1 for a sample or n for a population, and take the square root. The formula is the same either way; only the divisor changes. The panel above prints the count, sum, mean and sum of squared deviations, so any one step can be checked on its own.
Why does the sample version divide by n − 1 instead of n?
Because the mean you subtract was measured from the same values, and each value pulled that mean toward itself. Deviations measured from a mean the data chose are, on average, slightly smaller than the true spread, so dividing by n would understate it. Dividing by n − 1 corrects for that. The correction matters most for small lists — with three values it is a 22% difference — and is negligible once you have a few hundred.
Can I paste a column straight out of a spreadsheet?
Yes. Newlines, tabs, semicolons, spaces and a comma followed by a space all separate values, so a pasted column or a line typed with semicolons both work. Empty segments are skipped rather than rejected, which means a trailing newline is harmless. Up to 200 values are read. One shape is refused on purpose: a token like 1,500 or 1.500, where three digits follow the separator — that is a thousands separator in some countries and a decimal point in others, so write 1500 or 1.5 instead.
What units does the standard deviation come in?
The same units as the data. Weigh a batch of parts in grams and the standard deviation is in grams, which is the point of taking the square root at the end — the sum of squared deviations is in squared grams, and the variance is in squared grams too. NIST puts it plainly: the standard deviation restores the units of the spread to the original data units, while the variance squares the units. That is why a standard deviation can be read next to the values it describes and a variance cannot.
Why does my answer differ from another calculator's?
Nine times out of ten, the divisor. Many calculators return only the population standard deviation, or only the sample one, without saying which. Check the other tool's wording for n − 1 against n. Two other causes worth ruling out: a value typed with a decimal comma that the other tool read as a separator, and an outlier that one of you included and the other did not — a standard deviation is sensitive to every single value, so one extra number changes it.

References

Related calculators