More games at WuGames.ioSponsoredDiscover free browser games — play instantly, no download, no sign-up.Play

Statistics Calculator

Compute mean, median, mode, variance, standard deviation, quartiles, IQR and z-scores from any dataset. Toggle sample vs population and read skewness and kurtosis.

clearClearpastePaste

Measures of central tendency

Mean (average)
Median (middle value)
Mode (most frequent)

Basic statistics

Count (n)
Sum
Minimum
Maximum
Range

Measures of spread

Variance
Standard deviation
Standard error
Coefficient of variation

Other statistics

Q1 (first quartile)
Q3 (third quartile)
IQR (interquartile range)

Distribution shape

Skewness
Excess kurtosis

Sorted data

Compute every standard descriptive statistic for your dataset at once — central tendency (mean, median, mode), dispersion (variance, standard deviation, IQR), quartile boundaries and z-scores — without leaving the page. Paste numbers separated by commas, spaces, tabs or new lines; the calculator sorts the data, runs the formulas, and shows you the intermediate working so you can verify each number.

What is Statistics?

Statistics is the mathematical science of collecting, organising, summarising, analysing and interpreting data. It exists because raw numbers — say a list of 200 exam scores — are too noisy to grasp at a glance. Summary statistics distil that noise into a handful of numbers that describe where the data is centred, how widely it spreads, and how its individual values compare to the rest of the dataset.

Measures of Central Tendency

These answer the question "what is a typical value?". Each one captures a different sense of centre:

  • Mean (arithmetic average): sum of all values divided by count. Sensitive to outliers — a single very large value can drag it far from the rest of the data.
  • Median: the middle value when data is sorted. Half the dataset is below it, half above. Robust against outliers, which is why house-price reports always quote median, not mean.
  • Mode: the value that appears most often. Useful for categorical data ("most common colour") but can be undefined or non-unique on continuous data.

Measures of Spread (Dispersion)

Spread tells you how much the data varies. A class where everyone scored 70 has the same mean as one with scores from 30 to 100, but the second class has huge spread.

  • Range: max minus min. Quick to compute, but ignores everything between the extremes.
  • Variance: average of squared deviations from the mean. Squaring makes positive and negative deviations both count and emphasises large gaps.
  • Standard deviation: square root of variance, in the same units as the original data. Roughly the "typical distance from the mean".
  • Interquartile range (IQR): Q3 − Q1, the span of the middle 50% of the data. Robust to outliers, which makes it the basis of box plots and the standard outlier-detection rule.

Z-Score

The z-score expresses any data point in units of standard deviations from the mean. The formula is:

z = (x - μ) / σ

A z-score of 0 means the value sits exactly at the mean; +2 means two standard deviations above, −1.5 means one-and-a-half below. For approximately normal data, the 68-95-99.7 rule says ~68% of values lie within z = ±1, ~95% within ±2 and ~99.7% within ±3 — so a z above 3 or below −3 is unusual enough to investigate.

Applications of Statistics

Statistics underpins almost every quantitative discipline:

  • Science: experimental analysis, hypothesis testing, confidence intervals, p-values
  • Business: market research, quality control (Six Sigma is named after a standard deviation threshold), A/B testing
  • Medicine: clinical trials, epidemiology, dose-response curves, sensitivity/specificity of tests
  • Social Sciences: survey analysis, polling margin of error, demographic studies
  • Finance: portfolio variance, Sharpe ratio, Value at Risk, the entire field of quantitative trading

Frequently Asked Questions

Use the mean when the data is roughly symmetric and free of extreme outliers — exam scores in a typical class, heights of adults in a country, daily temperatures over a month. The mean uses every value, so it captures the full information in the dataset. Use the median when the data is skewed or contains outliers. Income is the classic example: a single billionaire in a 100-person sample drags the mean way above the typical person's income, but barely moves the median. House prices, response times in web servers, and waiting times in hospitals are reported as medians for the same reason. Mathematical reason: the mean minimises the sum of squared errors, the median minimises the sum of absolute errors. Squared errors punish a single big miss harshly, which is why the mean chases the outlier. A practical test: if mean and median differ by more than ~10% of the standard deviation, your data is probably skewed and the median is the safer summary.

