Standard Deviation Calculator
Enter your data to get the sample (s) or population (σ) standard deviation, the variance, mean, median, mode and quartiles, step by step. Outliers are flagged too.
- Count (N)8
- Sum (Σx)605
- Mean (x̄)75.625
- Median73.5
- ModeNone
- Minimum60
- Maximum95
- Range35
- Lower quartile (Q1)67.5
- Upper quartile (Q3)84
- Interquartile range (Q3 − Q1)16.5
- Variance (s²)135.6964
- Population standard deviation (σ)10.8965
- Coefficient of variation15.4%
- Standard deviation (s)11.6489
Step by step: deviations from the mean
How it is calculated
The standard deviation measures how widely values spread around the mean, in the data’s own unit. A small one means values cluster near the mean; a large one, that they are spread out. In a normal distribution about 68% of values lie within ±1 standard deviation of the mean and 95% within ±2. Exam marks, quality control and investment risk (volatility) are common uses.
s = √(Σ(xᵢ − x̄)² ÷ (N − 1)) · σ = √(Σ(xᵢ − μ)² ÷ N)xᵢ: each value · x̄ (μ): the mean · N: the count. Dividing by N − 1 for a sample (Bessel’s correction) gives an unbiased estimate of the population variance.- Add the values and divide by the count to get the mean.
- Subtract the mean from each value and square the difference.
- Add the squares and divide by N for a population or N − 1 for a sample: that is the variance.
- The standard deviation is the square root of the variance.
- For quartiles, sort the data; the medians of the halves below and above the median are the lower (Q1) and upper (Q3) quartiles (with an odd count the median itself joins neither half).
Example
4, 8, 6, 5, 3, 2, 8, 9, 2, 5: the mean is 52 ÷ 10 = 5.2 and the squared deviations add up to 57.6. Population variance 57.6 ÷ 10 = 5.76, σ = 2.4; sample variance 57.6 ÷ 9 = 6.4, s ≈ 2.5298. For the marks 65, 72, 80, 88, 75, 60, 95, 70: mean 75.625, median 73.5, s ≈ 11.6489, σ ≈ 10.8965.
Frequently asked questions
Should I choose sample or population?
If the data are the whole group you care about (every mark in one class), use population (σ); if they are a part standing for a larger group (a survey of 100 people), use sample (s). When unsure, sample is the safer choice; in Excel STDEV.S estimates from a sample and STDEV.P is for a whole population.
What is the difference between variance and standard deviation?
The variance is the mean of the squared deviations, in squared units (points²). The standard deviation is its square root, back in the data’s own unit (points).
Why can the quartiles differ from Excel’s?
Textbooks and software compute quartiles in at least a dozen ways (Langford 2006; Hyndman and Fan 1996 list nine sample-quantile definitions). This tool uses the “exclusive” method found in many statistics textbooks: the medians of the lower and upper halves, with the overall median left out of both when the count is odd (Langford’s Method 2, as in Moore and McCabe). Excel’s QUARTILE.INC, like PERCENTILE.INC, interpolates between values, so with few values the results can differ slightly.
How are outliers found?
By Tukey’s rule: values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR (IQR = Q3 − Q1). Outliers pull the mean and standard deviation a lot; the median and IQR are more robust.
Source
- NIST/SEMATECH e-Handbook — measures of scale
- NIST/SEMATECH e-Handbook — box plots and quartiles
- Langford, E. (2006). Quartiles in Elementary Statistics. Journal of Statistics Education 14(3) — Method 2 (exclusive)
- Hyndman, R. J. and Fan, Y. (1996). Sample Quantiles in Statistical Packages. The American Statistician 50(4), 361–365
- Microsoft: QUARTILE.INC function
- NIST/SEMATECH e-Handbook §7.1.6: outliers (inner fences Q1 − 1.5 × IQ, Q3 + 1.5 × IQ)
- Microsoft: PERCENTILE.INC function (interpolation)
- Microsoft: STDEV.S function