Math & Statistics

Statistics Calculator

Mean, median, mode, standard deviation, variance, and quartiles for any dataset. Paste numbers, get results instantly.

9 valid numbers detected. Non-numeric tokens are ignored.

Central tendency

Mean (average)
Sum ÷ count
17.7778
Median
Middle value when sorted
18.0000
Mode
No value repeats
None
Sum
160.00
Count
9

Spread & quartiles

Standard deviation (sample)
n−1 in denominator
8.5408
Standard deviation (population)
n in denominator
8.0523
Variance (sample)
72.9444
Range
Max − min
25.0000
Min
5.0000
Max
30.0000
Q1 (25th percentile)
12.0000
Q3 (75th percentile)
24.0000
IQR
Q3 − Q1
12.0000

The three measures of central tendency

Three common ways to describe the “center” of a dataset:

  • Mean: arithmetic average. Sum all values, divide by count. Sensitive to outliers — one billionaire skews the “average income” of a small town.
  • Median: the middle value when sorted. For an even-count list, the average of the two middle values. Insensitive to extreme values, making it a better “typical” for skewed data.
  • Mode: the most-frequent value. There can be no mode (all unique), one mode (unimodal), or multiple modes (bimodal, multimodal). Mode is most useful for categorical data.

For symmetric distributions: mean = median = mode. For right-skewed (long tail to the right, like income): mean > median > mode. For left-skewed: mean < median < mode.

Standard deviation: the spread metric

Standard deviation (SD) measures how spread out the data is around the mean. Low SD = data clusters tightly around the mean. High SD = data is spread widely.

Sample SD divides by (n−1) — used when your data is a sample drawn from a larger population. Population SDdivides by n — used when you have the entire population. The (n−1) correction (Bessel's correction) accounts for the fact that you're estimating the population mean using the sample mean, which underestimates true variability.

For roughly normal distributions, the empirical “68-95-99.7 rule” applies:

  • ~68% of values fall within 1 SD of the mean.
  • ~95% within 2 SDs.
  • ~99.7% within 3 SDs.

Variance vs standard deviation

Variance is the average squared deviation from the mean. Standard deviation is the square root of variance — same information, but in the original units (instead of squared units). Use SD when reporting; variance shows up in formulas because it's mathematically convenient.

Quartiles and the five-number summary

Quartiles divide sorted data into four equal-sized groups:

  • Q1 (25th percentile): 25% of data below, 75% above.
  • Q2 (50th percentile): the median. 50/50 split.
  • Q3 (75th percentile): 75% below, 25% above.

IQR (Interquartile Range)= Q3 − Q1, the spread of the middle 50%. Used to detect outliers — values below Q1 − 1.5×IQR or above Q3 + 1.5×IQR are commonly flagged as outliers (this is the “Tukey fences” rule used in box plots).

The five-number summary (min, Q1, median, Q3, max) is the basis for box plots and gives a robust description of distribution shape.

When mean lies, median tells the truth

Classic example: house prices in a neighborhood. Most homes are $300K–500K; one mansion is $5M. The mean home price is much higher than the typical home price. Median better represents the “typical” value.

US news typically reports median household income (~$80K) rather than mean (~$120K) for this reason. Real estate uses median sale prices. Salary surveys use median compensation. Whenever you read “average,” check whether they mean the mean or the median — the difference can be significant.

Common use cases for this calculator

  • Test scores — class average, top quartile, spread of student performance.
  • Workout / fitness data — average pace, variation in reps, weight progression.
  • Financial returns — average return, volatility (SD), worst/best month.
  • Survey results — mean rating, distribution shape, outliers.
  • Manufacturing / quality control — process mean, control limits (mean ± 3 SD).
  • Sports stats — batting average, season-over-season variation.
  • Personal data — sleep duration, weight, daily steps.

For other math tools: Percentage Calculatorfor relative changes, Random Number Generator for sampling, and Unit Converter for measurement conversions.

Frequently Asked Questions

What's the difference between mean, median, and mode?
Mean: sum ÷ count (the "average" most people think of). Median: the middle value when sorted (less affected by outliers). Mode: the most-frequent value (sometimes none, sometimes multiple). All three measure "center" but tell different stories — mean gets pulled by extreme values, median doesn't.
Sample vs population standard deviation?
Sample SD divides by (n−1), population SD divides by n. Use sample SD when your data is a sample drawn from a larger population (most common case). Use population SD when you have the entire population. The difference shrinks with large datasets — for n>30 it's usually negligible.
When does the median tell a different story than the mean?
When data has outliers or skew. Income is a classic example: a few billionaires pull the mean income above the median by a lot. US household mean income (~$120K) is much higher than median (~$80K) because of the right skew. For skewed data, median is usually the more representative center.
What is the IQR and why does it matter?
IQR (Interquartile Range) = Q3 − Q1, the spread of the middle 50% of your data. Used to detect outliers (any value below Q1 − 1.5×IQR or above Q3 + 1.5×IQR is typically flagged as an outlier). Works better than mean/SD for skewed distributions because it's not sensitive to extreme tails.
How do I calculate quartiles?
Sort the data. Q1 is the value at the 25th percentile, Q3 at 75th. There are several methods (linear interpolation, Tukey's, etc.) — different software returns slightly different values. This calculator uses linear interpolation (the most common method), matching Excel's QUARTILE.INC.

Related Calculators