Standard deviation calculator
Sample and population standard deviation.
Standard deviation measures how spread out a set of numbers is around their mean. A small value means the data clusters tightly; a large value means it is widely dispersed. This tool computes the mean, sample and population standard deviation, variance, and range for any list you enter, instantly and entirely in your browser.
Sample and population standard deviation.
Mean, median, variance, SD (sample & population) for any list of numbers.
The Standard Deviation Calculator computes mean, median, variance, and standard deviation for any data set. Shows both population (σ) and sample (s) standard deviation. Enter comma or space-separated numbers.
Standard deviation is the square root of the variance, and variance is the average of the squared distances from the mean. Squaring keeps negative and positive deviations from cancelling and weights large departures more heavily; taking the square root at the end returns the answer to the original units (rupees, kilograms, marks) so it is directly comparable to the data.
Mean (x-bar) = (sum of all values) / n
Variance = sum of (xi - x-bar)^2 / N (population, divides by N)
= sum of (xi - x-bar)^2 / (N - 1) (sample, Bessel's correction)
Std deviation = square root of variance
The only real choice is whether to divide by N or by N minus 1. Divide by N when your numbers are the entire population you care about. Divide by N minus 1 when they are a sample drawn from a larger group and you want an unbiased estimate of the population spread; the smaller denominator makes the sample value slightly larger to correct for the fact that a sample tends to underestimate true variability.
Take the nine numbers loaded in the calculator: 12, 17, 22, 14, 18, 19, 16, 21, 15.
| Measure | Formula | Best when |
|---|---|---|
| Mean (arithmetic average) | sum / n | Symmetric data, no outliers |
| Median | Middle value when sorted | Skewed data (income, house prices) |
| Mode | Most frequent value | Categorical data |
| Range | max - min | Quick spread; sensitive to outliers |
| Variance | Σ(xi - mean)² / n | Spread; in squared units |
| Standard deviation (σ) | √Variance | Spread in original units |
| IQR (interquartile range) | Q3 - Q1 | Robust spread, ignores outliers |
The bell curve. Most natural measurements (heights, IQ, exam scores) approximate normal. Key properties:
A z-score expresses how many σ a value is from the mean: z = (x - mean) / σ. z = 1.96 corresponds to the 97.5 percentile (95% confidence interval bound).
| Test | Use when | Tells you |
|---|---|---|
| t-test (one sample) | Compare one mean to a known value | Is sample mean different from this number? |
| t-test (independent) | Compare means of two groups | Are these two groups different? |
| t-test (paired) | Compare same subjects before/after | Did treatment change the outcome? |
| ANOVA | Compare means of 3+ groups | Is at least one group different? |
| Chi-square | Categorical data (e.g., 2x2 tables) | Is there association between categories? |
| Pearson correlation | Linear relationship between 2 continuous variables | Strength and direction (-1 to +1) |
| Linear regression | Predict one variable from another | Slope, intercept, R^2 fit |
The p-value is the probability of seeing data this extreme (or more) IF the null hypothesis were true. Common misuses:
For estimating a proportion within ±3 percentage points (e.g., a poll):
This is why political polls cluster around n=1,000.
Population standard deviation divides the sum of squared deviations by N, the total count, and is used when your numbers are the entire group you care about. Sample standard deviation divides by N minus 1, known as Bessel's correction, and is used when your numbers are a sample from a larger population. The sample value is always slightly larger, which corrects for a sample's tendency to underestimate true spread.
They contain the same information; standard deviation is just the square root of variance. Variance is in squared units (squared rupees, squared marks), which is hard to interpret, while standard deviation is in the original units and is directly comparable to the data and the mean. Report standard deviation for readers and use variance mainly inside further calculations.
For data that follows a normal bell curve, about 68 percent of values lie within one standard deviation of the mean, about 95 percent within two, and about 99.7 percent within three. It is a fast way to judge whether a value is typical or unusual: a point more than two standard deviations from the mean sits in the outer 5 percent of a normal distribution.
It is built from squared deviations, which are always zero or positive, and the square root of a non-negative number is non-negative. The smallest possible value is zero, which happens only when every data point is identical, meaning there is no spread at all. If a tool ever shows a negative standard deviation, it is a bug.
Strongly. Because deviations are squared, a single far-away value can inflate the standard deviation out of proportion to the rest of the data. For data with extreme values or heavy skew, the interquartile range is a more robust measure of spread, and the median is a more robust centre than the mean.