Mean, Median and Mode Calculator

What Are Mean, Median, and Mode?

Statisticians, economists, analysts, and portfolio managers prefer to use one number that measures the middle or center of data. In statistics, the mean, median, and mode are all measures of central tendency—the latter indicating where the data is centered. The mean, median, and mode are perhaps the most widely used statistical measures because they can be applied and computed easily. Having a handy Mean, Median, and Mode Calculator will streamline your work.

What Is the Mean?

The most important measure of central tendency includes the arithmetic mean (or simple average) denoted by the Greek letter µ for a population and

x¯
for a sample. The difference is derived from the data we use when calculating the measure. The population mean considers all data points of a given distribution . At the same time, the sample mean reflects only a limited number of observations drawn from the population data.

Calculating the Mean (Formula)

The equations for calculating the population and sample means are virtually the same, with a slight change in notation:

μ=i=1NXiN

X¯=i=1nXin

If the formula seems intimidating, you can always use the mean calculator. But it’s actually very simple when we break it down into its components.

Here, n denotes the number of observations in the sample, whereas N is the number of observations in the entire population.

We can find the mean of a data set by adding up all its components and then dividing the sum by the number of observations. For example, given the dataset 5, 2, 42, 12, 17, 23, 19, applying the formula for sample mean yields the following:

X¯=i=1nXin=5+2+42+12+17+23+197=17.14

Steps for Calculating the Mean

There are three steps for calculating the mean:

  1. Add up all the values in the dataset.
  2. Count the number of observations.
  3. Divide the sum by the number of observations.

The result is the mean of the dataset.

Advantages and Disadvantages of the Mean

The main advantage of the arithmetic mean is that it is simple to understand and easy to calculate. Moreover—compared to the other two measures of central tendency (median and mode)—the mean considers all available information about the size and magnitude of the observations.

The mean is the most common measure of central tendency, but it has a notable downside—it’s easily affected by outliers. Since the measure uses all data points in a sample, it can be pulled upward or downward by abnormally large or small values. For example, suppose we estimate the mean of the following eight numbers: 1, 2, 3, 4, 5, 6, 8, and 500. By substituting the know variables, we obtain the following:

X¯=i=1nXin=1+2+3+4+5+6+7+5008=66

The mean’s magnitude is considerably larger than the rest of the observations. Therefore, it is questionable how well it represents the center of data.

What Is the Median?

The median (50th Percentile) is another important measure of central tendency, representing the middle number in a data set sorted in ascending or descending order.

Middle number in an even input.

Calculating the Median (Formula)

Finding the median depends on whether the number of observations (n) is even or odd. In an odd-numbered sample, the median is simply the middle value in an ordered data set and occupies (n + 1)/2 position:

If n is odd: Median (x) = x(n+1)/2

For example, let’s find the median for the following five numbers: 3, 5, 7, 8, and 9. The number of observations is odd and equals 5 (n=5). Therefore, the median occupies the (n + 1)/2 = 6/2 =3rd position and equals 7. The latter represents the middle number—two observations lie above this number and two below.

Median number when input is odd.

There's no distinct middle number when the data sample is even numbered. As a result, we define the median as the arithmetic average of the two middle values (in an ordered data set) that occupy the n/2 and (n + 2)/2 positions:

If n is even: Median (x) = x(n/2)+x((n+2)/2)2

For example, let’s calculate the median of the following data set: 3, 5, 7, 8, 9 and 12. Because this sample contains 8 observations, the median is the mean of the sorted that occupy the 6/2 = 3rd and (6+2)/2 = 4th positions. These correspond to 7 and 8, respectively. The median—as the mean of these two values—equals 7.5 or (7 + 8)/2.

Median numbers when input is even.

Regardless of whether the total number of values in a data sample is odd or even, an equal number of observations lie above and below the median. In addition, a data sample can only have one median.

Steps for Calculating the Median

This measure of central tendency is slightly more difficult to find than the other two. We break it down into simple steps to help you calculate it. And you can use the Mean, Median, and Mode Calculator to verify the obtained result.

There are two steps for calculating the median:

  1. Sort the values into ascending or descending order.
  2. Determine the number of observations (n)
    • If the sample size is odd, the median is the middle value and occupies (n + 1)/2 position.
    • If the sample size is even, the median is the average of the two middle values that occupy the n/2 and (n + 2)/2 positions.

Advantages and Disadvantages of the Median

The main advantage of the median is that—unlike the mean—it’s not skewed by extremely large or small values because the median is based on the relative positions of the data points. This makes the measure helpful when examining skewed distributions—e.g., when calculating the ordinary income in a country because it’s not affected by a small number of extremely high or low-income outlier households.

Let’s look at another example. Suppose we estimate the median of these seven numbers: 2, 3, 4, 5, 6, 7, and 1,000. The number of observations is odd and equals 7 (n=7). Therefore, the median occupies the (n + 1)/2 = 8/2 =4th position and equals 5. Note that in this particular data set, the presence of an outlier (1,000) does not affect the median. Even if the eight observations were 10, the result would be unchanged. But if we compute the arithmetic mean, the result would be 146.7.

X¯=i=1nXin=2+3+4+5+6+7+1007=146.7

Clearly, this value does not provide a good representation of the other six observations in the data set.

But the median also has its disadvantages. One is that the measure does not consider all available information about the size and magnitude of the observations and focuses only on their relative position. For example, the median of 20, 50, 100, 120, and 130 is 100. We can replace observations 20 and 50 with any values smaller than 100 and observations 120 and 130 with any two values greater than 100 without affecting the median value. (The median is insensitive to any values around the middle observation.)

