Standard Deviation Calculator
Calculate the standard deviation of a dataset.
What is Standard Deviation?
Standard deviation measures how spread out numbers are from their average (mean). A low standard deviation means values cluster tightly around the mean; a high standard deviation means values are widely scattered. It's the most common measure of variability in statistics, finance, science, and quality control.
Standard deviation is the square root of variance and is expressed in the same units as the original data. If test scores have a mean of 75 and standard deviation of 10, then typical scores fall within 75 ± 10 (between 65 and 85).
Key insight: In a normal distribution, 68% of values fall within ±1 standard deviation of the mean, 95% within ±2 standard deviations, and 99.7% within ±3 standard deviations. This "68-95-99.7 rule" makes standard deviation indispensable for understanding data distributions.
Formulas Explained
Sample standard deviation (most common):
s = √[ Σ(xᵢ - x̄)² / (n - 1) ]
Population standard deviation:
σ = √[ Σ(xᵢ - μ)² / N ]
Where:
xᵢ = each individual value
x̄ = sample mean (average)
μ = population mean
n = sample size
N = population size
Σ = sum of
Why divide by (n-1) for samples?
Using (n-1) instead of n gives an unbiased estimate of population variance. This "Bessel's correction" compensates for the fact that sample mean x̄ is itself estimated from the data, making deviations slightly smaller than they would be from the true population mean.
Step-by-step calculation:
- Calculate the mean: x̄ = Σxᵢ / n
- Find each deviation: (xᵢ - x̄)
- Square each deviation: (xᵢ - x̄)²
- Sum squared deviations: Σ(xᵢ - x̄)²
- Divide by (n-1): variance = Σ(xᵢ - x̄)² / (n-1)
- Take square root: standard deviation = √variance
Step-by-Step Guide
- Enter your data: Input comma-separated numbers. Example: 2, 4, 4, 4, 5, 5, 7, 9
- Click calculate: The calculator computes mean, variance, and standard deviation
- Read your results: Mean = 5, Sample SD = 2.14, Population SD = 1.87
- Interpret: Values typically fall within 5 ± 2.14 (between 2.86 and 7.14)
- Check outliers: Values beyond ±2 SD from mean may be outliers
Real Examples with Calculations
Example 1: Test score analysis
Scores: 72, 75, 78, 80, 82, 85, 88, 90, 92, 95
Mean: (72+75+78+80+82+85+88+90+92+95) / 10 = 837/10 = 83.7
Deviations: -11.7, -8.7, -5.7, -3.7, -1.7, 1.3, 4.3, 6.3, 8.3, 11.3
Squared deviations: 136.89, 75.69, 32.49, 13.69, 2.89, 1.69, 18.49, 39.69, 68.89, 127.69
Sum: 518.1
Variance: 518.1 / 9 = 57.57
Standard deviation: √57.57 = 7.59
Application: 68% of students scored between 76.1 and 91.3 (within 1 SD).
Example 2: Investment volatility
Annual returns over 5 years: 8%, 12%, -5%, 15%, 7%
Mean: (8+12-5+15+7) / 5 = 37/5 = 7.4%
Deviations: 0.6, 4.6, -12.4, 7.6, -0.4
Squared: 0.36, 21.16, 153.76, 57.76, 0.16
Sum: 233.2
Variance: 233.2 / 4 = 58.3
Standard deviation: √58.3 = 7.64%
Application: Higher SD = higher risk. This fund's 7.64% SD indicates moderate volatility.
Example 3: Manufacturing quality control
Bolt diameters (mm): 10.02, 9.98, 10.01, 9.99, 10.00, 10.03, 9.97, 10.01
Mean: 80.01 / 8 = 10.001 mm
Standard deviation: 0.021 mm
Application: Six Sigma requires ±6 SD within tolerance. If tolerance is ±0.05 mm, process capability = 0.05 / 0.021 = 2.38 SD (not yet Six Sigma quality).
Example 4: A/B testing conversion rates
Variant A conversions (daily): 45, 52, 48, 51, 49, 53, 47
Mean: 345 / 7 = 49.3 conversions/day
SD: 2.87
Variant B: mean = 54.1, SD = 3.21
Application: Difference (4.8) exceeds 1 SD, suggesting Variant B may be genuinely better. Statistical significance testing (t-test) confirms whether difference is real or random.
Example 5: Weather variability
Daily high temperatures (°F) in July: 85, 88, 82, 90, 87, 84, 89, 91, 86, 88
Mean: 870 / 10 = 87°F
SD: 2.87°F
Application: Low SD indicates stable weather. Compare to another city with SD = 8°F — that city has much more variable summer temperatures.
4 Common Mistakes
- Confusing sample vs population SD: Use (n-1) for samples (most cases), use N for entire populations. Sample SD is slightly larger, compensating for estimation uncertainty. In practice, you usually have a sample, not the full population.
- Interpreting SD without context: SD = 10 could be large (for test scores with mean 75) or small (for salaries with mean $75,000). Always compare SD to the mean using the coefficient of variation: CV = SD/mean.
- Assuming normal distribution: The 68-95-99.7 rule only applies to normal distributions. Skewed data (like incomes) can have most values far from "mean ± 1 SD." Always visualize your data distribution.
- Using SD for outlier detection without caution: Values beyond ±3 SD are rare in normal data, but in small samples (n < 30), extreme values occur more often. Use IQR (interquartile range) for robust outlier detection in skewed data.
4 Pro Tips
- Use coefficient of variation (CV) for comparison: CV = SD / mean expresses variability as a percentage. Dataset A: mean=100, SD=15, CV=15%. Dataset B: mean=1000, SD=50, CV=5%. Despite larger SD, B is relatively more consistent.
- Apply the empirical rule for quick estimates: For roughly normal data, range ≈ 4×SD (covers 95% of values). If data ranges from 40 to 100, estimate SD ≈ (100-40)/4 = 15. Useful for sanity-checking calculations.
- Transform skewed data before using SD: For right-skewed data (incomes, house prices), use log transformation. Calculate SD of log(values), then interpret geometrically. This gives more meaningful variability measures.
- Combine SD with confidence intervals: 95% CI for mean = x̄ ± (1.96 × SD/√n). For the test score example: 83.7 ± (1.96 × 7.59/√10) = 83.7 ± 4.7 = [79.0, 88.4]. We're 95% confident the true mean falls in this range.
FAQs
Variance is the average of squared deviations; standard deviation is its square root. SD is in the original units (e.g., dollars, not dollars²), making it easier to interpret. Variance is mathematically convenient; SD is practically meaningful.
No. Standard deviation is always zero or positive. It's the square root of variance, and variance is a sum of squared terms (always non-negative). SD = 0 only when all values are identical.
SD is less meaningful for: (1) highly skewed distributions (use median and IQR instead), (2) multimodal data with multiple peaks, (3) categorical data, (4) data with extreme outliers that dominate the calculation.
Sample SD estimates population SD more accurately with larger n, but the SD value itself doesn't systematically increase or decrease with n. However, the standard error of the mean (SD/√n) decreases as n grows, making the mean estimate more precise.
Related Calculators
Explore our statistics calculators: Variance Calculator, Median Calculator, Quartile Calculator, Factorial Calculator, Percentage Calculator.