Mean, Median, Mode, Range Calculator

About this calculator

The Mean, Median, Mode, Range Calculator finds the four classic summary statistics of a data set in one click. Enter your numbers and you get the mean (average), median (middle value), mode (most frequent value) and range (largest minus smallest), plus the geometric mean, the largest and smallest values, the sum, the count, the sorted data and the working behind each answer.

Separate values with commas, spaces or new lines.
Embed this calculator

Paste this code into a Custom HTML block on your site. The calculator fits the width of the block. Adjust the height in the code if you want more room for results.

Find this widget in the publisher directory

Mean

The mean is what most people call the average. Add every value and divide by how many values there are:

mean = (x1 + x2 + … + xn) / n

For the data 10, 2, 38, 23, 38, 23, 21 the sum is 155 and there are 7 values, so the mean is 155 / 7 ≈ 22.143. The mean uses every data point, which makes it a good summary for roughly symmetric data. Its weakness is sensitivity to extreme values: replace the 38s with 380s and the mean jumps to about 120, even though most values are still in the 20s.

Besides the arithmetic mean, the calculator shows the geometric mean, the nth root of the product of the values. It is the appropriate average for growth rates and ratios, and it is only defined when no value is negative.

Median

The median is the middle value after sorting the data from smallest to largest. Half the values are at or below it and half are at or above it.

  • If the count is odd, the median is the single middle value. Sorted, the example data is 2, 10, 21, 23, 23, 38, 38, and the fourth value, 23, is the median.
  • If the count is even, there are two middle values and the median is their average. For 1, 4, 6, 9 the median is (4 + 6) / 2 = 5.

Because it depends only on position, the median barely moves when an extreme value is added. That is why home prices, household incomes and wait times are usually reported as medians.

Mode

The mode is the value that appears most often. A data set can have:

  • One mode: in 3, 5, 5, 8 the mode is 5.
  • Several modes: in the example data both 23 and 38 appear twice, so the data is bimodal.
  • No mode: if every value appears exactly once, no value is more common than another.

The mode is the only one of these measures that also makes sense for non-numeric data, such as the most common shoe size sold or the most popular menu item.

Range

The range is the simplest measure of spread: the largest value minus the smallest. For the example, 38 − 2 = 36. It is quick to compute and easy to explain, but it depends on just two values, so a single outlier can make it misleading. For a more robust picture of spread, look at the standard deviation or the interquartile range.

Worked example from start to finish

MeasureData: 4, 8, 15, 16, 23, 42, 8Result
Sorted4, 8, 8, 15, 16, 23, 42
Mean116 / 716.571
Median4th of 7 sorted values15
Mode8 appears twice8
Range42 − 438

Here the mean sits above the median because the 42 pulls it upward, a sign of right skew.

Which one should you report?

Use the mean for symmetric data without outliers, such as repeated lab measurements. Use the median when the data is skewed or has outliers. Use the mode for the most typical choice or category. Report the range together with a measure of center so readers know how spread out the values are. When in doubt, report more than one: if the mean and median are far apart, that gap itself tells readers the data is lopsided.

Mean, median and mode in a skewed data set

Consider the annual salaries at a small company: five staff earn $42,000, $45,000, $45,000, $48,000 and $51,000, and the owner earns $300,000. The mean salary is $88,500, which describes nobody. The median, $46,500, is close to what a typical employee earns, and the mode, $45,000, is the most common salary. This is why reports on incomes and home prices favor the median: one very large value cannot drag it far. When you summarize your own data, check whether the mean and median tell the same story before choosing which one to headline.

Tips for entering data

Separate values with commas, spaces or line breaks, so a column pasted from a spreadsheet works as is. Decimals and negative numbers are accepted. The geometric mean is not defined when any value is negative and equals zero if any value is zero.

Frequently asked questions

How do you find the median of an even number of values?
Sort the data, take the two middle values and average them. For 3, 7, 9, 12 the median is (7 + 9) / 2 = 8.
Can a data set have more than one mode?
Yes. If two or more values tie for the highest frequency, each is a mode. If no value repeats, there is no mode.
Is the range affected by outliers?
Very much so, because it uses only the largest and smallest values. One unusual value can make the range much larger than the typical spread.
Why is my mean different from my median?
A gap between them usually means the data is skewed. A mean above the median suggests a few high values; a mean below it suggests a few low values.

Formulas and sample results on this page were checked against independent references. Page last reviewed or updated . How we verify calculators. Project led by Shaun Connell.