HomeStatistics & Probability › Descriptive Statistics Calculator

Descriptive Statistics Calculator

Computes summary statistics for a list of numbers: count, sum, mean, median, mode, range, sample and population variance and standard deviation, standard error, coefficient of variation, quartiles (linear interpolation) and skewness.

When to use

You have a set of numeric observations and need its central tendency, spread or quartiles, e.g. the standard deviation of a data set.

Do not use when: You need a single percentile or the percentile rank of one value (use percentile), a standardised score (use z-score), or statistics of two paired variables (use correlation or linear-regression).

Formula

mean = Σx / n; sample_variance = Σ(x − mean)² / (n − 1); population_variance = Σ(x − mean)² / n; standard_error = s / √n; CV% = 100·s / mean; quartile at p: rank = p·(n − 1), value = x(⌊rank⌋) + (rank − ⌊rank⌋)·(x(⌊rank⌋+1) − x(⌊rank⌋)) on sorted data; skewness G1 = n / ((n − 1)(n − 2)) · Σ((x − mean) / s)³

Quartiles use linear interpolation between order statistics (Hyndman & Fan type 7, the default in Excel PERCENTILE.INC, NumPy and R); other conventions (Tukey hinges, exclusive method) can give different Q1/Q3 for small samples. Sample statistics are omitted for n = 1.

Inputs

ParameterTypeUnitRequiredDescription
valuesnumber_listyesThe data set, as a list of numbers (comma-separated or JSON array). At least 2 values are needed for sample statistics.

Outputs

OutputTypeUnitDescription
countintegerNumber of values.
sumnumberSum of all values.
meannumberArithmetic mean = sum / n.
mediannumberMiddle value of the sorted data (average of the two middle values when n is even).
modestringMost frequent value(s), comma-separated when several values tie; 'none' when no value repeats.
mode_countintegerHow many times the mode occurs.
minnumberSmallest value.
maxnumberLargest value.
rangenumbermax − min.
sample_variancenumberΣ(x − mean)² / (n − 1). Use when the data are a sample of a larger population (n ≥ 2).
sample_std_devnumber√sample_variance (n ≥ 2).
population_variancenumberΣ(x − mean)² / n. Use when the data are the entire population.
population_std_devnumber√population_variance.
standard_errornumbers / √n (n ≥ 2).
coefficient_of_variation_percentnumber%100 × s / mean; only meaningful for ratio-scale data with a positive mean (omitted when the mean is 0).
q1number25th percentile by linear interpolation (Excel PERCENTILE.INC / R type 7).
q3number75th percentile by the same method.
iqrnumberQ3 − Q1.
skewnessnumberAdjusted Fisher-Pearson sample skewness G1 (same as Excel SKEW); requires n ≥ 3 and s > 0. Positive = right tail longer.

Example

2, 4, 4, 4, 5, 5, 7, 9: {"values":[2,4,4,4,5,5,7,9]}{"count":8,"sum":40,"mean":5,"median":4.5,"mode":"4","mode_count":3,"min":2,"max":9,"range":7,"sample_variance":4.5714,"sample_std_dev":2.1381,"population_variance":4,"population_std_dev":2,"standard_error":0.7559,"coefficient_of_variation_percent":42.76,"q1":4,"q3":5.5,"iqr":1.5,"skewness":0.8185}

4, 8, 15, 16, 23, 42: {"values":[4,8,15,16,23,42]}{"count":6,"mean":18,"median":15.5,"mode":"none","sample_std_dev":13.4907,"population_std_dev":12.3153,"q1":9.75,"q3":21.25,"iqr":11.5,"skewness":1.2426}

GET https://tttkmbb.com/api/v1/calculate/descriptive-statistics?values=2%2C4%2C4%2C4%2C5%2C5%2C7%2C9

Machine access

Sources

FAQ

Sample or population standard deviation?

Use the sample version (n − 1 denominator) when the values are a sample drawn from a larger population and you want to estimate its spread; use the population version (n denominator) when the values are the whole population of interest.

Why do my quartiles differ from another tool?

There are several quartile conventions. This calculator uses linear interpolation (Excel PERCENTILE.INC, R type 7); Excel QUARTILE.EXC, Minitab and the Tukey hinge method interpolate differently and can differ for small n.

What does the coefficient of variation mean?

It is the standard deviation as a percentage of the mean, allowing spread to be compared between data sets with different units or scales; it is not meaningful when the mean is near zero or negative.

Related calculators