Home/Statistics/Standard Deviation Calculator

Standard Deviation Calculator

Calculate sample and population standard deviation, variance, mean and other descriptive statistics instantly, with detailed formulas, worked examples and step-by-step calculations.

Quick Answer: How Do You Calculate Standard Deviation?

Find the mean, subtract it from every value, square each of those differences, add the squares, divide by n − 1 for a sample or N for a whole population, then take the square root. That result is the standard deviation — the typical distance between a value and the mean, expressed in the same units as your data. Dividing by n − 1 is called Bessel's correction, and it is the right choice for almost all real-world data, because most data sets are samples rather than complete populations.

Enter Data

Paste or type your numbers separated by commas, spaces, tabs or new lines — CSV columns paste in directly. Percentage symbols are removed, so 5% is treated as the number 5, not the decimal 0.05. Dollar signs are removed the same way.

Important: Do not use commas as thousands separators. Enter 1200 rather than 1,200, because commas separate individual values — "1,200" would be read as two numbers, 1 and 200.
Statistics Results
Sample Standard Deviation (s)

StatisticValue
Quartile note: Q1 and Q3 are calculated using linear interpolation. Different textbooks and spreadsheet functions use other accepted quartile conventions, so small differences between tools are normal and do not mean either result is wrong.
Data with Z-Scores & Outlier Detection

Each value's z-score shows how many standard deviations it sits from the mean, using the sample standard deviation selected above. Z flag and IQR flag are genuinely different methods and can disagree on the same value — both are shown rather than merged into one verdict.

