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
- Open the statistics calculator.
- Enter your data set — paste numbers separated by commas, spaces, or newlines.
- Click Calculate. All descriptive statistics are computed instantly.
- Review the step-by-step working for each statistic to see exactly how it was calculated.
- The sorted data and frequency table are shown alongside the statistics.
Descriptive Statistics Reference
| Statistic | Formula | What it measures | Best used when | Example |
|---|---|---|---|---|
| Mean (average) | Σx / n | Sum of all values divided by count | Normal distribution; no extreme outliers; most common summary statistic | Data: 3, 5, 7, 9, 11 → Mean = 35/5 = 7 |
| Median | Middle value when sorted | The middle value (or average of two middle values) when data is ordered | Skewed data; outliers present; income, house prices, wait times | Data: 1, 3, 7, 9, 100 → Median = 7 (not 24 like the mean) |
| Mode | Most frequent value | The value(s) that appear most often | Categorical data; finding the most common value; bimodal distributions | Shoe sizes: 7, 7, 8, 8, 8, 9 → Mode = 8 |
| Range | Max − Min | Difference between largest and smallest values | Quick spread summary; simple and intuitive | Data: 2, 5, 9, 14, 18 → Range = 18 − 2 = 16 |
| Variance (σ²) | Σ(x − mean)² / n (population) or / (n−1) (sample) | Average of squared differences from the mean | Foundation for standard deviation; used in ANOVA and other statistical tests | Data: 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 data | Describes spread around the mean; used in z-scores, confidence intervals, normal distribution | If variance = 4, SD = 2. About 68% of data falls within ±1 SD of the mean (normal distribution). |
| Interquartile range (IQR) | Q3 − Q1 | Range 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 context | Best measure | Avoid | Example |
|---|---|---|---|
| Symmetric data, no outliers | Mean + Standard deviation | Median understates the centre when distribution is symmetric | Heights of adult men; standardised test scores |
| Skewed data or outliers | Median + IQR | Mean is pulled toward extreme values; SD inflated by outliers | House prices; annual incomes; wait times; medical test values |
| Categorical data | Mode + frequency count | Mean and median are not meaningful for categories | Most common blood type; most popular product colour |
| Comparing groups | Mean/SD for parametric tests; Median/IQR for non-parametric | Choosing based on which makes your results look better | A/B test results; comparing treatment vs. control |
| Quality control | Mean + Standard deviation (control charts) | Median misses process drift in normally distributed measurements | Manufacturing tolerances; lab measurement precision |
Calculating Mean, Median, and Mode: Step by Step
Mean (arithmetic average)
Example data: 4, 7, 13, 2, 9, 7, 6
- Sum all values: 4 + 7 + 13 + 2 + 9 + 7 + 6 = 48
- Count values: n = 7
- Mean = 48 ÷ 7 = 6.86 (to 2 decimal places)
Median
- Sort the data: 2, 4, 6, 7, 7, 9, 13
- Count values: n = 7 (odd number)
- Median = middle value = 4th value = 7
- For even n: median = average of the two middle values. E.g., n=8, middle values at positions 4 and 5.
Mode
- Count frequency of each value: 2→1, 4→1, 6→1, 7→2, 9→1, 13→1
- Mode = value(s) with highest frequency = 7 (appears twice)
- 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.
- Subtract mean from each value: −2.86, 0.14, 6.14, −4.86, 2.14, 0.14, −0.86
- Square each difference: 8.18, 0.02, 37.70, 23.62, 4.58, 0.02, 0.74
- Sum the squares: 74.86
- Divide by (n−1) = 6: 74.86 / 6 = 12.48 (variance)
- 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:
- Q1 (25th percentile): 25% of values are below this point
- Q2 (50th percentile): The median — 50% below
- Q3 (75th percentile): 75% of values are below this point
- IQR = Q3 − Q1: The interquartile range contains the middle 50% of data
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:
- Descriptive: Mean age of students in this class = 14.5 years
- Inferential: From this sample, we estimate the mean age of all students in this school is between 14.1 and 14.9 years (95% confidence interval)
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