Get a free quote
Statistics & methods guide

What is standard deviation? Formula, examples and interpretation

Standard deviation tells you how spread out your data are around the mean. This guide explains the idea in plain terms, walks through the sample standard deviation formula step by step, and shows how it connects to z-scores, the normal distribution and APA-style reporting.

7-minute readUpdated 17 October 2026By the Gradwise academic team

Key takeaways

  • Standard deviation is the typical distance of data points from the mean, in the same units as the data.
  • Use the sample formula, dividing by n − 1, when your data are a sample from a larger population, which is almost always.
  • Variance is the standard deviation squared; standard error is the standard deviation divided by √n and describes the precision of the mean, not the spread of the data.
  • In a normal distribution, about 68%, 95% and 99.7% of values fall within 1, 2 and 3 standard deviations of the mean.
  • Report the mean and standard deviation together, for example M = 5.00, SD = 2.19.

What is standard deviation in statistics?

Standard deviation is a measure of spread: it describes how far, on average, individual values sit from the mean of a dataset. A small standard deviation means scores cluster tightly around the mean; a large one means they are widely scattered. Because it is expressed in the same units as the original data, it is easy to interpret alongside the mean.

Two classes can both average 70% on an exam. If one has a standard deviation of 4 points and the other 15 points, the first class performed consistently while the second had a mix of very high and very low scores. The mean alone hides that difference.

Standard deviation formula: sample vs population

There are two versions of the formula. The difference is the denominator.

FormulaWhen to use it
Sample standard deviation (s)s = √[ Σ(x − x̄)² / (n − 1) ]Your data are a sample and you want to estimate the spread in the wider population. This is the default in research and in SPSS, R and Excel’s STDEV.S.
Population standard deviation (σ)σ = √[ Σ(x − μ)² / N ]You have every member of the population you care about, such as all 30 students in one class, and you are not generalising beyond it.

Where x is each value, x̄ is the sample mean, μ is the population mean, n is the sample size, N is the population size and Σ means “add up”.

Why divide by n − 1? A sample’s values sit, on average, slightly closer to their own mean than to the true population mean, so dividing by n would underestimate the population variance. Dividing by n − 1 (Bessel’s correction) fixes that bias in the variance. The quantity n − 1 is also the degrees of freedom: once the mean is known, only n − 1 values are free to vary.

How to find the sample standard deviation, step by step

Suppose six students report how many hours they studied for a quiz: 2, 4, 4, 5, 7, 8.

  1. Find the mean. Sum = 2 + 4 + 4 + 5 + 7 + 8 = 30. Mean = 30 / 6 = 5.
  2. Subtract the mean from each value. −3, −1, −1, 0, 2, 3. (These always sum to zero, which is a useful check.)
  3. Square each deviation. 9, 1, 1, 0, 4, 9.
  4. Add the squares. Σ(x − x̄)² = 24. This is the sum of squares.
  5. Divide by n − 1. 24 / 5 = 4.8. This is the sample variance, s².
  6. Take the square root. s = √4.8 ≈ 2.19 hours.
xx − x̄(x − x̄)²
2−39
4−11
4−11
500
724
839
Sum = 30024

If these six students were the entire population of interest, you would divide by 6 instead: σ² = 24 / 6 = 4, so σ = 2.00 hours.

Variance, standard deviation and standard error

These three are often confused, and mixing them up is one of the most common errors examiners spot in results chapters.

  • Variance (s²) is the average squared deviation. It is used inside many tests (ANOVA partitions variance), but its units are squared, so it is hard to interpret directly. In the example, s² = 4.8 hours².
  • Standard deviation (s) is the square root of the variance and describes how spread out individual observations are. Here, 2.19 hours.
  • Standard error of the mean (SE = s / √n) describes how precisely the sample mean estimates the population mean. Here, 2.19 / √6 ≈ 0.89 hours. It shrinks as the sample grows, whereas the standard deviation does not.

Use the standard deviation when describing your sample. Use the standard error when building confidence intervals and hypothesis tests. Error bars on a graph should say which one they show.

Want a second pair of eyes? Need your descriptive statistics checked or explained before your results chapter goes in? We can walk through them with you. See statistics help.

Standard deviation and the normal distribution

Many variables, such as heights, measurement errors and scores on well-designed tests, follow a roughly bell-shaped normal distribution. A normal distribution is fully described by its mean (μ) and standard deviation (σ). Its density formula is:

