Statistics Calculator

Enter a dataset to compute comprehensive descriptive statistics: mean, median, mode, standard deviation, variance, quartiles, IQR, skewness, kurtosis, and outliers.

Dataset

Count
8
Mean
5
Std Dev (s)
2.13808994
Median
4.5
StatisticFormula
MeanΣxᵢ / n
Variance (pop.)Σ(xᵢ−μ)² / n
Variance (sample)Σ(xᵢ−x̄)² / (n−1)
Std Dev (population σ)√(population variance)
Std Dev (sample s)√(sample variance)
Quartilesmedian of lower / upper half (middle value left out when n is odd)
IQRQ3 − Q1
Outlier fencesQ1 − 1.5·IQR, Q3 + 1.5·IQR

Quartiles use the median-of-halves method, which can differ slightly from Excel's QUARTILE.INC or R's default for the same data, and the IQR and outlier fences follow the same method (with very small datasets the fences can be wide enough that an extreme value is not flagged). Sample variance and sample standard deviation need at least 2 values; skewness needs at least 3 and kurtosis at least 4 values with some spread, otherwise they are shown as n/a.

Full Results

StatisticValue
Count (n)8
Sum40
Minimum2
Maximum9
Mean (x̄)5
Median4.5
Mode4
Range7
Sum of Squares32
Variance (pop. σ²)4
Variance (sample s²)4.57142857
Std Dev (pop. σ)2
Std Dev (sample s)2.13808994
Coeff. of Variation (s / |x̄|)42.76179871%
Q1 (25th pct)4
Q2 / Median4.5
Q3 (75th pct)6
IQR2
Lower Fence1
Upper Fence9
Skewness0.81848755
Excess Kurtosis0.940625
OutliersNone

Karl Pearson began using the term standard deviation in lectures in 1893 and printed it the next year, and the habit of flagging outliers with a 1.5 × IQR fence comes from John Tukey's 1977 book Exploratory Data Analysis. This page puts both traditions in one place. Paste a list of numbers and it returns the mean, median, mode, both versions of variance and standard deviation, quartiles, skewness, excess kurtosis and any values outside Tukey's fences.

The formulas behind each statistic, and what moves them

With n values: mean x̄ = Σx ÷ n. Sum of squares SS = Σ(x − x̄)². Population variance σ² = SS ÷ n and sample variance s² = SS ÷ (n − 1); each standard deviation is the square root of its variance. The median is the middle value of the sorted list, or the average of the two middle ones. Quartiles are the medians of the lower and upper halves, leaving the middle value out when n is odd. This median-of-halves method can give slightly different Q1 and Q3 from Excel's QUARTILE.INC or R's default, and the IQR and fences follow whichever method is used. IQR = Q3 − Q1, and the outlier fences are Q1 − 1.5 × IQR and Q3 + 1.5 × IQR. The coefficient of variation is s ÷ |mean| × 100, using the sample standard deviation.

What changes if one value moves? Start from 2, 4, 4, 4, 5, 5, 7, 9 and replace the 9 with 19. The mean climbs from 5 to 6.25 and the sample standard deviation from about 2.14 to about 5.34, yet the median stays at 4.5 and the quartiles stay at 4 and 6, so the IQR is still 2. The upper fence is still 9, so 19 is now flagged as an outlier. That is why the median and IQR cope better with messy data, while the mean and standard deviation react to every point. With very few values the fences can also be wide: for 1, 2, 3, 4, 100 the quartiles are 1.5 and 52, the upper fence is 127.75, and the 100 is not flagged.

Worked example with the default dataset 2, 4, 4, 4, 5, 5, 7, 9. n = 8, the sum is 40 and the mean is 40 ÷ 8 = 5. The squared deviations are 9, 1, 1, 1, 0, 0, 4 and 16, so SS = 32. Population variance = 32 ÷ 8 = 4 and σ = 2; sample variance = 32 ÷ 7 = 4.5714 and s = 2.1381. The median is (4 + 5) ÷ 2 = 4.5, the mode is 4 and the range is 9 − 2 = 7. Q1 = 4, Q3 = 6, IQR = 2, and the fences are 1 and 9, so nothing is flagged: the 9 sits exactly on the upper fence and only values strictly beyond it count. The coefficient of variation is 2.1381 ÷ 5 × 100 = 42.76%.

How to Use This Calculator

  1. Type or paste your numbers into the Dataset box. Commas, spaces, semicolons and line breaks all work as separators.
  2. A stray separator at the start or end is harmless, since empty slots are skipped. Anything that is not a plain number, such as a word or a value above 1e100, is ignored and listed in a message under the box.
  3. Check the four tiles at the top: Count, Mean, Std Dev (s) and Median. A red banner appears if any value falls outside the Tukey fences.
  4. Scroll through Full Results for both variances, both standard deviations, quartiles, skewness and kurtosis.
  5. Compare the mean with the median. If they sit far apart, the data are skewed or contain outliers.

Frequently Asked Questions

Which standard deviation should I use, population or sample?

Use the sample version (s) when your numbers are a sample from a larger group, which is the usual case, and the population version (σ) only when you hold every member. The big tile shows s. For the default data that is 2.1381 against 2, about 7% higher.

What happens if I leave a trailing comma or type a word in the list?

Empty slots are skipped, so 1, 2, 3, is analysed as the three values 1, 2 and 3 with a count of 3. A word or other non-numeric entry is left out of the calculation and named in a message under the box, so you can see exactly what was ignored.

Why was a value flagged as an outlier when it looks ordinary?

With very small datasets the fences are tight. Try 2, 4, 4, 4, 5, 5, 7: Q1 = 4, Q3 = 5, IQR = 1, so the fences are 2.5 and 6.5 and both the 2 and the 7 are flagged. A flag means unusual relative to the middle of this list, not wrong.

Why does it say No mode?

When every value appears exactly once there is no mode. If two or more values tie for the highest count, all of them are listed.

Why do some rows show n/a?

Sample variance and standard deviation need at least 2 values, skewness at least 3 and excess kurtosis at least 4. If every value is identical the spread is zero and skewness and kurtosis are undefined. With a single value, for example, the sample standard deviation is n/a while the population one is 0.