Population standard deviation divides by N (the count); sample standard deviation divides by N−1. The N−1 is called Bessel's correction. Why subtract one? When you compute the sample mean and then measure deviations from it, the data is closer to the sample mean than it is to the true population mean — by construction. If you divide by N you systematically underestimate the population variance. Dividing by N−1 corrects that bias on average, giving an unbiased estimator of the population variance. Practical rule: if you have the entire population (every employee at a small company, every test score in a class you taught), use N. If you have a sample drawn from a larger population (1000 voters from 30 million, 50 light bulbs from a factory's daily run) and you want to infer something about the whole population, use N−1. Most software defaults to N−1: Excel's STDEV.S, NumPy's std with ddof=1, Google Sheets' STDEV. The difference matters most for small samples — for N=1000 it is essentially nothing, for N=4 it is huge. Use the Sample/Population toggle above the Calculate button to switch the divisor: it recomputes variance, standard deviation, standard error, the coefficient of variation, and the skewness/kurtosis formulas in one click. In sample mode the standard error is the sample SD divided by √n; in population mode it is the population SD divided by √n.

Different software gives different Q1 and Q3 because there is no single agreed definition of a percentile for a finite dataset. This calculator uses exclusive linear interpolation on the rank (n−1)·p: it sorts the data, computes the fractional position pos = (n−1)·p where p is 0.25 for Q1 and 0.75 for Q3, then linearly interpolates between the two surrounding sorted values. This is exactly the method behind Excel's PERCENTILE.INC and QUARTILE.INC, Google Sheets' PERCENTILE, NumPy's default percentile (linear interpolation), and R's quantile type 7. It is NOT the same as Excel's PERCENTILE.EXC (which uses position (n+1)·p) or the Tukey/Moore-McCabe hinge method taught in many intro courses, both of which can return slightly larger IQRs on small datasets. So if your stats textbook or a different tool reports Q1/Q3 a little off from ours, the cause is almost always the percentile convention, not an error — for large datasets the methods converge and the difference vanishes. The IQR (Q3 − Q1) and Tukey's 1.5·IQR outlier fences are computed from these interpolated quartiles.

Three reasons. First, squaring makes positive and negative deviations both count as 'distance from the mean' — without squaring (or absolute value) the deviations sum to zero by construction, which is useless. Second, squaring penalises large deviations more than small ones. Two values 10 units off the mean count as much as 50 values 2 units off (10² = 100 vs 50 × 2² = 200), so variance is sensitive to occasional big misses, which usually matter more in risk and quality control. Third, squared deviations are mathematically convenient: they are differentiable everywhere (absolute value is not at zero), they connect cleanly to the normal distribution, and they make the variance of a sum equal the sum of variances for independent variables. The downside is that variance has the wrong units — squared dollars, squared kilograms — so we usually quote the standard deviation, the square root of variance, which is back in the original units. Mean absolute deviation (MAD) exists and is robust, but it lacks the clean algebraic properties that make variance the default in classical statistics.

A z-score tells you how unusual a value is, in standard-deviation units. z = (x − μ) / σ, where x is your value, μ is the dataset mean and σ is the standard deviation. Positive z = above mean, negative z = below mean, |z| = how many standard deviations away. For approximately normal data, the empirical rule (68-95-99.7) says about 68% of values fall in z ∈ [−1, +1], 95% in [−2, +2] and 99.7% in [−3, +3]. So z = 1.5 is moderately above average (better than ~93% of values), z = 2.5 is markedly above (top ~0.6%), z = −3 is rare enough to suspect an error or a special case. Z-scores are how SAT/IQ tests calibrate themselves (mean 100, SD 15 means IQ 130 is z = +2, top 2.3%), how doctors flag lab results outside reference ranges, and how machine-learning practitioners detect outliers before training. Caveat: the empirical rule only works for roughly normal distributions. For skewed or heavy-tailed data, a z of 3 might not be unusual at all — bitcoin daily returns famously break this rule.