f(x) = [1 / (σ√(2π))] · e^(−(x − μ)² / (2σ²))

You will rarely calculate that by hand. What matters in practice is the empirical rule, the normal distribution percentages:

RangeShare of values
μ ± 1σabout 68%
μ ± 2σabout 95% (exactly 95% at ± 1.96σ)
μ ± 3σabout 99.7%

So if IQ scores have a mean of 100 and a standard deviation of 15, roughly 68% of people score between 85 and 115, and about 95% between 70 and 130. The standard normal distribution is the special case with μ = 0 and σ = 1, which is the scale z-scores use.

Z-scores: how many standard deviations from the mean

A z-score converts a raw value into standard deviation units:

z = (x − x̄) / s

In the study-hours example, the student who studied 8 hours has z = (8 − 5) / 2.19 ≈ 1.37, about 1.4 standard deviations above the mean. An IQ of 130 has z = (130 − 100) / 15 = 2.00. In a normal distribution about 97.7% of people score below z = 2, so that person is roughly in the top 2.3%.

Z-scores let you compare values measured on different scales, flag potential outliers (values beyond about ±3 deserve a look) and standardise variables before some analyses, such as when comparing regression coefficients.

Calculating standard deviation in Excel, SPSS and R

You will rarely calculate standard deviation by hand outside an exam, but you should know which function your software uses, because some offer both versions.

SoftwareSample SD (n − 1)Population SD (N)
Excel / Google Sheets=STDEV.S(A2:A7)=STDEV.P(A2:A7)
SPSSAnalyze → Descriptive Statistics → Descriptives (reports the sample SD by default)Not offered directly; multiply the sample variance by (n − 1)/n, then take the square root
Rsd(x)sqrt(mean((x - mean(x))^2))
Python (NumPy)np.std(x, ddof=1)np.std(x) (the default uses N)

The NumPy default catches many people out: it divides by N unless you set ddof=1. On the study-hours data, np.std(x) returns 2.00 while sd(x) in R returns 2.19. Neither is wrong; they answer different questions.

Two more checks before you report a standard deviation. First, confirm missing values are coded as missing, not as 0 or 99, which would inflate the spread. Second, check that reverse-scored questionnaire items have been recoded before you compute scale scores, otherwise both the mean and SD will be distorted.

How to interpret and report standard deviation

A standard deviation is “large” or “small” only relative to the mean and the scale. Ask: compared with the range of possible scores, how much do people differ? On a 1–5 scale, SD = 1.2 is a lot of disagreement; on a 0–100 test, SD = 1.2 is remarkably uniform.

A few practical rules:

  • For skewed data, such as income or reaction times, the mean and standard deviation can mislead. Report the median and interquartile range instead or as well.
  • The standard deviation is sensitive to outliers because deviations are squared. Check a histogram.
  • For roughly normal data, the mean ± 2 SD should sit comfortably inside the possible range. If a 1–5 scale has M = 4.6 and SD = 0.9, the mean + 2 SD exceeds the maximum, a sign of a ceiling effect and a skewed distribution.
  • The coefficient of variation (SD / M) helps compare spread across variables with different means, but only for ratio-scale data.

In APA 7 style, italicise M and SD and round to two decimals:

Participants studied for an average of 5.00 hours (SD = 2.19) before the quiz.

Or in parentheses: (M = 5.00, SD = 2.19). For several variables, a descriptive statistics table with n, M and SD columns is clearer. If you want someone to check your descriptive tables before they go to your supervisor, our statistics help covers that, and our guide to choosing a statistical test shows what comes next.

Frequently asked questions

What does standard deviation show?
It shows how much individual values typically differ from the mean. A low standard deviation means values are close to the average; a high one means they are spread out.
What does mean and standard deviation mean together?
The mean tells you the centre of the data and the standard deviation tells you the spread around it. Reported together, they give a compact summary of a roughly symmetrical distribution.
How do you find the mean, standard deviation and variance?
Add the values and divide by n to get the mean. Square each value’s distance from the mean, add them, and divide by n − 1 to get the sample variance. The square root of the variance is the standard deviation.
Can standard deviation be negative?
No. It is a square root of an average of squared distances, so it is zero when all values are identical and positive otherwise.
Should I use n or n − 1?
Use n − 1 when your data are a sample and you want to describe or generalise to a larger population, which is the usual case in research. Use n only when you have the entire population and are not generalising.
WhatsApp Get a free quote