Home › Math & Science › Standard Deviation Calculator

Standard Deviation Calculator

Find how spread out your numbers are with this free standard deviation calculator. Paste in a list of values — exam marks, daily temperatures, product weights, anything — and get the mean, the population standard deviation, the sample standard deviation, both variances, and a full step-by-step table showing every squared difference, exactly the working your teacher or textbook expects to see.

Up to 1,000 numbers. The steps table shows the first 100 values; all of them are used in the calculation.

Population SD = 2 • Sample SD = 2.1381
Mean = 5 • Count = 8 • Sum = 40 • Min = 2 • Max = 9 • Population variance = 4 • Sample variance = 4.5714
Working — each value against the mean of 5:
Value (x)x − mean(x − mean)²
2−39
4−11
4−11
4−11
500
500
724
9416

Squared differences add to 32. Population: 32 ÷ 8 = 4, and √4 = 2. Sample: 32 ÷ 7 = 4.5714, and √4.5714 = 2.1381.

How to use

  1. Type or paste your numbers into the box, separated by commas, spaces or new lines — school marks, measurements, test scores, anything.
  2. Press Calculate. The big line gives both standard deviations: population and sample.
  3. Decide which one you need: population if your list is the whole set you care about (every student in the class), sample if it is a sample taken from a bigger group.
  4. Follow the steps table to see each value’s distance from the mean, squared — the exact working to copy into homework or a report.

Population or sample — which one?

Population SD (σ)Sample SD (s)
Use it whenYour data is the complete setYour data is a sample of a bigger set
Divide the squared total byn (the count)n − 1
ExampleMarks of all 30 students in your classMarks of 30 students sampled from a whole school
For 2, 4, 4, 4, 5, 5, 7, 92.00002.1381

Dividing by n − 1 (called Bessel’s correction) makes the sample version a little larger, to allow for the fact that a sample usually understates the true spread.

How it works

The mean tells you where a set of numbers is centred, but nothing about how they are scattered. Two classes can both average 5 out of 10 while one has everyone scoring 4, 5 or 6 and the other swings between 2 and 9. Standard deviation is the number that captures that scatter: roughly, it is the typical distance of the values from their mean. Small standard deviation, tight cluster; large standard deviation, wide spread.

The method has four steps. First find the mean. Then, for each value, find how far it sits from the mean and square that distance — squaring makes negative and positive distances both count, and punishes far-away values more. Next, average those squared distances: that average is the variance. Finally, take the square root to return to the original units — that is the standard deviation. The only fork in the road is the averaging step: divide by the count n for a population, or by n − 1 for a sample.

Mean: x̄ = (sum of values) ÷ n  |  Variance (population): σ² = Σ(x − x̄)² ÷ n  |  Variance (sample): s² = Σ(x − x̄)² ÷ (n − 1)  |  Standard deviation = √variance

Why square everything and then take a square root, instead of just averaging the distances? Partly history and partly power: squared distances connect standard deviation to a deep shelf of statistics — the normal distribution, standard error, z-scores — where about 68% of values in a bell-shaped set fall within one standard deviation of the mean, and about 95% within two. A shopkeeper checking that a packing machine fills 500 g packets consistently, a teacher comparing two sections of a class, and a weather watcher judging how changeable a month was are all reading the same single idea through this number.

Watch out for one trap: a single wild value (an outlier) inflates the standard deviation a lot, because its distance gets squared. If your data has one suspicious entry — a 99 among marks out of 50, say — check it before trusting the result.

Worked example

Work out the standard deviation of the classic textbook set 2, 4, 4, 4, 5, 5, 7, 9.

Step 1: Mean = (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) ÷ 8 = 40 ÷ 8 = 5.
Step 2: Distances from the mean: −3, −1, −1, −1, 0, 0, 2, 4.
Step 3: Square them: 9, 1, 1, 1, 0, 0, 4, 16 — total 32.
Step 4: Population variance = 32 ÷ 8 = 4, so population SD = √4 = 2.
Step 5: Sample variance = 32 ÷ 7 = 4.5714, so sample SD = √4.5714 = 2.1381.

The calculator opens with this exact data set and prints both answers, with the table above filled in step by step.

FAQ

What is the standard deviation of 2, 4, 4, 4, 5, 5, 7, 9?

The mean of this classic set is 5, and the squared distances from the mean add to 32. The population standard deviation is √(32 ÷ 8) = √4 = 2 exactly. The sample standard deviation is √(32 ÷ 7) = 2.1381. It is a favourite textbook example because the population answer comes out a whole number.

Should I use the population or the sample standard deviation?

Use the population version when your numbers are the entire group you care about — all the students in one class, all 12 months of a year. Use the sample version when your numbers are a sample drawn from a larger group and you want to estimate the group’s spread. The sample version divides by n − 1, making it slightly larger.

What does a standard deviation of 0 mean?

It means every value in the set is identical, so there is no spread at all — the distance from the mean is 0 for every entry. A list like 7, 7, 7, 7 has mean 7 and standard deviation 0. Any variety in the values makes the standard deviation positive.

What is the difference between variance and standard deviation?

The variance is the average of the squared distances from the mean; the standard deviation is its square root. Squaring changes the units (marks become “marks squared”), so the standard deviation is the one quoted in practice because it is back in the original units and directly comparable with the mean.

Can standard deviation be negative?

No. It is the square root of an average of squares, and squares are never negative, so the standard deviation is always zero or positive. If a calculation seems to give a negative standard deviation, a sign error has crept into the working.

Why does the sample version divide by n − 1?

A sample tends to sit a little closer to its own mean than the full population does to the true mean, so dividing by n would understate the spread. Dividing by n − 1 instead — Bessel’s correction — corrects that bias. The difference matters most for small samples.