The interquartile range (IQR) is Q3 minus Q1 — the span of the middle 50% of your data. Q1 is the 25th percentile (a quarter of values lie below it), Q3 is the 75th. IQR is the standard robust measure of spread because, unlike the standard deviation, it is immune to extreme values: changing the largest data point from 100 to 1,000,000 leaves Q1, Q3 and IQR untouched. Tukey's rule (1977) defines outliers as values below Q1 − 1.5·IQR or above Q3 + 1.5·IQR; values past 3·IQR are called 'far out'. Box plots draw boxes from Q1 to Q3, a line at the median, whiskers extending to the most extreme non-outlier points, and dots for outliers. The 1.5 factor was chosen because, for normal data, it flags roughly 0.7% of values — close to a z-score threshold of ±2.7. Use IQR-based outlier detection when your data may be skewed or heavy-tailed; use z-score detection when you know the distribution is approximately normal and you want a sharper criterion.

Because every value appears exactly once. The mode is the most frequent value, but if all 100 measurements are distinct decimals — heights of 100 students measured to the millimetre, response times in milliseconds — none repeats and the mode is undefined. This calculator reports 'No mode' in that case rather than picking one arbitrarily. Two related cases: bimodal data has two values tied for most frequent (a class with lots of struggling and lots of excelling students might show two peaks), and multimodal data has more than two. Real-world workaround: bin the values into intervals (e.g., heights into 5 cm buckets) and report the modal bin instead of the modal value. For continuous data, the mode of a smoothed histogram (kernel density estimate) is more useful than the raw mode. This is also why the mean and median get the spotlight in statistics — they always exist and are always single numbers, while the mode can be missing, single, or multiple.

Skewness measures asymmetry of the distribution. A symmetric distribution (like the normal) has skew = 0. Positive skew means a long right tail (e.g., income, with a few very rich people), negative skew means a long left tail (e.g., age at death in a developed country). A simple test: if mean > median, the data is right-skewed; if mean < median, left-skewed. Kurtosis measures how heavy the tails are compared to a normal distribution. High kurtosis (leptokurtic) means more extreme values than a normal would predict — financial returns are famously leptokurtic, which is why models based on normal assumptions (Black-Scholes, naive Value at Risk) underestimate crash risk. Low kurtosis (platykurtic) means thinner tails. Why care? Many statistical tests assume normality, which requires skew ≈ 0 and excess kurtosis ≈ 0. If you have heavy skew or fat tails, mean and standard deviation become misleading, and you should switch to robust statistics (median, IQR, trimmed mean) or transform the data (log-transform fixes right-skewed positive data).

Three classic failures every analyst should know. (1) Simpson's paradox: a trend that appears in subgroups can reverse when groups are combined. UC Berkeley was famously sued in 1973 for sex discrimination because women had a lower overall admission rate, yet department by department women had a higher rate — women just applied disproportionately to harder departments. (2) Survivor bias: studying only the survivors gives biased conclusions. WWII engineers wanted to armour returning planes where they had most bullet holes; statistician Abraham Wald pointed out they should armour where the returning planes had no holes — those were the places that downed the others. (3) Misinterpreting correlation as causation: ice-cream sales correlate with drownings; both are caused by hot summer days, not by each other. Other landmines include the prosecutor's fallacy (mixing up P(A|B) with P(B|A)), p-hacking (running 20 tests and reporting only the significant one), Goodhart's law ('when a measure becomes a target, it ceases to be a good measure'), and reporting a precise mean for skewed data. Whenever a summary statistic surprises you, look at the distribution before drawing conclusions.
Statistics Calculator — Compute mean, median, mode, variance, standard deviation, quartiles, IQR and z-scores from any dataset. Toggle sample vs
Statistics Calculator