Skip to main content
MathFree · no sign-up

Mean, Median, Mode and Range Calculator

Mean, median and mode together — because all three are called the average — plus the range they say nothing about.

Updated

6 numbers found. Commas, spaces or one per line all work.

Average

17.333333mean

Sum 104 divided by 6.

Median — the middle value
13
Mode — the most common
12
Count
6
Sum
104
Smallest
11
Largest
40
Range
29

The mean and the median are 4.33 apart. That gap is what an outlier looks like: one unusually large or small value drags the mean towards it while leaving the median where it is. For incomes, house prices and response times the median is usually the more honest summary.

Mean, median and mode are all called the average in ordinary speech. The mean uses every value and moves with outliers; the median uses only the middle and does not; the mode is the only one that works on data that is not numeric at all.

Advertisement

In short

What is the difference between mean, median and mode?

The mean adds everything and divides by the count. The median is the middle value once sorted. The mode is the most common. All 3 are called the average, and on skewed data they part company — for 12, 15, 11, 14, 12, 40 they are 17.33, 13 and 12.

When the mean and the median disagree, an outlier is pulling one of them. The median is the one that resists.

How to use the mean, median, mode and range calculator

Three statistics share one word. The mean is what most people picture: add everything up, divide by how many there are. The median is the value in the middle once the list is sorted. The mode is whichever value appears most often. On tidy, symmetric data they land close together, and on real data they frequently do not.

Which one is right depends on the shape of the data rather than on preference. The mean uses every value, which makes it sensitive to extremes — one enormous number drags it upwards regardless of how ordinary the rest are. The median ignores the size of the values and looks only at their order, so an extreme value moves it barely at all.

17.3

Mean of 12, 15, 11, 14, 12, 40

pulled up by the 40

13

Median of the same six

unmoved by it

12

Mode of the same six

the only value that repeats

Advertisement

Those three figures describe one small list, and they are four points apart. The 40 is doing all the work: it lifts the mean well above five of the six values, while the median sits comfortably among them. Reporting the mean alone would suggest a typical value that nothing in the data is near.

This is why incomes and house prices are reported as medians. A handful of very large values would lift a mean far above what most people experience, so the middle value gives a more honest picture of the typical case. Response times and waiting times are usually reported the same way, and for the same reason.

Which average to reach for
Symmetric data, no extremes
mean — it uses all the information
Incomes, prices, response times
median — outliers do not move it
Categories rather than numbers
mode — the only one that works
Reporting to a general audience
give the mean and the median together
Data with a hard floor at zero
expect the mean above the median

The last row is a useful prior. Anything that cannot go below zero but has no ceiling — money, time, counts — tends to be right-skewed, which puts the mean above the median almost as a rule.

Measure how spread out the numbers are

An average says where the middle is and nothing about how tightly the values cluster around it. Standard deviation answers the second half.

Open the standard deviation calculator

Small datasets chosen to separate the four statistics, showing how far apart they travel as skew and repetition are introduced.

DataMeanMedian / modeRange
1, 2, 3, 4, 533 / none4
1, 2, 3, 42.52.5 / none3
2, 2, 3, 4, 943 / 27
12, 15, 11, 14, 12, 4017.3313 / 1229
12, 15, 11, 14, 1212.812 / 124
1, 1, 1, 1, 96201 / 195
5, 5, 5, 5, 555 / 50
1, 2, 2, 3, 3, 42.52.5 / 2 and 33
10, 20, 30, 40, 100022030 / none990
−5, 0, 500 / none10
Median of an even-length list is the mean of the two middle values. No mode is reported where no value repeats. Range is largest minus smallest.

What it means when they disagree

The classic demonstration is a room of ten people whose incomes are ordinary, and then one very wealthy person walks in. The median barely moves, because it only cares about who is in the middle. The mean leaps, because it divides a total that has just changed enormously. Nobody in the room is any richer, and one of the two statistics now says otherwise.

One outlier in six values
The list
12, 15, 11, 14, 12, 40
Sum
104
Mean
104 ÷ 6 = 17.33
Sorted
11, 12, 12, 14, 15, 40
Median
(12 + 14) ÷ 2 = 13
The gap
4.33 — the outlier, showing up

Remove the 40 and the mean drops to 12.8, almost exactly the median of the remaining five. One value in six moved the mean by more than four and the median by half a point, which is the whole difference between the two statistics in one line.

For an even-length list the median is the mean of the two middle values, which is the standard convention in descriptive statistics and is what both NIST and the IUPAC Gold Book specify. It means the median need not be a value that actually appears in the data — 13 does not, in the example above.

The range, and the two numbers it uses

The range is the largest value minus the smallest, so for 12, 15, 11, 14, 12, 40 it is 40 − 11 = 29. It is the quickest measure of spread there is, and the only one that never touches more than two of your numbers. Everything sitting between the two extremes is discarded before the subtraction happens.

That is also its defect. One unusual value sets an entire end of the range by itself, so the figure describes the two most atypical observations rather than the data. Drop the 40 from that list and the range falls from 29 to 4, a seven-fold change caused by one number in six, while the median moves only from 13 to 12.

Two different things are called the range in mathematics and search results mix them freely. In statistics it is largest minus smallest, which is what this page computes. In algebra the range of a function is the set of values that function can produce, paired with its domain — a different question answered by a different method, with no list of numbers to paste anywhere.

The mode, and what to do when nothing repeats

The mode is the most frequent value, and it is the only average that works on data that is not numeric at all — the most common colour, the most common answer, the most common fault code. On numeric data it is often the least useful of the three, because it depends entirely on how the values happen to be rounded.