#ValueDeviation (x−mean)Z-ScoreZ FlagIQR Flag
Quick Formula Summary
Mean: x̄ = Σx / n
Population variance: σ² = Σ(x − μ)² / N
Population SD: σ = √( Σ(x − μ)² / N )
Sample variance: s² = Σ(x − x̄)² / (n − 1)
Sample SD: s = √( Σ(x − x̄)² / (n − 1) ) (Bessel's correction)
Standard deviation = √variance  |  Variance = SD²
Z-score: z = (x − mean) / SD
Coefficient of variation: CV = (SD / mean) × 100%
Standard error of the mean: SE = s / √n

What Is Standard Deviation?

Standard deviation is a single number that answers a very practical question: how far from average is a typical value in this data set? A small standard deviation means the values huddle close to the mean. A large one means they are scattered widely. Because it is expressed in the same units as the original data — dollars, millimetres, marks, degrees — it can be read directly rather than needing translation.

Consider two Year 10 classes that both averaged 70 on the same test. Class A scored 70, 72, 68, 71, 69, giving a sample standard deviation of about 1.58. Class B scored 50, 90, 60, 80, 70, giving a sample standard deviation of about 15.81. Identical means, completely different stories: one class is uniformly around the average, the other contains students who are struggling badly and students who are well ahead. The mean alone hides that entirely, which is why standard deviation almost always belongs beside it.

The symbol depends on what your numbers represent. A lower-case Greek sigma, σ, is the standard deviation of an entire population. A plain s is the standard deviation of a sample drawn from a larger group. The distinction is not cosmetic — the two are calculated slightly differently, as the next sections explain.

💡 Did You Know? The term "standard deviation" was coined by Karl Pearson in 1894. The underlying idea of measuring spread by squaring deviations is older, and Ronald Fisher later built much of modern statistical inference — including the concept of variance analysis — on the same foundation.

Why Standard Deviation Matters

Averages are comfortable and often misleading. Standard deviation is what turns an average into information you can act on.

Population vs Sample Standard Deviation

This is the single most common point of confusion, and choosing wrongly changes your answer.

A population is every member of the group you care about — every student in one classroom, every item in one production batch, all twelve months of last year's electricity bills. If your data covers all of them, divide the sum of squared deviations by N.

A sample is a subset used to estimate something about a larger group you did not fully measure — 200 surveyed customers standing in for 50,000, or 30 tested components standing in for a whole production run. Here you divide by n − 1 instead of n.

Why the subtraction? Because you used the sample's own mean as the reference point, deviations measured from it are slightly too small on average, so dividing by n would systematically understate the true spread. Dividing by n − 1, known as Bessel's correction, removes that bias and makes s² an unbiased estimator of the population variance.

FeaturePopulation standard deviation (σ)Sample standard deviation (s)
Divide byN (the count)n − 1 (Bessel's correction)
Symbolσ (sigma), variance σ²s, variance s²
Mean symbolμ (mu)x̄ (x-bar)
Use whenYou have measured every member of the groupYour data is a subset standing in for a larger group
Relative sizeAlways the smaller of the twoAlways slightly larger
Spreadsheet functionSTDEV.PSTDEV.S
Typical useClassroom marks, one full batch, one complete yearSurveys, experiments, quality testing, research
Pro Tip: Choose by the question you are answering, not by habit. Use the sample formula when your observations are a subset used to estimate something about a larger population. Use the population formula when your data includes every member of the exact group being described. The gap between them shrinks as n grows — over 11% at n = 5, under 1% at n = 100 — so the choice matters most on small data sets.

The Mean Explained

The mean, or arithmetic average, is the balance point of a data set: add every value and divide by how many there are. It is the reference point that standard deviation measures distance from, so it has to be calculated first.

x̄ = Σx / n (sample mean)
μ = Σx / N (population mean)

The mean is sensitive to extreme values, which is worth knowing when you interpret a standard deviation. One enormous outlier drags the mean towards itself and inflates the standard deviation, so both statistics move at once. The median — the middle value when the data is sorted — is far more resistant, which is why property prices and household incomes are almost always reported as medians. Comparing the mean and median of the same data set is a quick way to detect skew: if they differ noticeably, the distribution is lopsided.

Variance Explained

Variance is the average of the squared deviations from the mean — in other words, standard deviation before the square root is taken. Squaring does two useful things: it makes every deviation positive, so values above and below the mean cannot cancel out, and it gives larger deviations disproportionate weight.

The catch is units. If your data is in centimetres, the variance is in square centimetres, which has no physical meaning here. Taking the square root converts it back to centimetres, and that is precisely what standard deviation is for. Variance remains the working currency of statistical theory — it adds neatly across independent variables, which standard deviation does not — while standard deviation is the number you report to people.

FeatureVarianceStandard deviation
DefinitionMean of the squared deviationsSquare root of the variance
UnitsOriginal units, squaredSame as the original data
Symbolsσ² or s²σ or s
Easy to interpret?Not directly — the units are artificialYes — read it as a typical distance from the mean
Main useStatistical theory, ANOVA, combining variabilityReporting, risk measures, z-scores, error bars
Additive?Yes, for independent variablesNo

The Standard Deviation Formula

Both versions share the same skeleton and differ only in the divisor.

Population:   σ = √( Σ(xᵢ − μ)² / N )
Sample:   s = √( Σ(xᵢ − x̄)² / (n − 1) )
xᵢ = each value  |  μ, x̄ = mean  |  N, n = count  |  Σ = "add up"

There is also a computational form that avoids storing every deviation, which is how calculators and spreadsheets have historically done the arithmetic in a single pass:

σ² = ( Σx² − (Σx)² / N ) / N
s² = ( Σx² − (Σx)² / n ) / (n − 1)

It gives identical answers to the definition, which is why the calculator above reports Σx² alongside Σx — you can check your own work either way.

Step-by-Step Calculation Examples

Example 1 — population SD of {2, 4, 4, 4, 5, 5, 7, 9}

Step 1. n = 8, and Σx = 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40
Step 2. Mean: μ = 40 / 8 = 5
Step 3. Deviations: −3, −1, −1, −1, 0, 0, 2, 4
Step 4. Squared: 9, 1, 1, 1, 0, 0, 4, 16  →  Σ(x − μ)² = 32
Step 5. Variance: σ² = 32 / 8 = 4
Step 6. Standard deviation: σ = √4 = 2

Example 2 — the same data treated as a sample

Steps 1–4 are identical: Σ(x − x̄)² = 32
Divide by n − 1 = 7 instead of 8: s² = 32 / 7 ≈ 4.5714
s = √4.5714 ≈ 2.1381
The sample figure is about 7% larger — that gap is Bessel's correction at work

Example 3 — five test scores {68, 72, 75, 80, 85}

Σx = 380, so x̄ = 380 / 5 = 76
Deviations: −8, −4, −1, 4, 9
Squares: 64, 16, 1, 16, 81  →  Σ(x − x̄)² = 178
Sample: s² = 178 / 4 = 44.5, so s = √44.5 ≈ 6.6708
Population: σ² = 178 / 5 = 35.6, so σ = √35.6 ≈ 5.9666

Example 4 — monthly rainfall in millimetres {12, 45, 8, 63, 21, 37}

Σx = 186, so x̄ = 186 / 6 = 31 mm
Σ(x − x̄)² = 2246
s² = 2246 / 5 = 449.2, so s ≈ 21.19 mm
A standard deviation two-thirds the size of the mean signals a highly variable rainfall pattern

Normal Distribution

Many natural and manufactured measurements cluster symmetrically around their mean, thinning out towards the extremes — the familiar bell curve, known formally as the normal or Gaussian distribution. Heights, measurement errors, and the averages of large samples all tend towards this shape.

A normal distribution is fully described by just two numbers: its mean, which locates the centre, and its standard deviation, which sets the width. Change the mean and the whole curve slides sideways; change the standard deviation and it stretches flat or squeezes tall. That is a remarkable economy — two statistics capture an entire distribution — and it is the main reason standard deviation is so central to statistics.

📘 Worth knowing: Real data is rarely perfectly normal, and skewed data (incomes, house prices, insurance claims) breaks the tidy percentages below. Standard deviation is still a valid measure of spread for skewed data; it just cannot be translated into probabilities the same way.

The 68–95–99.7 Rule

For data that is approximately normal, the empirical rule gives an immediate sense of scale.

RangeProportion of dataInterpretation
mean ± 1 SD≈ 68.27%Roughly two values in three are this close to average
mean ± 2 SD≈ 95.45%Outside this band is genuinely unusual — about 1 in 22
mean ± 3 SD≈ 99.73%Beyond this is about 1 in 370 — often treated as an outlier

Worked example — exam marks with mean 70 and SD 5

About 68% of students scored between 65 and 75
About 95% scored between 60 and 80
About 99.7% scored between 55 and 85
A mark of 82 is unusual: z = (82 − 70) / 5 = 2.4 standard deviations above the mean

Interpreting Standard Deviation

A standard deviation is meaningless in isolation — it only means something relative to the mean and to the context. An SD of 3 cm is enormous for machined bearings and trivial for adult heights.

The coefficient of variation

To compare spread across data sets with different scales or units, divide the standard deviation by the mean and express it as a percentage. That is the coefficient of variation (CV), and because it is unitless it compares directly.

Worked example — comparing two shares

Share A: mean return 8.0%, SD 2.1 → CV = 2.1 / 8.0 × 100 ≈ 26.3%
Share B: mean return 22.0%, SD 4.9 → CV = 4.9 / 22.0 × 100 ≈ 22.3%
Share B has the larger raw SD but is the less volatile relative to its return

Z-scores

A z-score restates any value as the number of standard deviations it sits from the mean: z = (x − mean) / SD. A positive z is above average, negative is below, and the magnitude tells you how unusual it is. Z-scores let you compare a maths mark with a swimming time, because both are converted to the same scale.

What counts as a "good" standard deviation?

There is no universal threshold. It depends entirely on what the number is for. In manufacturing, small is the whole goal — tight tolerances mean consistent parts. In an investment portfolio, some volatility is the price of return. In a class of students, a very small standard deviation might mean excellent teaching or a test that was too easy to distinguish anyone. Always ask what spread should look like before deciding whether yours is good.

Common Mistakes

MistakeWhy it goes wrongHow to avoid it
Using N when you have a sampleUnderstates the spread, badly on small data setsAsk whether your data is the whole group; if not, use n − 1
Forgetting the square rootYou have calculated the variance, not the standard deviationCheck the units: SD matches your data, variance does not
Averaging the deviations without squaringPositives and negatives cancel and the total is always zeroSquare first, then average, then take the root
Rounding the mean before subtractingSmall rounding errors get squared and compoundCarry full precision through and round only the final answer
Comparing SDs across different units or scalesAn SD in dollars cannot be compared with an SD in kilogramsUse the coefficient of variation instead
Applying the 68–95–99.7 rule to skewed dataThose percentages assume an approximately normal shapePlot the data first, or use quartiles and the IQR
Treating a large SD as an errorHigh variability is often the real finding, not a mistakeInvestigate the cause before "cleaning" the data
Ignoring outliersSquaring gives extreme values enormous influenceCheck extremes, and report the median and IQR alongside
Mixing up STDEV.P and STDEV.S in a spreadsheetThey answer different questionsSTDEV.S for samples, STDEV.P for populations
⚠️ Common Mistake: Assuming a standard deviation of zero means something has gone wrong. It simply means every value is identical — the data set {2, 2, 2, 2} has a mean of 2 and a standard deviation of exactly 0. Perfectly valid, and in manufacturing it is the ideal.

Practical Applications

Business applications

Standard deviation is the backbone of quality control. A production line measures a critical dimension on sampled units and tracks how far the spread drifts; control charts draw warning limits at two and three standard deviations from the target, and the "six sigma" methodology takes its name from the goal of fitting six standard deviations between the process mean and the nearest tolerance limit. Elsewhere in business it measures demand volatility for inventory planning, variability in delivery times, and consistency of staff performance or customer satisfaction scores.

Finance applications

In finance, the standard deviation of returns is the standard definition of volatility, and therefore of risk. It feeds directly into portfolio theory, where combining assets whose returns move differently reduces the standard deviation of the whole portfolio without necessarily reducing expected return. It also underpins the Sharpe ratio (excess return divided by standard deviation), value-at-risk models, and the volatility inputs in options pricing. Superannuation funds in Australia describe their investment options as "growth" or "conservative" largely on the basis of expected return variability.

Scientific and research applications

Every experimental measurement carries uncertainty, and standard deviation is how that uncertainty is reported. Error bars on a chart are usually one standard deviation or one standard error; the standard error of the mean, s / √n, shrinks as the sample grows, which is the mathematical reason larger studies give more precise estimates. Standard deviation also feeds into confidence intervals, hypothesis tests and the calculation of how large a sample needs to be in the first place.

Everyday and educational uses

Standardised testing reports results in standard-deviation units so that cohorts and years can be compared fairly. Medical reference ranges — bone density scores, growth charts, blood test intervals — are defined as a number of standard deviations from a reference mean. Climate records describe an unusually hot month by how many standard deviations it sits above the long-term average. And anyone comparing quotes, delivery estimates or fuel consumption is doing informally what standard deviation does precisely.

Standard Deviation Cheat Sheet

Quick Reference

Mean: x̄ = Σx / n
Sum of squared deviations: SS = Σ(x − x̄)²
Population variance: σ² = SS / N  |  Population SD: σ = √(SS / N)
Sample variance: s² = SS / (n − 1)  |  Sample SD: s = √(SS / (n − 1))
Computational form: s² = (Σx² − (Σx)²/n) / (n − 1)
Variance ↔ SD: σ² = σ × σ, σ = √(σ²)
Z-score: z = (x − mean) / SD
Coefficient of variation: CV = SD / mean × 100%
Standard error of the mean: SE = s / √n
Range: max − min  |  IQR: Q3 − Q1
Empirical rule: 68% / 95% / 99.7% within 1 / 2 / 3 SD
Excel: =STDEV.S(range), =STDEV.P(range), =VAR.S(range), =AVERAGE(range)

Practice Questions

Beginner (with answers)

  1. Find the mean of 4, 8, 6, 5, 3.
  2. For that same data set, what is the sum of the squared deviations from the mean?
  3. If the variance of a data set is 49, what is its standard deviation?
  4. What is the standard deviation of 2, 2, 2, 2?
  5. A data set has mean 50 and standard deviation 10. What is the z-score of the value 65?
Show answers

1) (4+8+6+5+3)/5 = 26/5 = 5.2   2) Deviations −1.2, 2.8, 0.8, −0.2, −2.2; squares 1.44, 7.84, 0.64, 0.04, 4.84 → 14.8   3) √49 = 7   4) 0 — every value equals the mean   5) z = (65 − 50) / 10 = 1.5

