Statistics and research
Standard deviation calculator
Paste data to get the standard deviation (sample and population), variance, mean, median, mode, quartiles with the method stated, IQR, outliers, skewness and kurtosis.
Runs in your browser. What you enter stays on this page and is not uploaded.
Results
| Statistic | Value |
|---|---|
| Count (n) | 8 |
| Sum | 40 |
| Mean | 5 |
| Median | 4.5 |
| Mode | 4 (3 times each) |
| Minimum | 2 |
| Maximum | 9 |
| Range | 7 |
| Standard deviation, sample (n − 1) | 2.138089935 |
| Standard deviation, population (n) | 2 |
| Variance, sample (n − 1) | 4.571428571 |
| Variance, population (n) | 4 |
| Standard error of the mean | 0.755928946 |
| Coefficient of variation (sample SD / |mean|) | 42.7618% |
| First quartile (Q1) | 4 |
| Third quartile (Q3) | 5.5 |
| Interquartile range (Q3 − Q1) | 1.5 |
| Outlier fences (Q1 − 1.5 IQR, Q3 + 1.5 IQR) | 1.75 and 7.75 |
| Outliers beyond the fences | 9 |
| Skewness, sample (G1, as Excel SKEW and SPSS) | 0.818488 (SE 0.7521) |
| Excess kurtosis, sample (G2, as Excel KURT and SPSS) | 0.940625 (SE 1.481) |
| Skewness, population (g1 = m3 / m2^1.5) | 0.65625 |
| Excess kurtosis, population (g2 = m4 / m2² − 3) | -0.21875 |
| Mean absolute deviation | 1.5 |
| Median absolute deviation (unscaled) | 0.5 |
| Geometric mean | 4.603215596 |
| Harmonic mean | 4.201750729 |
| Sum of squares Σ(x − x̄)² | 32 |
| Percentile | Value |
|---|---|
| 5th | 2.7 |
| 10th | 3.4 |
| 25th | 4 |
| 50th | 4.5 |
| 75th | 5.5 |
| 90th | 7.6 |
| 95th | 8.3 |
Quartiles: Linear interpolation, (n − 1)p — R type 7, Excel QUARTILE.INC, NumPy default. The median is the same under every method.
Method and limits
How to use it
Paste numbers separated by spaces, commas, semicolons, tabs or new lines — a column copied from a spreadsheet works. Use a point for decimals (1.5, not 1,5). Results update as you type and when you press the button; copy them or download the tables as CSV.
Choose the quartile method your course or software uses; the median and every other statistic are the same under each method.
Formulas
- Mean x̄ = Σx / n. Sample variance s² = Σ(x − x̄)² / (n − 1); population variance σ² = Σ(x − x̄)² / n; the standard deviation is the square root.
- Standard error of the mean = s / √n. Coefficient of variation = s / |x̄|.
- Quartiles — R type 7 (Excel QUARTILE.INC, NumPy): position h = (n − 1)p + 1 in the sorted data, interpolating between neighbours. Type 6 (Minitab, SPSS, Excel QUARTILE.EXC): h = (n + 1)p. Tukey’s hinges: medians of the lower and upper halves, the median counted in both halves when n is odd.
- Outliers use Tukey’s fences Q1 − 1.5 × IQR and Q3 + 1.5 × IQR (3 × IQR marks far outliers).
- Skewness G1 = g1 √(n(n − 1)) / (n − 2) with g1 = m3 / m23/2; excess kurtosis G2 = ((n + 1) g2 + 6)(n − 1) / ((n − 2)(n − 3)) with g2 = m4 / m2² − 3, where mr = Σ(x − x̄)r / n. G1 and G2 match Excel SKEW and KURT, SPSS and SciPy with bias=False; g1 and g2 are the population (biased) versions.
Which standard deviation?
Use the sample standard deviation (n − 1) when your data are a sample used to estimate a larger population — the usual case. Use the population standard deviation (n) only when the data are the entire population of interest.
Assumptions and limits
- Up to 100,000 values. Skewness needs at least 3 values and kurtosis at least 4.
- Quartiles of small samples differ noticeably between methods; state the method you used.
- Fences flag unusual values for checking; they are not a rule for deleting data.
- All arithmetic runs in your browser in double precision. Sums are compensated and variances use the corrected two-pass method; tail probabilities come from the regularized incomplete beta and gamma functions and keep about 12 significant digits even for p-values as small as 1e-300. The NIST StRD NumAcc4 dataset (values near 10,000,000.2) returns its certified standard deviation 0.1 to 8 significant digits.
Worked example
For 2, 4, 4, 4, 5, 5, 7, 9: the mean is 5 and Σ(x − x̄)² = 32, so the population standard deviation is √(32 / 8) = 2 and the sample standard deviation is √(32 / 7) = 2.138. With type 7 quartiles Q1 = 4, Q3 = 5.5 and IQR = 1.5; the upper fence is 7.75, so 9 is flagged as an outlier. The mode is 4.
References
- NIST/SEMATECH e-Handbook of Statistical Methods: measures of scale
- NIST/SEMATECH e-Handbook of Statistical Methods: measures of skewness and kurtosis
- NIST/SEMATECH e-Handbook of Statistical Methods: what are outliers in the data?
- Hyndman and Fan (1996), Sample quantiles in statistical packages, The American Statistician 50(4)
- Joanes and Gill (1998), Comparing measures of sample skewness and kurtosis, The Statistician 47(1)
- R documentation: quantile (types 1–9)
- NIST Statistical Reference Datasets (StRD)
Related tools
- Z-score and normal distribution calculatorConvert a value to a z-score and find normal probabilities to the left, right, between two values or in both tails, or find the value for a percentile.
- Confidence interval calculatorConfidence intervals for a mean (t interval, from data or summary statistics) or a proportion (Wilson, Clopper–Pearson, Jeffreys, Agresti–Coull and Wald).
- Margin of error calculatorMargin of error for a survey proportion or a mean at any confidence level, with the finite population correction.
- Sample size calculatorSample size to estimate a proportion or a mean within a chosen margin of error, with the finite population correction for small populations.
- T-test calculatorOne-sample, independent two-sample (Welch and pooled) and paired t-tests from raw data or summary statistics, with confidence intervals and Cohen’s d.
- P-value calculatorFind the p-value and critical values for a z, t, chi-square or F test statistic, one- or two-tailed, accurate far into the tails.