Free tool

Standard deviation calculator. With the working shown.

Paste or type your numbers to get the sample and population standard deviation, variance, mean, median, quartiles and outliers at once. For up to 50 values it also writes out the working, line by line, so you can check it against your own.

Free, no sign-up. It runs in your browser.

Your data

Separate them with commas, spaces or new lines, or paste a spreadsheet column.

Read 8 values.

Data format
Your data is

A sample is part of a bigger group and divides by n − 1. A population is every member, and divides by n. Both results are shown.

Results

Sample standard deviation, s

2.1381

Population σ = 2 · n = 8 · mean 5

Center

Count, n
8
Mean, x̄
5
Median
4.5
Mode
4
Occurs 3 times

Spread

Sample SD, sChosen
2.1381
Sample variance, s²Chosen
4.5714
Population SD, σ
2
Population variance, σ²
4
Standard error, s/√n
0.7559
Coefficient of variation
42.7618%
s ÷ mean
Range
7
IQR
1.5
Q3 − Q1

Quartiles

Minimum
2
Q1
4
Q3
5.5
Maximum
9

Sums

Sum, Σx
40
Sum of squares, Σ(x − x̄)²
32
Σx²
232

Sorted data and quartiles

Min
2
Q1
4
Median
4.5
Q3
5.5
Max
9
  1. 2
  2. 4
  3. Q14
  4. 4
  5. 4
  6. Median4.5
  7. 5
  8. 5
  9. Q35.5
  10. 7
  11. 9 (outlier)
  • Q1: position (n − 1) × 0.25 + 1 = 2.75, between the 2nd value (4) and the 3rd (4): 4 + 0.75 × (4 − 4) = 4.
  • Median: position (n − 1) × 0.5 + 1 = 4.5, between the 4th value (4) and the 5th (5): 4 + 0.5 × (5 − 4) = 4.5.
  • Q3: position (n − 1) × 0.75 + 1 = 6.25, between the 6th value (5) and the 7th (7): 5 + 0.25 × (7 − 5) = 5.5.
  • Outliers (1.5 × IQR rule): below 1.75 or above 7.75. Found: 9.

Quartiles use the type 7 method, the one in Excel's QUARTILE.INC, Google Sheets and R. Other calculators may use a different method and give slightly different quartiles.

Step by step

Each value's deviation from the mean, and its square
#xx − x̄(x − x̄)²
12-39
24-11
34-11
44-11
5500
6500
7724
89416
Σ40032
  1. Mean: x̄ = Σx ÷ n = 40 ÷ 8 = 5
  2. Sum of squared deviations: Σ(x − x̄)² = 32
  3. Variance: s² = Σ(x − x̄)² ÷ (n − 1) = 32 ÷ 7 = 4.5714
  4. Standard deviation: s = √4.5714 = 2.1381

With the population formula instead: σ² = 32 ÷ 8 = 4, so σ = 2.

Shown to 4 decimal places; each step uses the unrounded values.

z-score of a value

Uses the mean and the sample standard deviation, s.

z = 1.8708

z = (x − x̄) ÷ s = (9 − 5) ÷ 2.1381 = 1.8708

9 is 1.87 standard deviations above the mean.

8 values. Mean 5. Sample standard deviation 2.1381.

How to use it

  1. Step 1: Paste your numbers

    Separate them with commas, spaces or new lines, or paste a column from a spreadsheet. Anything that isn't a number is listed by line, not silently dropped.

  2. Step 2: Pick sample or population

    Choose sample if your data is part of a bigger group, which it usually is. Both answers stay on screen, with your pick highlighted.

  3. Step 3: Check the working

    Follow the table of deviations down to the final division and square root, look up any value's z-score, then copy the results or download a CSV.

What standard deviation tells you

Standard deviation measures how far values typically sit from their mean. A small one means the data is bunched together; a large one means it's spread out. Two sections of a course can both average 75 on a test, but if one has a standard deviation of 4 points and the other 15, the students in the first scored close to one another while the second ranged from struggling to near perfect.

It's in the same units as the data, which is what makes it readable. If the scores are in points, the standard deviation is in points; if reaction times are in milliseconds, so is their spread. For data that follows a normal, bell-shaped distribution, about 68% of values fall within one standard deviation of the mean and about 95% within two. That's what a z-score uses: z = (x − x̄) ÷ s counts how many standard deviations a value sits from the mean, so a z of 2 is unusual and a z of 0.3 is ordinary.

Variance is the same idea before the square root: the average squared distance from the mean. It's what the math works with, because variances of independent quantities add, but its units are squared (points², ms²), so it's hard to read on its own. The standard error of the mean, s ÷ √n, answers a different question. It isn't about how spread out the data is, but how precisely the sample's mean estimates the population's. Collect more data and the standard error shrinks; the standard deviation doesn't.

The formulas, and why the sample one divides by n − 1