Obtaining the median is also more computationally complex. First, we need to sort the numbers in ascending or descending order, determine whether the sample size is odd or even, and apply one of two calculations. Using a median calculator eliminates this issue.

What Is the Mode?

The mode is the third important measure of central tendency—the value that occurs most often in a distribution. For example, the mode in the following data set [1, 4, 9, 5, 5, 5, 9, 3] is 5 because it occurs most often. Such a distribution is unimodal because it has one value that occurs most often.

A distribution can have more than one mode or even no mode. For example, the mode in [2, 2, 3, 5, 5] equals 2 and 5 since both values appear twice each. In such a case, the dataset is bimodal because it has two modes.

Generally, a data set with more than two modes is multimodal. Now let’s examine the following dataset [1,2,3,4,5]. All the values in the data set are different, so no mode is available. In such cases, the mean or median are better alternatives.

Calculating the Mode

In large datasets, using a calculator to find the mode will save you valuable time. But this is the easiest measure of central tendency to find manually—simply detect the most frequent value in a set.

Sometimes when we explore continuous distributions [0.852…,0.862…,0.872….], we may not have a modal outcome since there are no two values that will be precisely the same. A common practice in such cases is to group data into intervals and explore which has the highest frequency—a practice in statistics known as finding the modal interval.

Steps for Calculating the Mode

There are three steps for calculating the mode:

  1. Place all numbers into ascending or descending order
  2. Count how many times each value appears in the set
  3. Check the one that appears the most. (This number is the mode.)

Advantages and Disadvantages of the Mode

The main advantage of the mode is that it’s not affected by extremely large or small values. Another advantage is that the measure is easy to understand and calculate. Moreover—unlike the mean and median—it can be used for both quantitative and qualitative data.

But the measure also has disadvantages. As mentioned previously, there are cases when it’s undefined because there are no repeats in the distribution. In addition, the mode is not based on all the values in the dataset.

Comparison of Mean, Median, and Mode

Why Is Skewness Important?

Skewness tells us where the data is situated.

The mean, median and mode should be used together to understand the dataset better. Measures of asymmetry, like skewness , are the link between central tendency measures and probability theory, which ultimately allows us to understand the data we’re working with.

When Will the Mean, Median, and Mode Be Equal?

The mean, median, and mode are equal when the distribution is perfectly symmetrical and non-skewed. As the distribution becomes more skewed, the difference between the three measures different becomes larger.

Median numbers when input is even.

When we have right-skewed distribution, the mean is larger than the median, and the mode is the value with the highest visual representation.

Positively Skewed graph. Negative Skewed graph.

In a negatively skewed frequency distribution, the mean is lower than the median, and once again, the mode defines the highest point. Such a distribution is also called left skewed because the outliers are to the left.

Which Measure of Central Tendency is the Best?

The answer is simple. There is no best, but using only one is the worst option. In other words, the three main measures are best used in combination with each other because they have complementary strengths and weaknesses.

The Mean, Median, and Mode Calculator generates all three measures of central tendency simultaneously, streamlining your work.

How to Find the Mean, Median, and Mode of a Dataset: Example

What is the mean, median mode of 1, 2, 3, 4, 5?

We calculate the mean by adding up all values in the dataset and dividing them by the number of observations.

X¯=i=1nXin=1+2+3+4+55=3

Based on this, we find that the mean of the dataset is 3.

To obtain the median, we organize the data set in ascending order, then find the middle value that separates the dataset in half. Here, we skip the first step since the values are consecutive. In our case, the median equals 3 and occupies the (n+1)/2 position (or the third position in the dataset).

Result's position in the dataset.

The mode is the value that appears most frequently in a set of values. In this case, there is no mode because all values appear only once in the dataset.

What are the measures of central tendency?

Measures of central tendency show us the middle of the data’s distribution. In other words, they provide information about the central or typical value in a dataset. These measures are widely used because they are easy to compute and return a quick summary of the data.

There are several measures of central tendency, but the most common ones are the mean, median, and mode. Let’s take a look at the definitions:

  • The arithmetic mean is equal to the sum of all values divided by the number of observations. It’s the most used measure of central tendency, appropriate to use on normally distributed data or data without extreme values.
  • The median is the middle value in a dataset sorted into ascending or descending order. If there is an even number of observations, we take the average of the two middle values. The median is useful when the data is skewed or contains outliers.
  • The mode is the most frequently occurring value in a dataset. It’s the only measure of central tendency that can be used with nominal data.

How to calculate the measures of central tendency in Excel?

We calculate the measures of central tendency in Excel using its built-in functions AVERAGE, MEDIAN, and MODE.SNGL.

Let’s observe an example with the following dataset:

Dataset image.

In Excel, type AVERAGE, then select the data contained in the cell range (C5:C14):

Dataset in Excell with average in cell range (C5:C14).

By running the formula, we see that the arithmetic mean is equal to 38.80:

Arithmetic mean is equal to 38.80.

Obtaining the median is also straightforward: simply use the MEDIAN function on the same cell range (C5:C14):

Dataset in Excell with median in cell range (C5:C14).

And here, we see that the median is 0.11:

Median is equal to 0.11.

The last step is to obtain the mode of the dataset. To do that, we will use MODE.SNGL. Type the function and select the same range as before:

Using MODE.SNGL to find the mode.

This gives us exactly 23:

Mode is equal to 23.

Whichever calculation method you chose, make sure you double-check your result using the Mean, Median, Mode Calculator above.