Skip to content
  • Open the math solver
  • Ask the AI tutor
  • Find an AP course
  • Create a quiz
  • Open the calculator
  • Graphing Calculator
  • Browse all calculators
  • Read math guides
↑ ↓Enter to open · Esc to close
Solve a problem

Statistics

Mean, Median, Mode and Standard Deviation: A Complete Guide

By MathSolver Pro Editorial Team · Published

Mean, median and mode describe the centre of a data set, while range and standard deviation describe how spread out it is. Knowing how to compute each one, and when each gives an honest summary, is the foundation of statistics.

Centre and spread: the two big questions

A list of numbers is hard to read at a glance. Statistics summarises it by answering two questions. Where is the middle of the data? And how far do the values typically stray from that middle? Measures of central tendency, the mean, median and mode, answer the first question. Measures of spread, such as the range, interquartile range and standard deviation, answer the second.

You need both. Two classes can have the same average test score, yet in one class everyone scored close to the average while in the other the scores ranged from failing to perfect. The centre alone hides that difference, and the spread alone says nothing about how well the class did overall.

The mean

The mean, or arithmetic average, is the sum of the values divided by how many there are. For a data set x1,x2,…,xnx_1, x_2, \ldots, x_n:

xˉ=x1+x2+⋯+xnn=1n∑i=1nxi\bar{x} = \frac{x_1 + x_2 + \cdots + x_n}{n} = \frac{1}{n}\sum_{i=1}^{n} x_i

Example 1: the mean of eight test scores

  1. Scores: 72, 85, 90, 85, 68, 95, 85, 77.
  2. Sum: 72+85+90+85+68+95+85+77=65772 + 85 + 90 + 85 + 68 + 95 + 85 + 77 = 657.
  3. Mean: 6578=82.125\frac{657}{8} = 82.125.

The mean uses every value, which makes it efficient but also sensitive. One extreme value, an outlier, can pull it a long way. A weighted mean gives some values more influence than others. If a final exam counts for 60 percent of a grade and coursework for 40 percent, scores of 80 and 90 combine to 0.6(80)+0.4(90)=840.6(80) + 0.4(90) = 84, not the simple average 85.

The median

The median is the middle value once the data are sorted. With an odd number of values it is the single middle one; with an even number it is the mean of the two middle ones.

Example 2: the median of the same scores

  1. Sort the scores: 68, 72, 77, 85, 85, 85, 90, 95.
  2. There are 8 values, so the middle pair is the 4th and 5th: 85 and 85.
  3. Median: 85+852=85\frac{85 + 85}{2} = 85.

The median ignores how far the extreme values are from the middle, which makes it resistant to outliers. Suppose five people earn 30, 35, 40, 45 and 50 thousand dollars a year. The mean and median are both 40 thousand. If a sixth person earning 1,000 thousand dollars joins the group, the mean jumps to 200 thousand, more than anyone except the newcomer earns, while the median moves only to 42.5 thousand. That is why house prices and incomes are usually reported as medians.

The mode

The mode is the value that occurs most often. In the test scores, 85 appears three times, so the mode is 85. A data set can have one mode, two modes (bimodal), several, or none at all if every value appears exactly once.

The mode is the only measure of centre that works for categorical data. You cannot average favourite colours or shoe brands, but you can say which one is most popular. For numerical data, the mode is most useful when values repeat often, such as shoe sizes in a shop's sales records, where the most common size is exactly what a buyer needs to know.

Which average should you use?

  • Use the mean for roughly symmetric data without extreme outliers, such as heights or measurement errors.
  • Use the median for skewed data or data with outliers, such as incomes, house prices or waiting times.
  • Use the mode for categories, or for discrete values where the most common choice matters.

Comparing the mean and median also tells you about the shape of the data. When the mean is noticeably larger than the median, a long tail of high values is pulling it up, and the data are right-skewed. When the mean is smaller, the data are left-skewed. In the test scores, the mean of 82.1 sits below the median of 85, because a few low scores drag the mean down.

