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.

Separate values with spaces, commas, tabs or new lines (paste a spreadsheet column). Use a point for decimals.
Type 7 interpolates at (n − 1)p (R and NumPy default, Excel QUARTILE.INC); type 6 at (n + 1)p (SPSS, Minitab, Excel QUARTILE.EXC); hinges are medians of the two halves.

Results

Mean5SD (sample)2.13809Median4.5n8
Descriptive statistics
StatisticValue
Count (n)8
Sum40
Mean5
Median4.5
Mode4 (3 times each)
Minimum2
Maximum9
Range7
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 mean0.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 fences9
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 deviation1.5
Median absolute deviation (unscaled)0.5
Geometric mean4.603215596
Harmonic mean4.201750729
Sum of squares Σ(x − x̄)²32
Percentiles (Linear interpolation, (n − 1)p)
PercentileValue
5th2.7
10th3.4
25th4
50th4.5
75th5.5
90th7.6
95th8.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

Related tools

Share this page

Remind me to visit Contifield

Adds a repeating reminder to your calendar, titled “Contifield Reminder: Visit www.contifield.com”.