PublicSoftTools
Tools16 min read·PublicSoftTools Team·May 2026

Statistics Calculator — Mean, Median, Mode, Standard Deviation

Descriptive statistics summarise a data set with a small number of values that capture its centre, spread, and shape. The statistics calculator on PublicSoftTools calculates mean, median, mode, standard deviation, variance, quartiles, and more from any list of numbers — showing both the results and the step-by-step working so you understand how each value is derived.

How to Use the Statistics Calculator

  1. Open the statistics calculator.
  2. Enter your data set — paste numbers separated by commas, spaces, or newlines.
  3. Click Calculate. All descriptive statistics are computed instantly.
  4. Review the step-by-step working for each statistic to see exactly how it was calculated.
  5. The sorted data and frequency table are shown alongside the statistics.

Descriptive Statistics Reference

StatisticFormulaWhat it measuresBest used whenExample
Mean (average)Σx / nSum of all values divided by countNormal distribution; no extreme outliers; most common summary statisticData: 3, 5, 7, 9, 11 → Mean = 35/5 = 7
MedianMiddle value when sortedThe middle value (or average of two middle values) when data is orderedSkewed data; outliers present; income, house prices, wait timesData: 1, 3, 7, 9, 100 → Median = 7 (not 24 like the mean)
ModeMost frequent valueThe value(s) that appear most oftenCategorical data; finding the most common value; bimodal distributionsShoe sizes: 7, 7, 8, 8, 8, 9 → Mode = 8
RangeMax − MinDifference between largest and smallest valuesQuick spread summary; simple and intuitiveData: 2, 5, 9, 14, 18 → Range = 18 − 2 = 16
Variance (σ²)Σ(x − mean)² / n (population) or / (n−1) (sample)Average of squared differences from the meanFoundation for standard deviation; used in ANOVA and other statistical testsData: 2, 4, 6 → Mean = 4 → Variance = ((4+0+4)/3) = 2.67
Standard deviation (σ)√(Variance)Square root of variance — in the same units as the dataDescribes spread around the mean; used in z-scores, confidence intervals, normal distributionIf variance = 4, SD = 2. About 68% of data falls within ±1 SD of the mean (normal distribution).
Interquartile range (IQR)Q3 − Q1Range of the middle 50% of data (between 25th and 75th percentiles)Robust measure of spread; identifying outliers (values > 1.5×IQR above Q3 or below Q1)Box plot whiskers; salary bands; outlier detection

Which Statistics to Use for Your Data

Data contextBest measureAvoidExample
Symmetric data, no outliersMean + Standard deviationMedian understates the centre when distribution is symmetricHeights of adult men; standardised test scores
Skewed data or outliersMedian + IQRMean is pulled toward extreme values; SD inflated by outliersHouse prices; annual incomes; wait times; medical test values
Categorical dataMode + frequency countMean and median are not meaningful for categoriesMost common blood type; most popular product colour
Comparing groupsMean/SD for parametric tests; Median/IQR for non-parametricChoosing based on which makes your results look betterA/B test results; comparing treatment vs. control
Quality controlMean + Standard deviation (control charts)Median misses process drift in normally distributed measurementsManufacturing tolerances; lab measurement precision

Calculating Mean, Median, and Mode: Step by Step

Mean (arithmetic average)

Example data: 4, 7, 13, 2, 9, 7, 6

  1. Sum all values: 4 + 7 + 13 + 2 + 9 + 7 + 6 = 48
  2. Count values: n = 7
  3. Mean = 48 ÷ 7 = 6.86 (to 2 decimal places)

Median

  1. Sort the data: 2, 4, 6, 7, 7, 9, 13
  2. Count values: n = 7 (odd number)
  3. Median = middle value = 4th value = 7
  4. For even n: median = average of the two middle values. E.g., n=8, middle values at positions 4 and 5.

Mode

  1. Count frequency of each value: 2→1, 4→1, 6→1, 7→2, 9→1, 13→1
  2. Mode = value(s) with highest frequency = 7 (appears twice)
  3. A data set can be unimodal (one mode), bimodal (two modes), or multimodal (no clear mode)

Calculating Standard Deviation

Standard deviation measures how spread out values are from the mean. Two versions: population standard deviation (divide by n — when you have all data) and sample standard deviation (divide by n−1 — when your data is a sample from a larger population). For most practical purposes with sample data, use n−1 (Bessel's correction).

Using the same data: 4, 7, 13, 2, 9, 7, 6. Mean = 6.86.

  1. Subtract mean from each value: −2.86, 0.14, 6.14, −4.86, 2.14, 0.14, −0.86
  2. Square each difference: 8.18, 0.02, 37.70, 23.62, 4.58, 0.02, 0.74
  3. Sum the squares: 74.86
  4. Divide by (n−1) = 6: 74.86 / 6 = 12.48 (variance)
  5. Take square root: √12.48 = 3.53 (sample standard deviation)

Percentiles and Quartiles

Percentiles divide a data set into 100 equal parts. The pth percentile is the value below which p% of the data falls:

Outlier detection using IQR: a data point is a suspected outlier if it is below Q1 − 1.5×IQR or above Q3 + 1.5×IQR. This is the standard for box plot whiskers (Tukey method).

Descriptive vs. Inferential Statistics

The statistics calculator provides descriptive statistics — summaries of a specific data set. Descriptive statistics describe what the data shows. Inferential statistics use sample data to draw conclusions about a population:

Inferential statistics require hypothesis testing, confidence intervals, and probability distributions — beyond descriptive summaries. If you are conducting a formal statistical analysis, the statistics calculator provides the descriptive foundation; inference requires additional statistical tests (t-test, ANOVA, chi-square, etc.).

Common Questions

When should I use median instead of mean?

Use median when the data is skewed (not symmetric) or contains significant outliers. Examples: income distributions are heavily right-skewed — a few very high earners pull the mean far above the typical experience; median income reflects what a typical person earns. House prices, insurance claims, and wait times all commonly use median. The rule of thumb: if you would not expect a value 10× the median in your data set, mean is likely appropriate. If you would (e.g., billionaires in an income dataset), use median.

What is the difference between population and sample standard deviation?

Population SD divides by n (total population). Sample SD divides by n−1 (Bessel's correction). The −1 compensates for the fact that sample means tend to underestimate the spread of the full population. If your data is a sample (you are measuring a subset and want to generalise to the whole population), use sample SD (n−1). If your data is the complete population (every member is included), use population SD (n). Most practical analyses use sample SD.

Can the mode be used for non-numeric data?

Yes — mode is the only central tendency measure that works for categorical (non-numeric) data. The most common blood type, most popular app colour, most frequent customer complaint category — these are all modes. Mean and median require numerical ordering and arithmetic operations, which are not meaningful for categories like colours or country names.

Calculate Statistics from Your Data

Paste any list of numbers for instant mean, median, mode, standard deviation, quartiles, and more — with step-by-step working.

Open Statistics Calculator