Measuring spread: range and standard deviation

The simplest measure of spread is the range, the largest value minus the smallest. For the test scores it is 95−68=2795 - 68 = 27 points. The range is easy to compute but depends entirely on the two most extreme values. The interquartile range, the spread of the middle half of the data, is more robust.

The standard deviation is the most widely used measure of spread. It is roughly the typical distance of a value from the mean. For a whole population it is:

σ=1N∑i=1N(xi−μ)2\sigma = \sqrt{\frac{1}{N}\sum_{i=1}^{N}(x_i - \mu)^2}

Example 3: a standard deviation by hand

  1. Data: 2, 4, 4, 4, 5, 5, 7, 9. The mean is 408=5\frac{40}{8} = 5.
  2. Deviations from the mean: −3,−1,−1,−1,0,0,2,4-3, -1, -1, -1, 0, 0, 2, 4.
  3. Squared deviations: 9,1,1,1,0,0,4,169, 1, 1, 1, 0, 0, 4, 16, which add up to 32.
  4. Population variance: 328=4\frac{32}{8} = 4, so the population standard deviation is σ=2\sigma = 2.
  5. If the data are a sample, divide by n−1=7n - 1 = 7 instead: s=327≈2.14s = \sqrt{\frac{32}{7}} \approx 2.14.

The difference between dividing by nn and by n−1n - 1, and why it matters, is explained in detail in how to calculate standard deviation.

Putting the summaries together

A good summary of a data set reports a centre and a spread that suit each other. The mean pairs naturally with the standard deviation, because both use every value and both are sensitive to outliers. The median pairs with the interquartile range, because both are resistant. Reporting a median with a standard deviation mixes two different philosophies and can mislead.

For roughly bell-shaped data, the mean and standard deviation tell a remarkably complete story: about 68 percent of values lie within one standard deviation of the mean and about 95 percent within two. Measuring a value's distance from the mean in standard deviations is exactly what a z-score does. The mean, median and mode calculator computes every measure in this article from a pasted list, and the standard deviation calculator shows each step of the spread calculation.

Quartiles and the interquartile range

Quartiles split sorted data into four equal parts. A simple method is to find the median of each half. For the sorted test scores, the lower half is 68, 72, 77, 85, so the first quartile is 72+772=74.5\frac{72 + 77}{2} = 74.5. The upper half is 85, 85, 90, 95, so the third quartile is 85+902=87.5\frac{85 + 90}{2} = 87.5. The interquartile range is 87.5−74.5=1387.5 - 74.5 = 13 points, the width of the middle half of the class.

Different textbooks and software packages use slightly different quartile conventions, so small differences between answers are normal and not a sign of error. A common rule flags any value more than 1.5 interquartile ranges below the first quartile or above the third as a possible outlier. Here the fences are 55 and 107, so none of the scores is unusual.

Frequently asked questions

Can the mean, median and mode all be the same?

Yes. In a perfectly symmetric distribution with one peak, such as the ideal bell curve, all three coincide. In real data they are usually close but not identical.

What if a data set has no mode?

If every value occurs exactly once, there is no mode. Some textbooks say every value is a mode instead, but stating that there is no mode is the more common convention.

Why is median income reported instead of mean income?

Incomes are strongly right-skewed: a small number of very high earners pull the mean far above what a typical person earns. The median is not affected by how extreme the top incomes are, so it better represents a typical person.

Can a standard deviation be negative?

No. It is the square root of an average of squared distances, so it is always zero or positive. It equals zero only when every value is identical.

MathSolver Pro Editorial Team

Math content and review

Our editorial team writes every guide to explain the reasoning behind each method, not just the answer. Each worked example is checked against the site's own solver engines and automated tests before it is published, and articles are revised whenever a method or an exam format changes.