Statistics
Standard deviation calculator
Find the standard deviation, variance, mean and quartiles of a list of numbers. Enter your data, choose sample or population, and the result appears instantly with every step of the working.
Separate numbers with commas, spaces or new lines, or paste a spreadsheet column. Decimals and negatives are fine.
Your results will appear here: the standard deviation first, then the rest of the summary and a chart.
Standard deviation (sample)
3.04432
Your values typically sit about 3.04 above or below their mean of 15.88, in the same units as your data. 5 of 8 values (63%) fall between 12.83 and 18.92, within one standard deviation of the mean; for normally distributed data about 68% would.
- Count (n)
- 8
- Mean (x̄)
- 15.875
- Variance (s²)
- 9.26786
- Standard error
- 1.07633
- Minimum
- 12
- Q1 (25%)
- 13.75
- Median
- 15.5
- Q3 (75%)
- 17.5
- Maximum
- 21
- Range
- 9
More statistics (5)
- Relative SD (%RSD)
- 19.1768%
- Coefficient of variation
- 0.191768
- Sum (Σx)
- 127
- Sum of squares, Σ(x − x̄)²
- 64.875
- IQR (Q3 − Q1)
- 3.75
Data distribution
Shaded bands mark ±1, ±2 and ±3 SD from the mean. 5 of 8 values (63%) fall within ±1 SD.
Chart as text
Mean 15.875, sample standard deviation s = 3.04432, from 8 values between 12 and 21.
- Within ±1 SD (12.83 to 18.92): 5 of 8 values (63%). About 68% for normal data.
- Within ±2 SD: 8 (100%). About 95% for normal data.
- Within ±3 SD: 8 (100%). About 99.7% for normal data.
Show the working, step by step
What is standard deviation?
Standard deviation measures how spread out numbers are around their mean. A low standard deviation means the values sit close to the average; a high one means they are scattered widely.
The mean tells you where a set of numbers sits. The standard deviation tells you how tightly
they cluster around that point. Two datasets can share an identical mean and describe
completely different situations: 50, 50, 50 and 0, 50, 100 both
average 50, but the first has a standard deviation of 0 and the second of about 41.
Because it is calculated by squaring the distance of each value from the mean and then taking a square root at the end, the standard deviation comes back in the same units as your original data. If you measured heights in centimetres, the standard deviation is in centimetres. That is its practical advantage over the variance, which is in centimetres squared and so is harder to reason about directly.
As a rough guide, for data that follows a normal distribution roughly 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. The chart above shades those bands on your own numbers and reports what fraction actually landed inside the first one, which is a useful reality check on whether your data is anywhere near normal. More on what standard deviation means.
The formula
The sample and population standard deviations differ in one place only: the denominator.
Sample standard deviation
s = √( Σ(xᵢ − x̄)² ⁄ (n − 1) )
- s — sample standard deviation
- xᵢ — each value; x̄ — the sample mean
- n — number of values
Population standard deviation
σ = √( Σ(xᵢ − μ)² ⁄ N )
- σ — population standard deviation
- xᵢ — each value; μ — the population mean
- N — number of values in the population
Everything else — squaring the deviations so that values above and below the mean cannot cancel, summing them, then taking the square root to get back to the original units — is identical. The formula page works through why each step is there, and the notation page covers what σ, s, μ and x̄ each refer to.
Sample vs population standard deviation
The choice turns on one question: are your numbers the whole group you want to describe, or part of it?
| Use | When your data is | Example |
|---|---|---|
| Sample (n − 1) | A subset used to say something about a larger group | 30 patients in a trial, a survey of 500 residents, one week of readings |
| Population (N) | Every member of the group you care about | Every student in one class, all 12 months of last year's sales |
Sample is the right answer far more often than people expect, which is why it is the default above. Dividing by n − 1 corrects for the fact that a sample's own mean sits closer to its data than the true population mean does. The gap between the two answers is large for small datasets and shrinks as n grows: at n = 5 the sample figure is about 12% larger, at n = 100 about 0.5%. The full comparison, with the gap at each sample size.
Worked example
Take the eight values 2, 4, 4, 4, 5, 5, 7, 9, treated first as a complete
population:
- Find the mean. 40 ÷ 8 = 5.
- Subtract the mean from each value. The deviations are −3, −1, −1, −1, 0, 0, 2, 4.
- Square each deviation. 9, 1, 1, 1, 0, 0, 4, 16.
- Add the squares. Σ(x − μ)² = 32.
- Divide by N = 8 for the variance: 32 ÷ 8 = 4.
- Take the square root. σ = √4 = 2.
Treat the same eight numbers as a sample and only the last two steps change: 32 ÷ 7 = 4.571, and √4.571 = 2.138. The sample figure is larger, as Bessel's correction always makes it. Load these numbers into the calculator and switch between the two modes to watch the denominator change.
How to read the result
A standard deviation has no universal scale — it carries the units of your data, so there is no threshold above which it becomes "high". What makes it interpretable is comparing it to the mean it came from:
| SD relative to the mean | Reads as | Typical of |
|---|---|---|
| under 10% | Tightly clustered | Instrument readings, manufactured dimensions, adult body temperature |
| 10–30% | Moderate spread | Exam scores, heights, reaction times |
| over 30% | Highly variable | Incomes, waiting times, website session lengths |
| 0 | Every value identical | Usually a copy-paste error worth checking |
That ratio has a name — the relative standard deviation, or coefficient of variation — and it is the only honest way to compare spread between two datasets measured in different units. The bands above are conventions, not rules; a 5% spread is alarming in a pharmaceutical assay and remarkable consistency in a monthly sales figure.
To place a single value rather than judge the whole set, convert it to a z-score — the number of standard deviations it sits from the mean. To see the shape rather than the summary, plot it with the σ bands drawn on.
Common mistakes
- Averaging standard deviations. To combine the spread of several groups you must average the variances, weighted by degrees of freedom, and take the square root at the end. Averaging the standard deviations themselves gives a different and wrong answer. Use the pooled SD calculator.
- Reaching for population because the word "population" appears in the problem. What matters is whether your numbers are the whole group, not what the group is called. A survey of 500 residents of a city is a sample, not a population.
- Comparing standard deviations across different units or wildly different means. An SD of 5 means something quite different against a mean of 10 than against a mean of 10,000. Use the relative standard deviation for that comparison.
- Assuming the 68–95–99.7 rule always applies. Those percentages hold for a normal distribution. On skewed data — incomes, waiting times, most count data — they can be badly off.
If your data is not a plain list
The calculator takes raw values and reports the sample or population standard deviation from them. Data does not always arrive in that shape:
| What you have | Where to go |
|---|---|
| A frequency table — class intervals and counts | Grouped data SD calculator |
| Values with weights attached | Weighted SD calculator |
| Several groups, each with its own n and SD | Pooled SD calculator |
| A variance, and you want the SD | Variance calculator — or just take its square root |
| A standard error, and you want the SD behind it | Standard error calculator |
| Only a mean and an SD, and you want the curve | Bell curve generator |
Everything about standard deviation
This site is built around one statistic. If you are starting from scratch, the pages below run roughly from "what is it" to "how do I get it out of my software".
Understanding it
Calculating it
Getting it out of software
- Excel — STDEV.S vs STDEV.P
- TI-84 — the keystrokes, Sx vs σx
- Python — NumPy, pandas and ddof
- R — sd() and the population figure
- Psychology — APA reporting, IQ scales
- All guides
Related calculators
-
Variance calculator
The same computation stopped one step earlier, before the square root.
-
Relative SD (%RSD)
Spread as a percentage of the mean, for comparing across different units.
-
Z-score calculator
How many standard deviations a single value sits from the mean.
-
Standard error
How much a sample mean would wobble if you sampled again.
-
Pooled SD
Combine the spread of two or more groups into one figure.
-
Grouped data SD
For data that arrives as class intervals and frequencies.
Common questions
Should I choose sample or population?
Choose population only when your numbers are the entire group you care about — every student in one class, all twelve months of last year's sales. Choose sample when the numbers are a subset you are using to say something about a larger group.
Sample is the right answer far more often than people expect, and it is the default here. If you are unsure, use sample: it gives the slightly larger, more cautious estimate. The full comparison is here.
Why does the sample formula divide by n − 1 instead of n?
Because a sample's own mean sits closer to its own data than the true population mean does. Measuring spread around that too-convenient centre makes the data look less varied than the population really is. Dividing by n − 1 rather than n inflates the result just enough to cancel that bias out.
This is Bessel's correction. The effect is large for small samples — with n = 5 it raises the variance by 25% — and negligible once n is in the hundreds.
What counts as a high standard deviation?
There is no universal threshold, because standard deviation carries the units of your data. An SD of 3 is enormous for adult body temperature in °C and trivial for house prices in dollars.
To compare spread across different units or very different means, use the relative standard deviation, which expresses the SD as a percentage of the mean and so has no units.
Can I paste a column from Excel or Google Sheets?
Yes. Copy the cells and paste them straight into the box — the line breaks and tabs are handled. Anything that is not a number, such as a header row or a currency symbol, is skipped and reported above the results so you can see exactly what was ignored.
Is my data sent anywhere?
No. The whole calculation runs in your browser in JavaScript. Nothing you type is uploaded, logged or stored, and the page works offline once it has loaded.
How precise is the result?
Calculations run at full IEEE-754 double precision and use Welford's algorithm, which stays accurate on data with a large mean and a small spread — the case where the common textbook shortcut loses most of its significant digits. Displayed values are rounded to six significant figures. The method is documented in full.