About this tool
The Statistics Calculator computes descriptive statistics: mean, median, mode, Q1, Q3, interquartile range (IQR), range, sum, and count. It also identifies potential outliers using the 1.5×IQR rule.
About descriptive statistics
Descriptive statistics summarize a dataset with a small number of meaningful numbers. The five most important are central tendency (mean, median, mode), spread (range, variance, standard deviation), shape (skewness, kurtosis), position (quartiles, percentiles), and count (sample size). This calculator computes mean, median, mode, range, variance, standard deviation (both sample and population), quartiles, and IQR for any numeric list you paste in.
Use cases run from school homework to professional analysis: a teacher grading a quiz checks the class median and IQR to set the curve. A product manager looking at session duration uses median to avoid being misled by a few power users. A QA engineer comparing CPU benchmark runs uses standard deviation to detect flaky tests. A data analyst building a dashboard reports mean, median, and 95th percentile because each answers a different question. Whenever you have more than a handful of numbers and need a numerical summary, descriptive statistics are the first step.
Formulas behind each measure
Every result on this page is computed by these standard formulas. The dataset is sorted once on input; mean and SD are computed with single-pass aggregates.
mean = sum(x_i) / n median = sorted[n/2] (or average of two middles if n is even) mode = value(s) with highest frequency range = max - min var_s = sum((x_i - mean)^2) / (n - 1) // sample variance sd_s = sqrt(var_s) // sample standard deviation Q1 = median of lower half Q3 = median of upper half IQR = Q3 - Q1
- n = number of data points in the dataset.
- n - 1 in sample variance is Bessel's correction; population variance divides by n.
- sorted = the array after ascending sort; quartiles use linear interpolation if a position falls between integers.
Worked example: exam scores for a class of 12
Scores: 42, 58, 65, 68, 70, 72, 74, 75, 78, 81, 85, 92.
- Sum: 42 + 58 + ... + 92 = 860.
- Mean: 860 / 12 = 71.67.
- Median: the two middle values are 72 and 74. Median = (72 + 74) / 2 = 73.
- Mode: every score is unique, so the dataset has no mode.
- Range: 92 minus 42 = 50.
- Q1: median of lower 6 (42, 58, 65, 68, 70, 72) = (65 + 68) / 2 = 66.5. Q3: median of upper 6 (74, 75, 78, 81, 85, 92) = (78 + 81) / 2 = 79.5.
- IQR: 79.5 minus 66.5 = 13.
- Sample standard deviation: sqrt(sum of squared deviations / 11) = approximately 12.97.
When to use each measure
| Measure | What it tells you | Robust to outliers? | Best for |
|---|---|---|---|
| Mean | Center of mass | No | Symmetric data: heights, IQ scores |
| Median | Middle value | Yes | Skewed data: income, prices, response times |
| Mode | Most common value | n/a | Categorical data: most popular product size |
| Range | Spread (max minus min) | No | Quick spread check, weather highs and lows |
| Variance | Average squared deviation | No | Mathematical statistics, ANOVA |
| Standard deviation | Average deviation in original units | No | Quality control, finance volatility |
| IQR | Middle 50 percent spread | Yes | Box plots, outlier detection |
| Percentile | Position in distribution | Yes | Growth charts, latency SLOs (p95, p99) |
Pitfalls to avoid
- Reporting mean for skewed data. Average household income in the US is roughly 1.7x median income because top earners drag the mean up. Use median when you want a typical value.
- Confusing sample and population SD. Sample SD (divide by n - 1) is what you almost always want. Population SD (divide by n) underestimates spread for any random sample.
- Treating SD as a confidence interval. One SD covers 68 percent of a normal distribution, but not every dataset is normal. Plot a histogram first.
- Ignoring outliers without checking them. The 1.5 x IQR rule flags candidates, but the outlier may be the most important value in the data (a fraud, a record-breaking customer). Investigate before deleting.
- Small samples. Quartiles and SD become unreliable below about n = 10. Report the raw points instead, or note the small sample size.
- Mode on continuous data. Every measurement is unique in floating point, so mode is meaningless. Bin the values first or use a kernel density estimate.
Related tools on 3Tej
Frequently asked questions
What is the difference between mean, median, and mode?
Mean is the arithmetic average (sum divided by count). Median is the middle value when the data is sorted (the average of the two middle values for even counts). Mode is the most frequently occurring value. For a symmetric distribution like adult heights, all three roughly agree; for skewed data like income, mean is pulled up by high earners while median better represents the typical case.
How is the interquartile range (IQR) calculated and why does it matter?
IQR equals Q3 minus Q1, where Q1 is the 25th percentile (median of the lower half) and Q3 is the 75th percentile (median of the upper half). The IQR captures the middle 50 percent of the data, robust to outliers. Tukey's rule flags points below Q1 minus 1.5 x IQR or above Q3 plus 1.5 x IQR as potential outliers.
When should I use sample standard deviation versus population standard deviation?
Use the sample standard deviation (divide by n minus 1, called Bessel's correction) when your data is a random sample from a larger population, which is almost always the case in real analysis. Use the population standard deviation (divide by n) only when you have measurements for every member of the population, like every employee in a 50-person company. The sample formula is unbiased; the population formula underestimates spread on small samples.
What does standard deviation actually tell me?
Standard deviation is the average distance of each data point from the mean, measured in the same units as the data. For a normal distribution, roughly 68 percent of values fall within one SD, 95 percent within two, and 99.7 percent within three (the empirical rule). A small SD means the data is tightly clustered; a large SD means it is spread out.
My data has multiple modes. Which one does the calculator return?
The calculator returns all values tied for the highest frequency. If two values both appear three times and no other value appears more than twice, the dataset is bimodal and both are reported. If every value appears exactly once, the dataset has no mode and the calculator returns no mode.