Do

  • Report the median alongside the mean for anything skewed
  • Use the mode for categories, where mean and median have no meaning
  • Check the count before trusting any of the three
  • Say which average you mean rather than writing "average"

Don't

  • Average a set of averages without weighting them by their counts
  • Report a mean for data with a long tail and call it typical
  • Assume the median is one of the values in the list
  • Treat several tied modes as a single answer

When no value repeats, this page reports no mode. That follows the convention in NIST's Dictionary of Algorithms and Data Structures, and it is a convention rather than a law — some texts read the definition literally and call every value a mode when all frequencies are equal. Saying "the mode is 1, 2, 3, 4 and 5" restates the list rather than summarising it, which is why the other reading is used here.

Advertisement

The formula, worked line by line

Three definitions, and only the first is arithmetic. The median is a sorting operation and the mode is a counting operation, which is why they behave so differently when the data is awkward.

The mean asks what everyone would get if the total were shared equally. The median asks who is in the middle. Those are not the same question.
Why both are worth reporting

Neither is more correct than the other in the abstract. The mistake is reporting one, calling it "the average", and letting the reader assume it answers whichever question they had in mind.

mean = sum of the values ÷ count
median = middle value once sorted
median, even count = mean of the two middle values
mode = the value that occurs most often
range = largest − smallest
One outlier moves the mean and not the medianFive values sit between 11 and 15 and one sits at 40. The median stays at 13 among the cluster while the mean is dragged out to 17.33.ONE VALUE IN SIX, PULLING ONE AVERAGEmedian 13mean 17.3340Five of the six values are below the mean.THE GAPmean17.33median13apart by4.33
One outlier dragging the mean away while the median stays with the cluster.
Why you cannot average two averages
Class A
10 students, mean 60
Class B
30 students, mean 80
Averaging the averages
(60 + 80) ÷ 2 = 70
The real total
600 + 2,400 = 3,000
Over 40 students
3,000 ÷ 40 = 75
Correct combined mean
75, not 70

The two classes are not the same size, so their means do not carry equal weight. Averaging averages is only valid when every group has the same count — which, outside textbook examples, it almost never does.

The median can be a value that is not there

With an even number of observations the median is the midpoint between the two central values, so it may sit between them rather than on one. In the list 11, 12, 12, 14, 15, 40 the median is 13, which appears nowhere in the data. That is expected rather than an error, and it is the standard convention for numeric data.

What each average survives

Behaviour under an extreme value
Adding one very large value
range and mean jump, median barely moves
Doubling every value
all three double
Adding 10 to every value
all three rise by 10
Working with categories
only the mode has meaning
A single value repeated
all three are that value

The first row is the only one where they part company, and it is the row that describes most real data. Everything else in this table is a transformation all three handle identically.

That is the practical summary: for well-behaved data the choice does not matter, and for the data most people actually have, it decides what the answer means.

Advertisement

Questions people ask

What is the difference between mean, median and mode?

The mean is the total divided by the count. The median is the middle value once the list is sorted, or the midpoint of the two middle values when the count is even. The mode is the value that occurs most often. All three are called the average, and on skewed data they can differ substantially.

Covered in depth in How to Compare Two Data Sets: Center, Spread, and Relative Difference

When should I use the median instead of the mean?

Whenever the data has a long tail or a few extreme values — incomes, house prices, response times, invoice sizes. The mean is pulled towards the extremes while the median stays among the bulk of the values. It is no accident that headline figures for household income are published as medians rather than means.

What if no number repeats — is there a mode?

By the convention used here, no. NIST's dictionary states that if no value repeats there is no mode, and reporting every value as a mode would restate the list rather than summarise it. Some texts read the definition literally and take the other view, so it is worth saying which convention a figure came from.

Can a dataset have more than one mode?

Yes. If two or more values tie for the highest frequency, all of them are modes and the data is described as bimodal or multimodal. That is often a real finding rather than a nuisance — two peaks usually mean two different groups have been measured together and might be worth separating.

How do you find the range of a set of numbers?

Subtract the smallest value from the largest. For 12, 15, 11, 14, 12, 40 that is 40 − 11 = 29. Nothing needs sorting or averaging first, and every value between the two extremes is ignored — which is why the range is the quickest measure of spread to compute and the easiest to distort with a single unusual observation.

Is this the same range as domain and range?

No, and the two share only a name. The statistical range on this page is the largest value in a list minus the smallest. The range of a function in algebra is the set of outputs that function can produce, paired with its domain, and there is no list of numbers involved anywhere in finding it.

Can I average a set of averages?

Only if every group has the same number of members. Otherwise you must weight each average by its count, or work from the original totals. A class of 10 averaging 60 and a class of 30 averaging 80 combine to 75, not to 70, because the larger class carries three times the weight.

Sources

Where the constants and formulas on this page come from. Each line names the figure it backs.

  1. Mean, median and mode are the standard measures of location, and the median of an even-sized sample is the average of the two middle values.

    NIST/SEMATECH e-Handbook of Statistical Methods — Measures of LocationNational Institute of Standards and Technology

  2. If no value in a dataset is repeated, the dataset has no mode.

    Dictionary of Algorithms and Data Structures — modeNational Institute of Standards and Technology

  3. The range of a subgroup is converted to an estimate of sigma by dividing by d2, a factor that depends on the subgroup size — which is why ranges from differently sized samples are not directly comparable.

    NIST/SEMATECH e-Handbook — Variables Control ChartsNational Institute of Standards and Technology

  4. The median is less affected by extreme values than the mean, which makes it the more robust summary for skewed distributions.

    NIST/SEMATECH e-Handbook of Statistical Methods — Measures of LocationNational Institute of Standards and Technology