Enter any set of numbers to calculate mean, median, standard deviation, and variance instantly. Shows sample and population statistics with full dataset summary.
enter numbers
Numbers (separated by commas, spaces, or new lines)
Result (click to copy)
Sample or Population?
Use Sample Std Dev when...
Your data is a subset used to estimate a larger population — e.g. a survey of 200 customers standing in for your whole customer base. This is the more common real-world case.
Use Population Std Dev when...
Your dataset IS the entire population you care about — e.g. the test scores of every student in one specific class, with no intent to generalize beyond them.
Not sure? Sample is usually safer
Sample standard deviation is slightly larger (a more conservative estimate) and is the standard default in statistics software when population status is ambiguous.
How to Use the Standard Deviation Calculator
Enter your data — paste numbers separated by commas, spaces, or new lines. No limit on dataset size.
Click Calculate — instantly see mean, median, standard deviation (sample and population), variance, range, and min/max.
Choose sample or population — if your data is a sample from a larger population, use sample SD (divides by n−1). If your data is the entire population, use population SD (divides by n).
Try the preset datasets — click the example buttons to see how the statistics change with different data distributions.
Copy the full result — all statistics are available to copy for use in reports or further analysis.
📊 Sample vs Population: If you measured 50 students from a school of 1,000 — your 50 values are a sample. Use sample SD (n−1). If you have data for all 1,000 students — that's the population. Use population SD (n). When in doubt about which to use, sample SD is almost always the correct choice for real-world data analysis.
Understanding Statistical Measures
📊 Mean (Average)
Sum of all values divided by count. The balance point of the data. Sensitive to outliers — one extreme value pulls the mean significantly. A dataset of {1,2,3,4,100} has mean 22 but median 3. When data is skewed, median better represents the 'typical' value.
📏 Standard Deviation
Measures average distance of data points from the mean. Low SD: data clustered tightly around mean. High SD: data widely spread. Same unit as original data. The most important measure of spread in statistics — fundamental to hypothesis testing, quality control, and financial risk measurement.
🔢 Variance
The square of standard deviation. Useful in mathematical calculations because variances of independent variables can be added (standard deviations cannot). The formula: σ² = Σ(x−μ)²/n. For sample variance, divide by n−1 (Bessel's correction), which corrects bias in small samples.
📈 Normal Distribution
The 68-95-99.7 rule: in a normal distribution, 68% of data falls within 1 SD of the mean, 95% within 2 SD, 99.7% within 3 SD. This allows calculating probabilities directly from mean and SD. IQ scores (mean 100, SD 15): 68% of people score between 85-115, 95% between 70-130.
🎯 Coefficient of Variation
CV = (SD/Mean) × 100%. Expresses SD as a percentage of the mean — enabling comparison of variability between datasets with different units or scales. A stock with mean return 10% and SD 20% has CV 200% (high volatility). A stock with mean 10% and SD 5% has CV 50% (lower relative volatility).
📉 Z-Score
Z = (x − mean) / SD. Measures how many standard deviations a specific value is from the mean. Z=0: exactly average. Z=1: one SD above average. Z=−2: two SD below average. Enables comparing values from different distributions on a common scale — essential for standardised testing, quality control, and anomaly detection.
Statistics in Real Applications
Quality control in manufacturing
Statistical Process Control (SPC) uses mean and standard deviation to monitor manufacturing quality. A process producing bolts with target diameter 10mm and SD 0.1mm should produce 99.7% of bolts between 9.7mm and 10.3mm (±3 SD). Control charts alert operators when measurements drift outside expected bounds. Six Sigma quality methodology aims to reduce process SD until defects occur less than 3.4 times per million — requiring the process mean to be at least 6 SD from specification limits.
Financial risk measurement
Standard deviation is the primary measure of investment volatility. A stock with annual SD of 15% has 'typical' year-to-year variation of ±15% around its average return. Portfolio construction uses SD and correlations between assets to minimise total portfolio volatility for a given expected return (Modern Portfolio Theory). Value at Risk (VaR) — the standard risk metric for banks — is calculated directly from the SD of portfolio returns.
A/B testing and statistical significance
When testing two versions of a webpage or product feature, standard deviation is used to determine if observed differences are statistically significant or due to random variation. A treatment group showing 5% higher conversion with high SD (high variability) may not be significantly different from the control. The same 5% difference with low SD may be highly significant. T-tests and other statistical tests use SD to calculate p-values that determine significance.
📊 Quick statistics interpretation: SD close to 0 → data very consistent. SD > mean → high variability, possibly skewed data. Mean ≈ median → roughly symmetric distribution. Mean >> median → positive skew (outliers on high end). Mean << median → negative skew (outliers on low end). These quick checks reveal data distribution shape without plotting.
Dataset: 2, 4, 4, 4, 5, 5, 7, 9 (n=8). Mean = (2+4+4+4+5+5+7+9)/8 = 40/8 = 5. Sum of squared deviations = (2−5)²+(4−5)²×3+(5−5)²×2+(7−5)²+(9−5)² = 9+3+0+4+16 = 32. Sample variance = 32/(8−1) = 4.571, Sample Std Dev = √4.571 = 2.138. Population variance = 32/8 = 4, Population Std Dev = √4 = 2.0.
Avoid These Mistakes
Using the wrong denominator
Sample std dev divides by (n−1), not n — this is Bessel's correction, which corrects for the bias of estimating a population's spread from a smaller sample. Using n instead of (n−1) understates the true variability.
Trailing commas or stray separators
A trailing comma, extra space, or leading comma should never silently add a zero to your dataset — this calculator explicitly filters out empty entries so your count and statistics stay accurate no matter how you format the list.
Comparing std dev across differently-scaled datasets
A std dev of 5 means something very different for a dataset averaging 10 versus one averaging 10,000. Use the coefficient of variation (std dev ÷ mean) to compare variability across differently-scaled datasets.
Frequently Asked Questions
What is standard deviation?
Standard deviation measures how spread out numbers are from the mean. A low SD means data points are clustered close to the mean. A high SD means data is widely spread. It's used in statistics, finance, science, and quality control.
Sample vs population standard deviation?
Sample SD (s) divides by n-1 and is used when your data is a sample from a larger population. Population SD (σ) divides by n and is used when you have the entire population. For most real-world data analysis, use sample SD.
What is variance?
Variance is the square of standard deviation. It measures the average squared distance from the mean. Standard deviation is preferred for interpretation because it's in the same units as the original data.
References
📊 Bessel's Correction
The mathematical justification for dividing by (n−1) rather than n when computing sample variance — standard material in any introductory statistics course or textbook.
📄 Your statistics course or textbook
If your coursework specifies which formula (sample or population) to use for an assignment, follow that instruction — this tool computes both so you can check either.