induwara.lk
induwara.lkEducation · Statistics

Descriptive Statistics Calculator

Paste any list of numbers and instantly get the mean, median, mode, range, variance, standard deviation, quartiles and IQR. Switch between sample and population, see the squared-deviation working, all in your browser — no signup, sources cited below.

By Induwara AshinsanaUpdated Jun 11, 2026
Descriptive statistics calculator

Separate numbers with commas, spaces, tabs, or new lines. Decimals and negatives are fine. Up to 10,000 values.

Examples
Basis
Decimals
Mean
5.00
x̄ = 40.00 / 8
Median (Q2)
4.50
Middle value when sorted
Mode
4.00
Appears 3×
Range
7.00
2.00 → 9.00
Count (n)
8
Number of values
Sum (Σx)
40.00
Total of all values
Minimum
2.00
Smallest value
Maximum
9.00
Largest value

Dispersion (sample)

Variance (s²)
4.57
Std deviation (s)
2.14
Coeff. of variation
42.76%

Five-number summary

Min
2.00
Q1
4.00
Median
4.50
Q3
6.00
Max
9.00
IQR
2.00

Box & whisker

2.00Min4.00Q14.50Med6.00Q39.00Max

Cross-check. The mean-deviation sum of squares Σ(xᵢ−x̄)² = 32.00; the independent raw-score identity Σxᵢ² − (Σxᵢ)²/n gives 32.00. They reconcile, as they must — the variance is verified two ways.

Method: mean x̄ = Σxᵢ/n; variance Σ(xᵢ−x̄)² ÷ (n−1) for a sample or ÷ n for a population (NIST e-Handbook §1.3.5.6); quartiles by the median-of-halves convention (Tukey hinges), so Q1/Q3 may differ from Excel's QUARTILE.INC. Nothing leaves this page.

How it works

This calculator follows the formulas in the NIST/SEMATECH e-Handbook of Statistical Methods — the same definitions used in A/L Combined Maths and university business-statistics courses. Let your values be x₁ … xₙ, sorted ascending for the order statistics.

  1. Sum and mean. Add every value to get the sum S = Σxᵢ, then divide by the count: x̄ = S ÷ n.
  2. Median (Q2). The middle value once sorted. With an even count it is the average of the two central values.
  3. Mode. The value (or values) that occur most often. When every value is unique the set has no mode; ties report all of them.
  4. Range. Maximum minus minimum — the simplest measure of spread.
  5. Variance and standard deviation. Take each deviation (xᵢ − x̄), square it, and add them up to get Σ(xᵢ − x̄)². For a population divide by n; for a sample divide by n − 1, the Bessel correction that makes s² an unbiased estimator. The standard deviation is the square root of the variance.
  6. Coefficient of variation. CV = SD ÷ |x̄| × 100, a unit-free percentage that compares spread across data sets on different scales. It is shown only when the mean is non-zero.
  7. Quartiles and IQR. Split the ordered data at the median (excluding it from both halves when the count is odd). Q1 is the median of the lower half, Q3 the median of the upper half, and IQR = Q3 − Q1.

A note on quartiles: there are nine recognised methods (Hyndman & Fan, 1996). This tool uses the median-of-halves convention, also called Tukey's hinges, which is the one most school textbooks teach. Spreadsheet functions such as Excel's QUARTILE.INC use linear interpolation and can return slightly different Q1/Q3 values — neither is wrong, they simply use different definitions. Every result is also cross-checked: the standard deviation's sum of squares is computed a second way with the raw-score identity Σxᵢ² − (Σxᵢ)²/n, and the two must agree.

Worked examples

Classic textbook set — population basis

[2, 4, 4, 4, 5, 5, 7, 9], n = 8

  1. Sum = 40 → Mean = 40 / 8 = 5
  2. Even count → Median = (4 + 5) / 2 = 4.5
  3. Mode = 4 (appears 3 times); Range = 9 − 2 = 7
  4. Squared deviations from 5: 9, 1, 1, 1, 0, 0, 4, 16 → Σ = 32
  5. Population variance = 32 / 8 = 4 → σ = 2.00
  6. Lower half [2,4,4,4] → Q1 = 4; upper [5,5,7,9] → Q3 = 6; IQR = 2

Exam marks — sample basis

[72, 85, 90, 65, 88], n = 5

  1. Sum = 400 → Mean = 400 / 5 = 80
  2. Sorted [65,72,85,88,90] → Median = 85; Mode = none (all unique)
  3. Squared deviations from 80: 64, 25, 100, 225, 64 → Σ = 478
  4. Sample variance = 478 / 4 = 119.5 → s ≈ 10.93
  5. CV (sample) = 10.93 / 80 × 100 ≈ 13.66%
  6. Odd n, exclude median: lower [65,72] → Q1 = 68.5; upper [88,90] → Q3 = 89; IQR = 20.5

Edge case — negatives and a zero mean

[-2.5, -1, 0.5, 3], n = 4, sample basis

  1. Sum = 0 → Mean = 0 → coefficient of variation is undefined
  2. Even count → Median = (−1 + 0.5) / 2 = −0.25; Range = 5.5
  3. Squared deviations from 0: 6.25, 1, 0.25, 9 → Σ = 16.5
  4. Sample variance = 16.5 / 3 = 5.5 → s ≈ 2.35
  5. Lower half [−2.5,−1] → Q1 = −1.75; upper [0.5,3] → Q3 = 1.75; IQR = 3.5

All three are reconciled by hand above and against OpenIntro Statistics §1.6.

Frequently asked questions

Sources & references

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want to suggest an improvement?

Email me at [email protected] — most fixes ship within 24 hours.