Descriptive statistics calculator: mean, median, mode, standard deviation, variance, quartiles, IQR, outliers, skewness and kurtosis, with a histogram.
The average is 26.6667 and the middle value is 24.5; the data are right-skewed (a longer tail of high values). A typical value sits about 11.6871 from the mean (sample SD), and the middle half spans 19.5 to 30.5. 64 lies outside the 1.5·IQR fences and may deserve a second look.
Histogram (6 bins of width 10)
Box plot (whiskers at the most extreme values inside the fences)
Frequency table (a value on a bin edge counts in the higher bin) (6 rows)
m_k = Σ(x − x̄)^k / n are the central moments. These match Excel SKEW and KURT.
About the descriptive statistics calculator
Descriptive statistics summarise a data set by its centre, spread and shape. The mean is the sum divided by n; the sample variance divides the squared deviations from the mean by n − 1 and the population variance by n. Quartiles come from the sorted data by linear interpolation (R-7, as Excel QUARTILE.INC), the exclusive method (R-6) or Tukey's hinges, and skewness and excess kurtosis use the adjusted formulas of Excel SKEW and KURT.
Values more than 1.5 × IQR beyond the quartiles are flagged as outliers, following Tukey's box-plot rule. The default data, 18 commute times in minutes, have a mean of 26.67 and a median of 24.5; the 64-minute trip lies beyond the upper fence of 47 and pulls the mean above the median.
Use the sample standard deviation when the data are a sample from a larger group, and the population value when they are the whole group.
How to calculate standard deviation by hand
Standard deviation measures how far values typically sit from their mean. Eight quiz marks out of 10, 2, 4, 4, 4, 5, 5, 7 and 9, are small enough to work through on paper.
Find the mean: the marks add up to 40, and 40 ÷ 8 = 5.
Subtract the mean from each value and square the result.
Mark x
Deviation x − 5
Squared deviation
2
−3
9
4
−1
1
4
−1
1
4
−1
1
5
0
0
5
0
0
7
2
4
9
4
16
Sum
0
32
Add the squared deviations: 32. The deviations themselves always sum to 0, which is a useful check on step 2.
Divide to get the variance: 32 ÷ 8 = 4 for the population variance σ², or 32 ÷ 7 = 4.571429 for the sample variance s².
Take the square root: σ = √4 = 2 and s = √4.571429 = 2.138090.
Entered into the calculator, the same eight marks give a population standard deviation of 2 and a sample standard deviation of 2.13809. These are the formulas in the NIST/SEMATECH e-Handbook, §1.3.5.6.
Variance is in squared units, marks² here, which is why the square root is taken: the standard deviation, 2.14 marks, is back on the scale of the data and can be compared with the mean.
Sample or population: which to use
Use the population formula (divide by n) when the data are the entire group you want to describe, such as the marks of every student in this one class. Use the sample formula (divide by n − 1) when the data stand in for a larger group, such as eight students surveyed to learn about a whole year group.
The two results differ by a factor of √(n ÷ (n − 1)), which matters for small data sets and fades as n grows:
Values n
Sample SD ÷ population SD
2
1.4142
3
1.2247
5
1.1180
10
1.0541
30
1.0171
100
1.0050
1,000
1.0005
Software does not agree on a default:
Tool
Sample (n − 1)
Population (n)
Excel
STDEV.S
STDEV.P
Python statistics module
stdev()
pstdev()
NumPy
np.std(x, ddof=1)
np.std(x), the default
pandas
DataFrame.std(), the default
DataFrame.std(ddof=0)
This calculator
Sample standard deviation s
Population standard deviation σ
NumPy's std divides by n unless told otherwise, while pandas divides by n − 1. Moving the same column between them changes the answer by the factor in the table above. Excel's STDEV.S also skips text and empty cells in a range, so a number stored as text is silently left out of the calculation.
Mean, median, mode and range
For the quiz marks, the mean is 5 and the median is 4.5, the average of the fourth and fifth sorted values (4 and 5). The mode is 4, which occurs three times, and the range is 9 − 2 = 7.
Each answers a different question. The mean uses every value and is what the standard deviation is measured from. The median is the middle of the sorted data and ignores how far the extremes reach. The mode is the only one of the three that works for categories, such as the most common shoe size sold. The range depends on just two values, so a single unusual reading changes it completely.
When the mean sits above the median, the data often have a longer tail of high values. The marks do: the 9 pulls the mean half a mark above the median, and the calculator reports a skewness of 0.818.
Quartile methods compared
The quartiles Q1 and Q3 cut off the lowest and highest quarters of the sorted data, and the interquartile range, Q3 − Q1, is the spread of the middle half. Hyndman and Fan (1996) catalogue nine published ways to place them, and on small data sets they disagree. The calculator offers three of them, shown here on the quiz marks:
Method
Q1
Q3
IQR
1.5 × IQR fences
Is the 9 an outlier?
Linear interpolation (R-7)
4
5.5
1.5
1.75 and 7.75
Yes
Exclusive (R-6)
4
6.5
2.5
0.25 and 10.25
No
Tukey's hinges
4
6
2
1 and 9
No, it sits on the fence
R-7 places Q3 at position (n − 1) × 0.75 + 1 = 6.25 in the sorted list, a quarter of the way from the sixth value (5) to the seventh (7). It is Excel's QUARTILE.INC, the default of R's quantile() and of NumPy's percentile().
R-6 uses position (n + 1) × 0.75 = 6.75 instead. It is Excel's QUARTILE.EXC and the method R's documentation attributes to Minitab and SPSS. Python's statistics.quantiles() also uses it unless told otherwise.
Tukey's hinges are the medians of the lower half (2, 4, 4, 4) and the upper half (5, 5, 7, 9). R's fivenum() reports these.
With only eight values, the method alone decides whether the 9 is flagged. Before comparing quartiles or outlier counts with a textbook or another program, set the calculator to the same method.
Reading the results and avoiding common errors
Standard deviation versus standard error. The standard error of the mean, s ÷ √n, measures how precisely the sample mean estimates the population mean, not how spread out the data are. For the quiz marks it is 2.138 ÷ √8 = 0.756. Reporting it in place of the standard deviation makes data look almost three times less variable than they are. It is the input a confidence interval for the mean is built from.
The coefficient of variation needs a meaningful zero. The CV, s ÷ |mean| × 100, is 42.76% for the marks and lets you compare spread across data on different scales. It is meaningless for temperatures in °C or any measure that can be negative, because the mean can sit near zero and inflate it without limit.
The one-pass formula loses precision. The computational formula for the variance, (Σx² − (Σx)² ÷ n) ÷ (n − 1), avoids computing the mean first. On large numbers with small differences it fails in ordinary double-precision arithmetic. NIST's NumAcc3 reference data set, 1,001 values near 1,000,000.2, has a certified standard deviation of exactly 0.1; the computational formula run with Python floats returns 0.1072. The calculator subtracts the mean first and works with 50 significant digits, and it returns 0.1.
Fewer than two values. With one value there is nothing to measure spread against, and the sample formula would divide by zero, so the calculator asks for at least two.
Once the mean and standard deviation are known, the normal distribution calculator turns any value into a z-score and percentile, provided the histogram looks roughly bell-shaped.
What is the difference between sample and population standard deviation?
The sample standard deviation divides the sum of squared deviations by n − 1 (Bessel's correction), the population one by n. Deviations measured from the sample mean run slightly small, and n − 1 compensates when estimating a larger population's spread. For the 18 default values s = 11.687 and σ = 11.358, and the gap shrinks as n grows. Excel's STDEV.S and STDEV.P follow the same split.
How are outliers identified?
By Tukey's rule: a value is an outlier if it lies below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR. For the default data Q1 = 19.5 and Q3 = 30.5, so the IQR is 11, the fences are 3 and 47, and the 64 is flagged. Values beyond 3 × IQR are often called extreme outliers. A flagged value is a prompt to check the data, not a reason to delete it.
Why do quartiles differ between Excel, calculators and textbooks?
Hyndman and Fan (1996) list nine published definitions. Excel QUARTILE.INC and R's default interpolate at position (n − 1)p + 1, QUARTILE.EXC and Minitab use (n + 1)p, and many textbooks use Tukey's hinges, the medians of each half. For 7, 15, 36, 39, 40, 41 these give Q1 and Q3 of 20.25 and 39.75, 13 and 40.25, and 15 and 40.
What do skewness and kurtosis values mean?
Skewness measures asymmetry: 0 for symmetric data, positive when the long tail is on the high side. Bulmer's (1979) rule of thumb reads |G1| below 0.5 as roughly symmetric, 0.5 to 1 as moderately skewed and above 1 as highly skewed. Excess kurtosis compares tail weight with a normal distribution, which scores 0. The default data give G1 = 1.96 and G2 = 5.60, both driven by the 64-minute trip.
When should I use the median instead of the mean?
When the data are skewed or contain outliers, because one extreme value moves the mean but not the median. In the default data the 64-minute trip lifts the mean to 26.67 while the median is 24.5; without that trip the mean would be 24.47 and the median 24. Incomes and house prices are usually reported as medians for the same reason.
How accurate is the descriptive statistics calculator?
Accuracy depends on your inputs and the method's assumptions. Decimal arithmetic uses 50 significant digits, but estimates, numerical methods and source data can be less precise; the displayed rounding does not remove those limits. It is checked against 7 worked examples whose answers come from independent sources; for example, “Commute times (default data)” is checked against Python 3.8 statistics (mean, median, multimode, variance, pvariance, quantiles method='inclusive') and fractions for G1/G2 (Excel SKEW/KURT formulas) with decimal square roots.
Where does the method come from?
NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5 Quantitative techniques (location, scale, skewness and kurtosis); NIST Statistical Reference Datasets — univariate summary statistics (NumAcc1–4); Hyndman & Fan (1996), Sample quantiles in statistical packages, The American Statistician 50(4); Microsoft Excel SKEW and KURT functions.