Advanced (with answers)

  1. Find the sample standard deviation of 4, 8, 6, 5, 3.
  2. Find both the population and sample standard deviation of 13, 17, 19, 23, 29.
  3. Find the sample standard deviation of 10, 12, 23, 23, 16, 23, 21, 16, and state the mode.
  4. Data has mean 32 and sample SD 8 across 64 observations. What is the standard error of the mean?
  5. Which is relatively more variable: a data set with mean 15 and SD 3, or one with mean 120 and SD 20?
Show answers

1) SS = 14.8, s² = 14.8/4 = 3.7, s ≈ 1.9235   2) Mean 20.2, SS = 148.8; population σ² = 29.76 so σ ≈ 5.4553; sample s² = 37.2 so s ≈ 6.0992   3) Mean 18, SS = 192, s² = 192/7 ≈ 27.4286, s ≈ 5.2372; mode = 23 (appears three times)   4) SE = 8 / √64 = 8 / 8 = 1   5) CV = 3/15 = 20% versus 20/120 ≈ 16.7%, so the first data set is relatively more variable despite its much smaller SD

🔑 Key Takeaways

Frequently Asked Questions

References

Last updated: July 2026
Reviewed by Mohsin Iqbal using standard statistical definitions, with every worked example independently verified. This page is for educational purposes.