Formula: Mean & Median Mathematical Identity
- value1: Value1 (numeric parameter)
- value2: Value2 (numeric parameter)
- value3: Value3 (numeric parameter)
- value4: Value4 (numeric parameter)
- value5: Value5 (numeric parameter)
Compare arithmetic, geometric, and harmonic means alongside median and range.
The Mode line only appears when exactly one value occurs more often than the others. If every value appears once, as in the default 10, 20, 30, 40 and 80, the sentence under the result says there is no mode. If two values tie, such as 10 and 40 each appearing twice, the sentence names both instead of showing a single line.
Not here. The calculator always takes exactly five values, so the median is always the third value after sorting. For an even-sized list, sort it yourself and average the two middle values. Entering four real values plus a made-up fifth would change the median, so avoid padding the list to make it fit.
The calculator fills that box with its default value instead of dropping it. Clearing the first box, for instance, quietly uses 10, so you still see a mean of 36 with the other defaults. Always fill all five boxes with your own numbers, or the result will silently include a value that is not in your data.
At least one of your five values is zero or negative. Both of these averages are only defined for positive numbers, so the calculator leaves them out and adds a note explaining why. The arithmetic mean, median, midrange and range are still valid. If you are averaging returns, convert them to growth factors such as 1.05 or 0.9 so that every entry is positive.
For marks that are fairly balanced, the arithmetic mean is standard and easy to explain. If one or two very high or very low marks pull the mean well away from the median, report the median as well, or instead. The geometric and harmonic means are rarely appropriate for marks because marks do not multiply or act as rates.
No. The values are sorted from smallest to largest before any calculation, so 40, 10, 80, 30, 20 returns exactly the same mean of 36, median of 30 and range of 70 as the default order. The mode, midrange and range do not depend on order either, since they only look at counts and extremes.
For any set of positive numbers, the harmonic mean is less than or equal to the geometric mean, which is less than or equal to the arithmetic mean. They are all equal only when every value is identical. The harmonic mean weights small values most heavily, which is why it reacts so strongly when the smallest entry changes from 6 to 15.
The interpretation line rounds each average to three decimals, as in 28.619 and 22.642 for the default data. Whole-number results such as the mean of 36 show no decimals. For most uses three decimals is far more precision than the original data justify, so round again to match the precision of the values you typed in.
No. Every one of the five values counts equally. If your values come with different weights, such as course credits or quantities sold, you need to multiply each value by its weight, add them up and divide by the total weight. Repeating a value in several boxes is a rough workaround only when the weights happen to be small whole numbers.
The midrange adds the smallest and largest values and halves the total, so the default data give 45. The median is the middle value after sorting, 30 here. Because the midrange uses only the two extremes, one outlier moves it a lot, while the median ignores how big the extremes are. A wide gap between the two is a quick sign of skew.
Sometimes. A large gap usually means one value is far from the others. That may be real, like a single expensive purchase, or a typing slip such as an extra zero. Check the largest and smallest entries first. If they are genuine, the gap is telling you the data are skewed, and the median is the safer summary.
The loaded dataset is 10, 20, 30, 40 and 80. The calculator sorts the five values, then reports an arithmetic mean of 36, a median of 30, a geometric mean of 28.619, a harmonic mean of 22.642, a midrange of 45 and a range of 70. The sentence under the result adds that there is no mode, because every value appears once.
Those four averages are all different, and the spread between them is the point of the page. Each one answers a slightly different question about what a typical value is. On a dataset with no outliers and little spread they would sit close together. Here the lone 80 pulls them apart.
The arithmetic mean is the familiar one: add the five values together and divide the total by 5. The median ignores the sizes and just takes the middle value after sorting, which is 30. The geometric mean multiplies the values and takes the fifth root. The harmonic mean divides 5 by the sum of the reciprocals. The interpretation line notes that the harmonic is the smallest, then the geometric, then the arithmetic, and that ordering holds for any set of positive numbers.
A mean of 36 against a median of 30 tells you the data lean to the right. One large value, the 80, adds a lot to the total and drags the mean upward, while the median only cares that 80 is the biggest value, not how big it is.
You can see this by editing the fifth value. Change 80 to 35 and the sorted list becomes 10, 20, 30, 35, 40. The median stays at 30, but the mean drops to 27, now below the median, because the remaining values are bunched toward the bottom. The range shrinks from 70 to 30.
This is the practical reason to look at both. If the mean and median are close, the data are roughly balanced and either is a fair summary. If they are far apart, a few values are doing a lot of work. For things like salaries or house prices, where a handful of large values are common, the median is usually the fairer picture of a typical case.
The mode is the value that appears most often, and the calculator handles three cases differently. It shows a Mode line only when exactly one value repeats more than the rest. When nothing repeats, or when two values tie for most frequent, there is no Mode line and the sentence under the result explains why.
In the default dataset every value is different, so the sentence reads no mode. That is a perfectly valid answer and better than forcing one. Change the first value from 10 to 20 and the list becomes 20, 20, 30, 40, 80. A Mode line of 20 now appears, alongside a mean of 38, a median of 30, a geometric mean of 32.875 and a midrange of 50.
Ties give more than one mode. The list 10, 10, 30, 40, 40 has 10 and 40 each appearing twice, and the sentence reports mode 10 and 40 rather than picking one. The mean comes out at 26 and the median at 30, yet neither is near the values that actually repeat. When the modes and the median disagree like that, the data may be two groups mixed together, and a single average of any kind will hide it.
The mode matters most for categories and counts, such as the most common shoe size or the most frequent number of visits. For measurements with decimals, exact repeats are rare and the mode is seldom useful.
The three means react very differently when the smallest value changes. Compare three versions of the dataset where only the first value moves.
With the first value at 6, the arithmetic mean is 35.2, the geometric mean 25.84 and the harmonic mean 17.391. At the default 10 they are 36, 28.619 and 22.642. With 15 they are 37, 31.037 and 26.667. The median stays at 30 throughout, because the first value never becomes the middle one.
Moving that one value from 6 to 15 lifts the arithmetic mean by less than 2, the geometric mean by about 5, and the harmonic mean by more than 9. The harmonic mean is dominated by small values, because it works through reciprocals, and the reciprocal of a small number is large. The geometric mean sits in between.
That sensitivity tells you when each one is appropriate. If a small value genuinely matters more, as with the slowest leg of a journey or the lowest rate in a set of rates, the harmonic mean captures it. If you want a summary that a single small value cannot wreck, the median is the safer choice.
The geometric mean is the right average for things that multiply together, such as yearly growth. Enter each year as a growth factor rather than a percentage. A year of plus 10 % is 1.1, a year of minus 10 % is 0.9, and so on.
For five years of 1.1, 0.9, 1.2, 1.05 and 1, the calculator gives an arithmetic mean of 1.05 and a geometric mean of 1.045. The arithmetic figure suggests 5 % a year. The geometric one shows the real compound rate was about 4.5 %. Over many years that gap adds up, and quoting the arithmetic mean of returns overstates what an investor actually earned.
Typing the percentages themselves, such as 10, minus 10 and 20, gives a wrong answer. Any zero or negative value removes the geometric and harmonic means from the result, so a single losing year entered as a negative number makes both lines disappear.
The harmonic mean is the right average for rates over equal amounts of something, most often speed over equal distances. Five equal-length legs driven at 60, 40, 60, 40 and 60 give an arithmetic mean of 52 but a harmonic mean of 50. The true average speed for the whole trip is 50, because the slower legs take longer and so count for more of the time.
The geometric and harmonic means are only defined here for positive numbers. If any of the five values is zero or negative, the calculator drops both lines and says so in the sentence under the result.
Set the first value to 0 and the arithmetic mean becomes 34, the median stays at 30, the midrange is 40 and the range becomes 80, with a note that geometric and harmonic means need every value above zero. Set it to minus 10 and the mean is 32, the midrange 35 and the range 90, with the same note. That is the honest outcome. A geometric mean of a list containing zero would always be zero, and a harmonic mean would need to divide by zero.
So expect those two lines to vanish whenever your data include zero, such as days with no sales, or negatives, such as temperature changes. The arithmetic mean, median, mode, midrange and range remain correct for any real numbers. If you need a geometric average of returns that include losses, convert them to growth factors first, as above, so every entry is positive.
The calculator always works on five values. There is no way to add a sixth or remove one, so it cannot handle a list of four or of twenty.
A blank box is not ignored. If you clear a field, the calculator puts that field's default back in its place, so clearing the first box treats it as 10 and gives the default result of 36 again. That is easy to miss and can quietly mix a made-up number into your data. Fill all five boxes every time.
Because the count is always odd, the median is always the third value after sorting. You never get the even-count case where the median is the average of the two middle values. Order does not matter either: typing 40, 10, 80, 30, 20 gives exactly the same results as the default, because the values are sorted before anything is calculated.
The Midrange line is simply the smallest plus the largest, halved. For the default data that is 10 plus 80 divided by 2, which is 45, well above both the mean and the median because it depends only on the two extremes. Move the first value to 6 and it falls to 43. Move it to 15 and it rises to 47.5.
The range is the largest value minus the smallest, 70 in the default case. It is the simplest measure of spread and the most fragile, since it depends entirely on the two extreme values.
When every value is the same, for example five 5s, all four averages are 5 and the range is 0. That is the one case where every average agrees. As soon as the values spread out, the averages separate, and the range gives a rough sense of how far apart they are likely to drift.
On its own the range says nothing about how the middle values are arranged. Two datasets can share a range of 70 and look completely different inside it. For a fuller picture of spread, especially with more than five values, a standard deviation is more informative, and the related statistics calculator works it out.