Compute the mean, median, mode, and range of any numeric dataset. Visualize data distribution, see sorted values, and understand central tendency at a glance.
Descriptive statistics are the foundation of data analysis. They summarize and organize data so that patterns become visible. The four core measures — mean, median, mode, and range — provide a comprehensive snapshot of any dataset's central tendency and spread. Whether you are analyzing exam scores, climate data, financial returns, or survey responses, these statistics are your first and most essential tools.
For a dataset x1, x2, …, xn:
Mean = (Σ xi) / n | Median = middle value (or average of two middle values) | Mode = most frequent value(s) | Range = max − min
The mean is the sum of all values divided by the number of values. It is the most commonly used measure of central tendency. However, the mean is sensitive to outliers — a single extreme value can skew it significantly. For symmetric distributions with no outliers, the mean is an excellent summary. The formula is:
μ = (x₁ + x₂ + … + xn) / n (population mean) or x = (Σ xi) / n (sample mean)
The median is the value that divides the sorted dataset into two equal halves. If there is an odd number of values, the median is the middle value. If even, it is the average of the two middle values. The median is robust to outliers and is the preferred measure of central tendency for skewed distributions (e.g., income data, house prices).
The mode is the value that appears most frequently. A dataset may have one mode (unimodal), two modes (bimodal), or more (multimodal). If all values appear with the same frequency, the dataset has no mode. The mode is the only measure of central tendency that can be used with categorical (non‑numeric) data.
The range is the simplest measure of variability: it is the difference between the maximum and minimum values. While easy to compute, the range is highly sensitive to outliers and only considers the two extremes. For a more robust measure of spread, statisticians often use the interquartile range (IQR) or standard deviation.
Dataset: 85, 92, 78, 90, 88, 76, 95, 89, 84, 91
Interpretation: The mean (86.8) is slightly lower than the median (88.5), indicating a mild left skew (some lower scores pull the mean down). The range of 19 points shows moderate spread.
| Measure | Best used when… | Sensitive to outliers? | Applicable to categorical data? |
|---|---|---|---|
| Mean | Data is roughly symmetric and free of extreme values | Yes | No |
| Median | Data is skewed or contains outliers | No | No |
| Mode | Finding the most common category or value | No | Yes |
| Range | Getting a quick sense of spread | Yes | No |
One of the most overlooked yet critical aspects of descriptive statistics is the level of measurement of your data. Choosing the wrong measure leads to meaningless results:
This tool empowers you to not just calculate, but to interpret—a core skill for any data analyst or researcher.
A small company has 10 employees with annual salaries (in thousands): 35, 38, 40, 42, 45, 48, 50, 52, 55, 200. The mean is 60.5 (skewed by the CEO's salary), while the median is 46.5 — a much better representation of the typical employee's salary. The range is 165, which is misleadingly large due to the outlier. This example illustrates why it is essential to consider multiple measures and understand their limitations.