StatGardenREF. DESK
Calculators/Statistics/Descriptive statistics
Statistics

Descriptive statistics calculator

Mean, median, mode, spread and quartiles for a data set.

What this calculator does

Descriptive statistics summarise a data set in a handful of numbers. Measures of centre, mean, median and mode, say where the data sits. Measures of spread, standard deviation, range and interquartile range, say how tightly it clusters. Neither on its own is enough, since very different data sets can share the same average.

The mean and the median disagree whenever a distribution is skewed, and that disagreement is informative. Income data is the classic case: a handful of very high values pull the mean well above the median, which is why median income is the figure usually reported.

The formula

Formulax̄ = Σx/n · s = √(Σ(x−x̄)²/(n−1)) · median = middle value · IQR = Q3 − Q1

The mean sums the values and divides by the count. The median sorts them and takes the middle. Standard deviation measures the typical distance from the mean, dividing by n−1 rather than n for a sample: Bessel’s correction, which compensates for the fact that a sample’s own mean sits slightly closer to its points than the true population mean does.

TermMeaning
MeanThe arithmetic average.
MedianThe middle value when sorted.
ModeThe most frequent value.
Standard deviationTypical distance from the mean.
IQRInterquartile range: Q3 − Q1, the middle half of the data.
Standard errorStandard deviation ÷ √n, the precision of the mean.

The inputs explained

FieldWhat to enter
Data (comma or space separated)Your data, separated by commas, spaces or semicolons. Any number of values is accepted, and non-numeric entries are ignored.

When to use it

Summarising a set of measurements

Report the mean with the standard deviation alongside. The mean alone conveys nothing about how consistent the measurements were.

Detecting skew

Compare the mean against the median. If the mean is substantially higher, a few large values are pulling it up; if lower, a few small ones are dragging it down.

Finding outliers

The conventional test flags anything more than 1.5 times the IQR beyond Q1 or Q3. The quartiles reported here give you those boundaries directly.

Judging the precision of an average

The standard error tells you how much the mean would vary between samples. It falls with the square root of the sample size, which is why quadrupling a sample only halves the error.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How spread changes the statistics

Four data sets, each with a mean of 20, arranged from tightly clustered to widely dispersed.

Same mean, different spread
Data setMeanSample standard deviationRangeQ1 · Q3 · IQR
20, 20, 20, 20, 2020.00000 (min 20.000, max 20.000)20.000 · 20.000 · 0
18, 19, 20, 21, 2220.0001.5814.000 (min 18.000, max 22.000)19.000 · 21.000 · 2.000
10, 15, 20, 25, 3020.0007.90620.000 (min 10.000, max 30.000)15.000 · 25.000 · 10.000
2, 6, 20, 34, 3820.00016.12536.000 (min 2.000, max 38.000)6.000 · 34.000 · 28.000
Every row has a mean of exactly 20. Reporting only the average would make these four data sets appear identical, which is precisely why a measure of spread must accompany it.

The effect of an outlier

The same data set with a single large value appended, showing how mean and median respond differently.

Adding one extreme value
Data setMeanMedianSample standard deviation
10, 12, 14, 16, 1814.00014.0003.162
10, 12, 14, 16, 18, 2015.00015.0003.742
10, 12, 14, 16, 18, 10028.33315.00035.223
10, 12, 14, 16, 18, 1000178.33315.000402.543
The median barely moves as the outlier grows, while the mean and standard deviation are dragged sharply upward. This robustness is why the median is preferred for skewed data such as incomes or house prices.

Questions

When should I use the median instead of the mean?

When the data is skewed or contains outliers. Incomes, house prices and response times are all typically reported as medians, because a small number of extreme values would otherwise dominate the average.

What is the difference between sample and population standard deviation?

The sample version divides by n−1 rather than n. This is Bessel’s correction, which compensates for a sample’s own mean sitting slightly closer to its data than the true population mean would. Use the sample version unless you genuinely have every member of the population.

What does standard deviation actually tell me?

The typical distance of a value from the mean. For roughly normal data, about 68 per cent of values fall within one standard deviation of the mean and about 95 per cent within two.

Why does my data set have no mode?

Because no value repeats. The mode only exists when at least one value occurs more than once, which makes it of limited use for continuous measurements.

What is the interquartile range for?

It measures the spread of the middle half of the data, ignoring the extremes entirely. That makes it robust against outliers in a way the full range is not.

For the spread of a single value, see z-score and percentile. For relationships between two variables, use correlation and regression.