Free Standard Deviation Calculator
Paste or type a list of numbers and instantly get the count, sum, mean, variance, and standard deviation. This calculator returns both the population standard deviation (σ, divided by n) and the sample standard deviation (s, divided by n−1) so you always have the right one for your situation.
- Population std dev (σ)
- 2
- Sample variance (s²)
- 4.571429
- Population variance (σ²)
- 4
- Count (n)
- 8
- Sum
- 40
- Mean (average)
- 5
- Minimum
- 2
- Maximum
- 9
- Range
- 7
Use sample (÷ n−1) when your data is a sample of a larger group; use population (÷ n) when it's the entire group.
Quick answer
Standard deviation measures how spread out a set of numbers is around their mean. To compute it: find the mean, subtract it from each value and square the result, average those squared differences (divide by n for a population, or by n−1 for a sample) to get the variance, then take the square root. Example: for 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5 and the squared deviations sum to 32. Dividing by n=8 gives a population variance of 4, so the population standard deviation is √4 = 2. Dividing by n−1=7 gives a sample variance of ≈4.571, so the sample standard deviation is ≈2.138.
Formula & method
Population standard deviation (σ)
sigma = sqrt( sum( (x_i - mu)^2 ) / N )
- sigma — population standard deviation
- x_i — each value in the data set
- mu — population mean (sum of values divided by N)
- N — number of values in the whole population
Sample standard deviation (s)
s = sqrt( sum( (x_i - xbar)^2 ) / (n - 1) )
- s — sample standard deviation
- x_i — each value in the sample
- xbar — sample mean (sum of values divided by n)
- n — number of values in the sample
- n - 1 — degrees of freedom (Bessel's correction)
The calculator first parses your input into a list of numbers, ignoring blank lines and accepting values separated by commas, spaces, or new lines. It counts the values (n), adds them to get the sum, and divides the sum by n to get the mean. For every value it subtracts the mean and squares the result; adding those squared deviations gives the "sum of squares." It then produces two answers from that single sum of squares: dividing by n yields the population variance and its square root is the population standard deviation (σ), while dividing by n−1 yields the sample variance and its square root is the sample standard deviation (s). Min, max, and range (max − min) are reported alongside so you can see the full spread at a glance. Because the only difference between the two results is the divisor, the calculator shows both every time and lets you pick the one that matches your data.
Population (÷n) vs. sample (÷n−1) for the data set 2, 4, 4, 4, 5, 5, 7, 9 (sum of squared deviations = 32)
| Measure | Value |
|---|---|
| Mean | 5 |
| Divisor — population (n) | 8 |
| Divisor — sample (n−1) | 7 |
| Population variance (32 ÷ 8) | 4 |
| Sample variance (32 ÷ 7) | ≈ 4.571 |
| Population standard deviation (σ) | 2 |
| Sample standard deviation (s) | ≈ 2.138 |
Examples
- Input
- 2, 4, 4, 4, 5, 5, 7, 9
- Result
- Mean = 5, population SD = 2, sample SD ≈ 2.138
- Why
- n = 8 and the sum is 2+4+4+4+5+5+7+9 = 40, so the mean is 40 ÷ 8 = 5. The squared deviations from 5 are 9, 1, 1, 1, 0, 0, 4, 16, which add up to 32. Population: variance = 32 ÷ 8 = 4, so σ = √4 = 2. Sample: variance = 32 ÷ 7 ≈ 4.571, so s = √4.571 ≈ 2.138.
- Input
- 2, 4, 6, 8, 10
- Result
- Mean = 6, population SD ≈ 2.828, sample SD ≈ 3.162
- Why
- n = 5 and the sum is 30, so the mean is 30 ÷ 5 = 6. The squared deviations are 16, 4, 0, 4, 16, summing to 40. Population: variance = 40 ÷ 5 = 8, so σ = √8 ≈ 2.828. Sample: variance = 40 ÷ 4 = 10, so s = √10 ≈ 3.162.
- Input
- 10, 12, 23, 23, 16, 23, 21, 16
- Result
- Mean = 18, population SD ≈ 4.899, sample SD ≈ 5.237
- Why
- n = 8 and the sum is 144, so the mean is 144 ÷ 8 = 18. The squared deviations are 64, 36, 25, 25, 4, 25, 9, 4, which total 192. Population: variance = 192 ÷ 8 = 24, so σ = √24 ≈ 4.899. Sample: variance = 192 ÷ 7 ≈ 27.429, so s = √27.429 ≈ 5.237.
When to use this tool
- Summarizing how consistent or spread out a set of measurements is — test scores, response times, prices, or sensor readings — in a single number.
- Choosing between two options with similar averages: the one with the smaller standard deviation is more consistent and less risky.
- Preparing statistics for a lab report, finance model, or quality-control chart where you need variance and standard deviation, and must report the correct population vs. sample version.
Common mistakes
- Using the population formula (÷n) when you actually have a sample. If your numbers are a subset drawn to estimate a larger group, divide by n−1 (sample SD); using n underestimates the true spread.
- Forgetting to square the deviations or taking the square root too early. You must square each (value − mean) first, then average, and only take the square root at the very end — that final root gives the standard deviation, not the variance.
- Confusing variance with standard deviation. Variance is in squared units; standard deviation is its square root and is in the same units as the original data. Reporting the variance as the 'standard deviation' inflates the number.
Frequently asked questions
What is the difference between population and sample standard deviation?
Both measure spread, but they use a different divisor. Population standard deviation (σ) divides the sum of squared deviations by N and is used when your data covers the entire group you care about. Sample standard deviation (s) divides by n−1 instead of n, which corrects for the fact that a sample tends to underestimate the true spread; use it when your data is a sample drawn to estimate a larger population.
Why does the sample formula divide by n−1 instead of n?
This is called Bessel's correction. A sample's mean is itself estimated from the sample, which makes the squared deviations slightly too small on average. Dividing by n−1 (the degrees of freedom) compensates, giving an unbiased estimate of the population variance. That is why the sample standard deviation is always a little larger than the population value for the same numbers.
Should I use population or sample standard deviation?
If your data is the complete set you want to describe (for example, the test scores of every student in one class, treated as the whole population), use the population version. If your data is a sample used to draw conclusions about a bigger group you did not fully measure, use the sample version. When in doubt in research and statistics, the sample standard deviation (÷n−1) is the more common default.
What is variance, and how does it relate to standard deviation?
Variance is the average of the squared deviations from the mean. Standard deviation is simply the square root of the variance. Variance is expressed in squared units (for example, dollars squared), while standard deviation is in the original units (dollars), which makes it easier to interpret.
Can the standard deviation be zero or negative?
It can be zero, but never negative. A standard deviation of zero means every value in the data set is identical, so there is no spread. Because it is defined as the square root of an average of squared numbers, the result is always zero or positive.
How do I enter my numbers?
Type or paste your values separated by commas, spaces, or new lines — for example '2, 4, 4, 4, 5, 5, 7, 9' or one number per line. Blank lines are ignored. The calculator instantly reports the count, sum, mean, variance, range, and both standard deviations.
Sources & references
- NIST/SEMATECH e-Handbook of Statistical Methods — Measures of Scale (Standard Deviation)
- Khan Academy — Population and sample standard deviation review
External references open in a new tab. We are independent and not affiliated with these organizations.
- ✓ Free to use
- ✓ No sign-up required
- ✓ Runs entirely in your browser — nothing is uploaded.
- ✓ Formula and method shown above
Provided “as is” for general information only — results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.
Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards.
Related tools
- Average CalculatorCalculators
- Scientific CalculatorScience & Engineering
- Percentage CalculatorCalculators
- Basic CalculatorCalculators
Embed this tool on your site
Free to embed, no sign-up. Paste this code where you want the standard deviation calculator to appear: