Enter your data set to calculate mean, standard deviation, variance, and more.
| # | xᵢ | xᵢ − x̄ | (xᵢ − x̄)² |
|---|
Standard Deviation Explained
Standard deviation measures how far values typically sit from their mean. For the data 4, 7, 13, 16, 21, 2, 8, 11, 19, 5 the mean is 10.6 and the sample standard deviation is 6.52, or 6.18 if those ten values are the whole population. Paste your own numbers above to get both versions, the variance and every step of the working.
Standard deviation measures how spread out values in a data set are from the mean. A low SD means values cluster tightly around the mean. A high SD means values are spread out widely. It is the most widely used measure of variability in statistics.
There are two versions: population SD (σ) divides by n: used when you have all values for the entire population. Sample SD (s) divides by n−1: used when your data is a sample from a larger population (the most common real-world case). Dividing by n−1 corrects for the bias that comes from estimating the population mean from a sample.
Sample SD: s = √( Σ(xᵢ − x̄)² / (n−1) )
Variance: σ² or s² = (SD)²
Mean: x̄ = Σxᵢ / n
Population vs Sample SD
The 68-95-99.7 Rule
Coefficient of Variation
Real-World Uses
Worked Example: Sample vs Population
The ten values loaded in the calculator add up to 106, so the mean is 106 ÷ 10 = 10.6. Next, subtract the mean from each value and square the result.
| x | x − mean | (x − mean)² | x | x − mean | (x − mean)² |
|---|---|---|---|---|---|
| 4 | −6.6 | 43.56 | 2 | −8.6 | 73.96 |
| 7 | −3.6 | 12.96 | 8 | −2.6 | 6.76 |
| 13 | 2.4 | 5.76 | 11 | 0.4 | 0.16 |
| 16 | 5.4 | 29.16 | 19 | 8.4 | 70.56 |
| 21 | 10.4 | 108.16 | 5 | −5.6 | 31.36 |
The squared deviations add up to 382.4. From there the two versions split:
- Sample: variance = 382.4 ÷ 9 = 42.49, and SD = √42.49 = 6.52.
- Population: variance = 382.4 ÷ 10 = 38.24, and SD = √38.24 = 6.18.
How Much Dividing by n − 1 Changes the Result
For the same data the sample SD is always larger than the population SD, by a factor of √(n ÷ (n − 1)). The gap matters for small data sets and all but disappears for large ones.
| Values (n) | Sample SD ÷ population SD | Sample SD is larger by |
|---|---|---|
| 2 | 1.414 | 41.4% |
| 3 | 1.225 | 22.5% |
| 5 | 1.118 | 11.8% |
| 10 | 1.054 | 5.4% |
| 30 | 1.017 | 1.7% |
| 100 | 1.005 | 0.5% |
| 1,000 | 1.001 | 0.1% |
The same choice in spreadsheets and calculators
| Tool | Sample (n − 1) | Population (n) |
|---|---|---|
| Excel | STDEV.S (or older STDEV) | STDEV.P (or older STDEVP) |
| Google Sheets | STDEV or STDEV.S | STDEVP or STDEV.P |
| Variance in Excel | VAR.S | VAR.P |
| TI-84 (1-Var Stats) | Sx | σx |
Edge Cases and Common Mistakes
- Only one value. The sample SD is undefined because you would divide by n − 1 = 0, so the calculator asks for at least two numbers.
- All values the same. {5, 5, 5, 5} gives an SD of exactly 0. That is correct, and usually worth a second look at the data.
- Commas inside numbers. The calculator treats commas, spaces and new lines as separators, so 1,500 is read as two values, 1 and 500. Type large numbers without thousands separators.
- Negative values are fine. Returns such as −3.7% work normally. The SD itself is never negative, because it is the square root of an average of squares.
- Picking the wrong version. Use population only when you truly have every member of the group. Survey responses, lab measurements and test samples are samples.
- Applying the 68-95-99.7 rule to skewed data. The rule only holds for data that is roughly bell shaped. For incomes, house prices and anything with a long tail, the median and interquartile range describe the data better.
For the mean, median and mode alone, the average calculator is quicker.
Method and sources. Population SD σ = √(Σ(x − μ)² ÷ n); sample SD s = √(Σ(x − x̄)² ÷ (n − 1)), the Bessel correction for estimating spread from a sample. Standard error = s ÷ √n. Definitions follow the NIST/SEMATECH e-Handbook of Statistical Methods. Every figure in the tables above was computed with the same formulas the calculator uses.
Frequently Asked Questions
What is standard deviation in simple terms?
Standard deviation tells you how spread out your data is. If everyone in a class scored exactly 75 on a test, the SD is 0: no spread at all. If scores ranged from 40 to 100, the SD would be high. More precisely, it measures the average distance each data point is from the mean. Low SD = data clusters near the mean. High SD = data is spread wide. It's expressed in the same units as your data: so if your data is in kg, so is the SD.
What is the difference between standard deviation and variance?
Variance is the average squared distance from the mean. Standard deviation is the square root of variance. Variance is harder to interpret because it's in squared units (e.g., kg²), while SD is in the original units (kg). Both measure spread; SD is more interpretable. Variance is used in mathematical formulas and statistical tests. The relationship: Variance = SD² and SD = √Variance.
When should I use population vs sample standard deviation?
Population SD (divides by n): Use when you have data for an entire population, all students in a school, all products from a batch. Sample SD (divides by n−1): Use when your data is a sample drawn from a larger population, survey results, lab measurements, any research data. In practice, sample SD is almost always the right choice, you rarely have complete population data. Excel's STDEV() uses sample SD; STDEVP() uses population SD.
How do you calculate standard deviation step by step?
Step 1: Find the mean, add all values and divide by n. Step 2: Subtract the mean from each value to find the deviation. Step 3: Square each deviation (this removes negatives and emphasizes outliers). Step 4: Sum the squared deviations. Step 5: Divide by n (population) or n−1 (sample) to get the variance. Step 6: Take the square root to get the standard deviation. This calculator shows all these steps with your actual data.
What is a good standard deviation value?
There's no universal "good" standard deviation: it depends entirely on the context. A body temperature SD of 0.5°C is normal; 5°C would indicate something is wrong with your data. The coefficient of variation (CV = SD/Mean × 100%) is more meaningful for comparison. In manufacturing, a CV under 1% is excellent precision. In financial returns, annual SD of 15 to 20% is typical for equities. Compare SD to your mean: if SD is larger than your mean, your data is highly variable.
How does standard deviation relate to the normal distribution?
In a normal (bell-curve) distribution, standard deviation defines the shape: 68% of values fall within 1 SD of the mean (mean ± 1σ). 95% fall within 2 SDs (mean ± 2σ). 99.7% fall within 3 SDs (mean ± 3σ). This is the 68-95-99.7 rule (or empirical rule). Values beyond 2 SDs are statistically unusual (~5% of the time). Values beyond 3 SDs are rare (~0.3%). This framework is used in quality control, grading curves, and statistical hypothesis testing.
How do outliers affect standard deviation?
Outliers significantly inflate standard deviation because SD squares the deviations: a value far from the mean contributes disproportionately. Example: the data set {1, 2, 3, 4, 100} has a mean of 22 and a sample SD of about 43.6. Without 100, mean = 2.5 and SD = 1.3. When outliers are present, median and interquartile range (IQR) are often more appropriate than mean and SD for describing the data. This calculator flags values more than 2 SDs from the mean as potential outliers.
What is the standard error and how is it different from standard deviation?
Standard deviation measures the variability of individual data points around the mean. Standard error (SE) measures how precisely the sample mean estimates the true population mean: SE = SD / √n. As sample size increases, SE decreases (larger samples give more precise estimates), but SD doesn't change systematically. SD describes variability in your sample data. SE describes uncertainty about the true population mean. SE is used in confidence intervals and hypothesis tests; SD describes the data distribution.
How is standard deviation used in finance?
In finance, standard deviation is the primary measure of investment risk (volatility). A stock or portfolio with a high SD of returns is more volatile: larger swings both up and down. Annual SD of returns: money market funds ~0.1%; bond funds ~3 to 7%; diversified equity funds ~15 to 20%; individual stocks ~25 to 50%+. The Sharpe Ratio (return / SD) measures return per unit of risk. Modern Portfolio Theory uses SD as the key risk metric for portfolio optimization. Higher expected returns come with higher SD.
What does it mean if standard deviation is 0?
A standard deviation of 0 means all values in the data set are identical, there is zero variability. Example: the data set {5, 5, 5, 5, 5} has mean = 5 and SD = 0. This happens in practice when: all measurements give the same result (perfect precision or a broken instrument); a variable is actually a constant; or there's a data entry error. SD of 0 is mathematically valid but should prompt you to check your data for errors or unusual conditions.
Why do you divide by n minus 1 for a sample standard deviation?
Because a sample’s own mean sits closer to its values than the true population mean does, so dividing by n would understate the spread. Dividing by n − 1 (Bessel’s correction) removes that bias from the variance. The effect is large for small samples, about 41% on the SD with 2 values and 5.4% with 10, and under 1% once you pass 100 values.
Can standard deviation be negative or larger than the mean?
It can never be negative: it is the square root of an average of squared distances, so the smallest possible value is 0, when every value is identical. It can be larger than the mean, which happens when the data is very spread out or includes negative values. For {1, 2, 3, 4, 100} the mean is 22 and the sample SD is 43.6.