Both versions follow the same four steps: find the mean, subtract it from every value, square those deviations and add them up, then divide and take the square root. Only the divisor changes. For a population (every member of the group you're describing) divide by N: σ = √(Σ(x − μ)² ÷ N). For a sample (some members, used to learn about the rest) divide by n − 1: s = √(Σ(x − x̄)² ÷ (n − 1)). In Excel and Google Sheets, these are STDEV.P and STDEV.S.

Dividing by n − 1 is called Bessel's correction. In plain terms: a sample's values sit a little closer to their own mean than to the true population mean, because the sample mean is calculated from those same values. So the squared deviations come out slightly too small, and dividing by n − 1 instead of n scales them back up. The correction matters most for small samples. With 5 values it raises the variance by 25%; with 100 values, by about 1%. With a single value, n − 1 is 0 and there is no sample standard deviation at all, because one value tells you nothing about spread.

Here is the calculator's example, 2, 4, 4, 4, 5, 5, 7, 9, worked by hand. The values add up to 40, so the mean is 40 ÷ 8 = 5. The deviations from 5 are −3, −1, −1, −1, 0, 0, 2 and 4. Their squares are 9, 1, 1, 1, 0, 0, 4 and 16, which sum to 32. Treated as a population, the variance is 32 ÷ 8 = 4 and the standard deviation is √4 = 2. Treated as a sample, the variance is 32 ÷ 7 = 4.5714 and the standard deviation is √4.5714 = 2.1381. The standard error of the mean is 2.1381 ÷ √8 = 0.7559.

So which should you use? If the numbers are a subset (30 students surveyed out of a whole school, ten readings from an experiment you could repeat), use the sample formula. Use the population formula only when you have every value you're describing, like the scores of everyone in your own class when that class is all you're reporting on. When in doubt it's usually a sample, which is why the calculator starts there.

Quartiles, IQR and outliers: why calculators disagree

Quartiles split the sorted data into four parts. A quarter of the values sit below Q1, half below the median and three quarters below Q3. The interquartile range, IQR = Q3 − Q1, is the spread of the middle half, and unlike the standard deviation it isn't dragged around by one extreme value. Tukey's 1.5 × IQR rule uses it to flag outliers: anything below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR.

The catch is that there's no single agreed way to find a quartile that falls between two values. In 1996, Hyndman and Fan compared nine methods used by statistical software, and the NIST/SEMATECH handbook still lists several in common use. This calculator uses one of them, type 7: the p-th quantile sits at position (n − 1) × p + 1 in the sorted list, interpolating between the values either side. It's the default in R and NumPy, and it's what Excel's QUARTILE.INC and Google Sheets' QUARTILE compute, so the answers match a spreadsheet.

On the example data, type 7 gives Q1 = 4, a median of 4.5 and Q3 = 5.5, so the IQR is 1.5 and the fences are 1.75 and 7.75. That makes 9 an outlier. Type 6, used by Excel's QUARTILE.EXC, Minitab and SPSS, puts Q3 at 6.5 and the upper fence at 10.25, so 9 isn't one. The median-of-halves method in many intro courses and on TI-83 and TI-84 calculators takes the median of each half (4 and 6 here), which puts the upper fence at exactly 9, so 9 isn't beyond it either. None of these is wrong. Check which method your course expects, and say which one you used when it matters.

Common mistakes

Using the wrong formula. Most homework and lab data is a sample, so most answers need n − 1. If your answer is a little smaller than the one in the back of the book, you probably divided by n. Switch between sample and population above and compare the two.

Rounding too early. If you round the mean before subtracting it, every deviation carries the error, and squaring magnifies it. Keep full precision until the final answer. The step-by-step table shows rounded numbers, but each step is computed from the unrounded ones.

Stopping one step short, or going one too far. Variance and standard deviation differ by a square root. In the example, s² = 4.5714 but s = 2.1381. If a question asks for the standard deviation and your answer is in squared units, take the root.

Mixing up standard deviation and standard error. Error bars and "mean ± SE" use the standard error, which is smaller than the standard deviation by a factor of √n. Reporting one as the other misstates the spread. And to compare spread across different units, such as kilograms against centimeters, use the coefficient of variation, s ÷ mean, which has no units. It only makes sense for positive amounts measured from a true zero.

Sources

  1. NIST/SEMATECH (2012). Measures of scale (section 1.3.5.6). NIST/SEMATECH e-Handbook of Statistical Methods.
  2. NIST/SEMATECH (2012). Percentiles (section 7.2.6.2). NIST/SEMATECH e-Handbook of Statistical Methods.
  3. Hyndman, R. J., & Fan, Y. (1996). Sample quantiles in statistical packages. The American Statistician, 50(4), 361-365.

Stuck on the rest of the problem set?

Standard deviation is usually one step in a longer question: a confidence interval, a hypothesis test, a regression. Skolar, Skolight's tutor, works through problems like these step by step in Solve mode, using your course notes and slides so the notation matches your lectures, and it can draw the graph to go with the answer. It works from the material you add rather than searching the web.

See the AI Tutor

Questions.

More free tools. No sign-up either.

  • Free tool

    GPA Calculator

    Semester and cumulative GPA from your credits and grades, plus the GPA you need for a target.

  • Free tool

    Molar Mass Calculator

    Molar mass, mass percent and grams-to-moles conversions for any chemical formula.

  • Free tool

    Truth Table Generator

    The full truth table for any logic formula, with steps, a tautology check and an equivalence test.

Want this done for you? Start from your own notes.

Skolight turns your lectures and readings into flashcards, quizzes, mock exams and a study plan. The Free plan needs no card.

  • No card requiredGet started in seconds
  • Trusted by 100k+ studentsJoin a growing community
  • Works with any documentPDFs, notes, slides and more