Statistics Calculator
Press Calculate to see the results.
Paste a list of numbers and this statistics calculator returns the common descriptive statistics in one go: center, spread, quartiles and outliers.
Statistics is the science of collecting, summarizing and drawing conclusions from data. Descriptive statistics, the part this calculator covers, boil a data set down to a few numbers that describe where it is centered and how spread out it is. Inferential statistics then uses such summaries from a sample to make statements about a larger population, such as estimating an election result from a poll of 1,000 voters.
Measures of center include the mean, the median and the mode. Measures of spread include the range, the variance and standard deviation, and the interquartile range. Looking at a center and a spread together gives a far better picture than either alone.
The quartiles split the sorted data into four equal parts. Q2 is the median; Q1 is the median of the lower half and Q3 the median of the upper half (this calculator leaves the middle value out of both halves when the count is odd, one of several conventions in use). The interquartile range, Q3 − Q1, spans the middle 50% of the data and is not affected by extreme values.
Tukey's rule flags a value as an outlier when it lies more than 1.5 interquartile ranges below Q1 or above Q3. Outliers may be data-entry mistakes, or they may be the most interesting observations in the set, so investigate them rather than deleting them automatically. The sample and population versions of standard deviation differ only in dividing by n − 1 or n; use the sample version when the data is a subset of a larger group.
Geometric Mean
The geometric mean is the nth root of the product of n positive numbers. Where the arithmetic mean answers what single value, added n times, gives the same total, the geometric mean answers what single value, multiplied n times, gives the same product. That makes it the natural average for quantities that combine by multiplication: growth rates, interest rates, ratios and indexes.
Suppose an investment returns +10%, +30% and −20% in three years. The growth factors are 1.10, 1.30 and 0.80, whose product is 1.144. The geometric mean is 1.144^(1/3) ≈ 1.0459, so the investment grew at an average of about 4.59% per year. The arithmetic mean of the returns, 6.67%, overstates the real result; compounding 6.67% for three years would give 1.214, not 1.144.
The geometric mean is always less than or equal to the arithmetic mean, with equality only when every value is the same. It is undefined if any value is negative and is zero if any value is zero, so it suits strictly positive data. In practice it is computed through logarithms, exp(mean of ln xᵢ), which avoids overflow when multiplying many numbers. For the default data, 2, 10, 21, 23, 23, 23, 38 and 38, the geometric mean is about 17.12, below the arithmetic mean of 22.25 because the small value 2 pulls a product down more than a sum.
Related averages include the harmonic mean, n divided by the sum of reciprocals, which is the right way to average speeds over equal distances or price-to-earnings ratios. For any set of positive numbers the harmonic mean is no larger than the geometric mean, which is no larger than the arithmetic mean.
Geometric mean = (x₁ × x₂ × … × xₙ)^(1/n)
- xᵢ
- each positive value
- n
- the number of values
Frequently asked questions
What is the difference between sample and population standard deviation?
The population formula divides the sum of squared deviations by n; the sample formula divides by n − 1 to correct for estimating the mean from the same data.
How are quartiles calculated?
The data is sorted and split at the median. Q1 is the median of the lower half and Q3 the median of the upper half. Software packages use slightly different conventions, so results can differ a little.
What counts as an outlier?
Using Tukey's rule, any value below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR.
When should I use the geometric mean?
Use it for averaging growth rates, ratios or other quantities that multiply together, and only for positive values.
What are the main formulas in descriptive statistics?
The mean is Σx ÷ n, the range is the largest value minus the smallest, and the sample variance is Σ(x − x̄)² ÷ (n − 1), with the standard deviation as its square root. For the default data, 2, 10, 21, 23, 23, 23, 38 and 38, the mean is 22.25, the range is 36 and the sample standard deviation is about 12.30.
How do I find the z-score of a value in my data?
Subtract the mean and divide by the standard deviation: z = (x − x̄) ÷ s. In the default data, 38 has a z-score of (38 − 22.25) ÷ 12.30 ≈ 1.28, meaning it sits about 1.28 standard deviations above the mean.
Updated by Calculator.hair. How we build and check our calculators