Arithmetic mean of the data.
Mathematics · Statistics
Descriptive statistics calculator — mean, spread and quartiles
Calculate mean, median, variance, standard deviation and quartiles with explicit population or sample mode.
Created v1.0
By Thibaut Grzelak, Mechanical Analysis Engineer
Results
Square root of the selected variance.
Results show up to four significant digits for readability; internal calculations retain full precision.
See calculation details
01Count n
n = # {xᵢ}02Sum
∑ᵢ xᵢ1 + 2 + 3 + 4 + 503d̄
dᵢ = xᵢ − x₀ ; d̄ = (∑ᵢ dᵢ)/n10 / 504Mean
x̄ = x₀ + d̄1 + 205S₂
S₂ = ∑ᵢ(dᵢ − d̄)²(-2)² + (-1)² + 0² + 1² + 2²06Variance
σ² = S₂/n10 / 507Standard deviation
σ = √σ²√(2)08x₀ ≤ … ≤ xₙ₋₁
x₀ ≤ x₁ ≤ … ≤ xₙ₋₁09First quartile Q1
h = (n − 1)p ; h = j ⇒ Q(p) = xⱼh = (5 − 1) × 0.25 = 1; j = 1; Q = 210Median
h = (n − 1)p ; h = j ⇒ Q(p) = xⱼh = (5 − 1) × 0.5 = 2; j = 2; Q = 311Third quartile Q3
h = (n − 1)p ; h = j ⇒ Q(p) = xⱼh = (5 − 1) × 0.75 = 3; j = 3; Q = 412Minimum
min = x₀113Maximum
max = xₙ₋₁514Range
max − min5 − 101Formulas and symbols
Formulas used
x̄ = (∑ xᵢ)/n
σ² = (∑(xᵢ−x̄)²)/n
s² = (∑(xᵢ−x̄)²)/(n−1)
x̄: mean; n: count; σ²: population variance; s²: sample variance.
h = (n−1)p
j = ⌊h⌋
Q(p) = xⱼ + (h−j)(xⱼ₊₁−xⱼ)
Q(p): R7 quantile at proportion p; j: zero-based integer index in the sorted data.
| Symbol | Meaning |
|---|---|
| xᵢ | Data values |
| n | Count n |
| ∑xᵢ | Sum |
| x̄ | Mean |
| Q₂ | Median |
| min | Minimum |
| max | Maximum |
| max−min | Range |
| σ² / s² | Variance |
| σ / s | Standard deviation |
| Q₁ | First quartile Q1 |
| Q₃ | Third quartile Q3 |
02Validation example
Reference numerical case
- [1, 2, 3, 4, 5]: mean 3, median 3, range 4, population variance 2 and standard deviation √2; sample variance 2.5. R7 gives Q1 = 2 and Q3 = 4; for [1, 2, 3, 4], Q1 = 1.75 and Q3 = 3.25.
03How it works
The population variance divides the squared deviations by n; sample variance divides by n−1. Q1, median and Q3 use R7 linear interpolation at sorted zero-based index (n−1)p, with p = 0.25, 0.5 and 0.75.
In the sorted list with zero-based indices, h locates the requested percentile between two neighboring values; the fractional part h−j supplies the interpolation weight. At the last value, use that value directly.
04Limits and conventions
One to 5000 finite unweighted values; sample mode requires at least two. Different quartile conventions can give different answers. Up to 20 observations are shown as dots; larger series use a histogram with at most 20 bins; exact summary statistics are calculated from every value.
05Common mistakes
Variance has squared data units, while standard deviation has the original units. Choose sample mode when estimating variance from a sample rather than describing the entire population.
06Practical questions
What is the difference between population and sample standard deviation?
Population standard deviation divides the squared deviations by n because the complete population is described. Sample standard deviation uses n−1 to estimate population variability from a sample.
Why can mean and median be very different?
The mean uses every value and can be pulled strongly by extreme observations. The median depends on the middle position after sorting, so it is usually less sensitive to outliers and skewed data.