How the descriptive statistics are calculated
Descriptive statistics summarize a dataset with a handful of numbers that describe its center, spread, and extremes. This calculator takes a list of values (separated by commas, spaces, or new lines) and computes each measure directly from the data — no sampling assumptions or fitted models. Below is exactly what each output means and how it is derived.
Measures of center
- Mean (average): add every value and divide by the count:
mean = (Σx) / n. It uses all the data but is pulled toward outliers. - Median: sort the values and take the middle one. With an even count, average the two middle values. The median ignores how far away extreme values are, so it resists outliers — which is why it is preferred for skewed data like income or house prices.
- Mode: the value (or values) that appear most often. A dataset can have one mode, several, or none if every value is unique. Mode is the only center measure that also works for non-numeric categories.
Measures of spread
- Range:
max − min. Simple, but determined entirely by the two most extreme points. - Variance: the average squared distance from the mean. This tool reports two versions. Population variance divides the sum of squared deviations by
n:σ² = Σ(x − mean)² / n. Sample variance divides byn − 1(Bessel's correction):s² = Σ(x − mean)² / (n − 1). - Standard deviation: the square root of the variance, expressed in the same units as the data. For an approximately normal distribution, about 68% of values fall within 1 SD of the mean and about 95% within 2 SD (the empirical or "68–95–99.7" rule).
- IQR (interquartile range):
Q3 − Q1, the span covering the middle 50% of the sorted data. Like the median, it is resistant to outliers and is the width of the box in a box-and-whisker plot.
Sample vs. population: which do I use?
If your numbers are the entire group you care about (every student in one class, every item produced in one batch), use the population figures. If they are a sample drawn from a larger group and you want to estimate that group's spread, use the sample figures (n − 1). Dividing by n − 1 corrects the tendency of a sample to underestimate the true spread. In practice, most real-world data is a sample, so the sample standard deviation is the usual default.
How quartiles are computed here
Quartiles are found by linear interpolation on the sorted data: Q1 sits at position 0.25 × (n − 1) and Q3 at 0.75 × (n − 1) using 0-based positions, interpolating between neighbours when the position is not a whole number. This is the same "inclusive" method used by spreadsheet functions like Excel's PERCENTILE.INC and NumPy's default percentile. Note that other conventions (for example Tukey's hinges) can give slightly different Q1/Q3 values on small datasets, so quartiles from two tools may differ by a little.
Identifying outliers
A common rule flags a value as an outlier when it lies more than 1.5 × IQR below Q1 or above Q3. For an approximately normal distribution you can instead use z-scores, where a value more than 3 standard deviations from the mean (|z| > 3) occurs in fewer than 0.3% of cases and is worth a second look.