Mean, Median, and Standard Deviation Explained

Last updated: 2026-10-12

The Statistics Calculator on this site returns eight numbers from a single list of values: mean, median, mode, range, and both a population and a sample version of variance and standard deviation. Most of those are straightforward once you know what each is actually asking. The population versus sample distinction trips up almost everyone at first, so this guide spends most of its time there.

Three ways to describe the "middle"

Mean, median, and mode all answer the question "what's typical here," but they answer it differently, and picking the wrong one can be misleading. The mean is the sum of every value divided by how many values there are, the ordinary average. It uses every number in the dataset, which makes it sensitive to outliers: a single very large or very small value can pull it a long way from where most of the data actually sits. The median is the middle value once everything is sorted (or the average of the two middle values, for an even count), and it ignores how extreme the outer values are, only their order. That makes it the more honest measure of "typical" for skewed data, household income being the classic example, where a handful of very high earners pull the mean well above where most people's income actually falls. The mode is simply the most frequently occurring value, most useful when you care about the single most common outcome rather than a central tendency at all, and it can have no answer (every value appears once) or several tied answers.

Three ways to describe the spread

Range, variance, and standard deviation all describe how spread out the data is, rather than where its center sits. Range is the simplest: the maximum value minus the minimum, which captures the full span but says nothing about how the values in between are distributed. Two datasets can share an identical range while one has every value clustered near the middle and the other has them spread evenly across it. Variance and standard deviation fix that by using every value, not just the two extremes.

How variance is actually calculated

Variance is the average of each value's squared distance from the mean. Concretely: subtract the mean from every value, square each result (which makes every term positive, so values below the mean do not cancel out values above it), then average those squared differences. Squaring also weights larger deviations more heavily than smaller ones, a value twice as far from the mean contributes four times as much to the variance, which is a deliberate property, not a side effect, since it makes variance more sensitive to genuinely unusual values than a plain average distance would be.

Standard deviation is just the square root of variance, and it exists mainly for convenience: variance is in squared units (squared dollars, squared minutes), which is awkward to reason about, while standard deviation is back in the original units, making it directly comparable to the mean and the raw data.

Population versus sample: the part that actually differs

Every value above is computed the same way whether you are looking at population or sample statistics, except for one number: what you divide by. Population variance divides the sum of squared deviations by the count of values, n. Sample variance divides by n minus 1 instead, a correction named after the statistician Friedrich Bessel.

The distinction matters because of what the data represents. If your list is the entire population you care about, every student in a class, every day in a month, dividing by n gives the true variance directly. But if your list is only a sample drawn from some larger population you cannot fully measure, and you are using the sample's own mean to compute the deviations (rather than the true population mean, which you do not know), dividing by n slightly underestimates the population's real variance. That happens because the sample mean is, by construction, the value that minimizes the sum of squared deviations for that specific sample, so deviations measured from it are systematically a little smaller than deviations measured from the true population mean would be. Dividing by n minus 1 instead of n corrects for that bias, producing an unbiased estimate of the population's variance from sample data alone. As a sample grows larger, the difference between dividing by n and n minus 1 shrinks toward nothing, since one fewer degree of freedom matters less against a larger denominator.

A worked example

The dataset 2, 4, 4, 4, 5, 5, 7, 9 has 8 values, and works out as follows.

024579Mean 5Median 4.5
Each dot is one value (stacked when a value repeats, like the three 4s). The mean sits slightly above the median here because the 9 pulls it up.
StatisticValue
Sum40
Mean5
Median4.5
Mode4
Range7
Population variance4
Population standard deviation2
Sample variance4.57
Sample standard deviation2.14

The sum of squared deviations from the mean of 5 works out to 32 (9 plus 1 plus 1 plus 1 plus 0 plus 0 plus 4 plus 16, one term per value). Dividing that 32 by 8 values gives the population variance of 4. Dividing the same 32 by 7 (n minus 1) instead gives the larger sample variance of about 4.57, the Bessel's correction adjustment described above, in action on real numbers rather than in the abstract. Paste this same list into the Statistics Calculator to confirm every figure at once.

Is standard deviation measured from the mean or the median?

Always the mean. Standard deviation is defined as the square root of the average squared distance from the mean, and that pairing isn't arbitrary: the mean is precisely the value that makes the sum of squared distances as small as possible, so it is the natural center for a spread measure built on squared distances.

The median has its own matching spread measures. The median absolute deviation (MAD) is the median of each value's absolute distance from the median, and the interquartile range (IQR) is the span of the middle half of the data, from the 25th to the 75th percentile. These share the median's resistance to outliers. In the dataset above, the median is 4.5 and the MAD is 0.5. Change the 9 to 90 and watch what happens: the mean jumps from 5 to about 15.1 and the sample standard deviation from 2.14 to about 30.3, while the median and the MAD don't move at all.

That gives a simple rule for reporting. When data is roughly symmetric, report the mean and standard deviation together (the "M" and "SD" you see in research papers). When it is skewed or has outliers, like incomes, home prices, or response times, report the median with the IQR or MAD instead. Mixing them, a median alongside a standard deviation, describes the center with one yardstick and the spread with another, which is why you will rarely see it done. The Statistics Calculator reports the mean based measures; it doesn't calculate the MAD or IQR.

Reading a mean and standard deviation together

For data shaped roughly like a bell curve, the standard deviation tells you where most values fall. About 68% of values land within one standard deviation of the mean, about 95% within two, and about 99.7% within three. If a class's test scores have a mean of 75 and a standard deviation of 8, roughly two thirds of students scored between 67 and 83, and a score of 95 (two and a half standard deviations above the mean) is genuinely unusual. A score of 83 is good, but not rare.

The size of the standard deviation only means something relative to the mean and the units. A standard deviation of 8 points is a wide spread on a test averaging 75, but the same 8 would be tiny for a dataset of home prices averaging $400,000. And the 68/95/99.7 pattern only holds for bell shaped data. For skewed data, the standard deviation still measures spread, but you can't read percentages off it this way, one more reason to switch to the median and IQR when the data is lopsided.