# Mean, median and mode in Excel

When analyzing numerical data, you may often be looking for some way to get the "typical" value. For this purpose, you can use the so-called measures of central tendency that represent a single value identifying the central position within a data set or, more technically, the middle or center in a statistical distribution. Sometimes, they are also classified as summary statistics.

The three main measures of central tendency are Mean, Median and Mode. They all are valid measures of central location, but each gives a different indication of a typical value, and under different circumstances some measures are more appropriate to use than others.

## How to calculate mean in Excel

Arithmetic mean, also referred to as average, is probably the measure you are most familiar with. The mean is calculated by adding up a group of numbers and then dividing the sum by the count of those numbers.

For example, to calculate the mean of numbers {1, 2, 2, 3, 4, 6}, you add them up, and then divide the sum by 6, which yields 3: (1+2+2+3+4+6)/6=3.

In Microsoft Excel, the mean can be calculated by using one of the following functions:

• AVERAGE- returns an average of numbers.
• AVERAGEA - returns an average of cells with any data (numbers, Boolean and text values).
• AVERAGEIF - finds an average of numbers based on a single criterion.
• AVERAGEIFS - finds an average of numbers based on multiple criteria.

For the in-depth tutorials, please follow the above links. To get a conceptual idea of how these functions work, consider the following example.

In a sales report (please see the screenshot below), supposing you want to get the average of values in cells C2:C8. For this, use this simple formula:

`=AVERAGE(C2:C8)`

To get the average of only "Banana" sales, use an AVERAGEIF formula:

`=AVERAGEIF(A2:A8, "Banana", C2:C8)`

To calculate the mean based on 2 conditions, say, the average of "Banana" sales with the status "Delivered", use AVERAGEIFS:

`=AVERAGEIFS(C2:C8,A2:A8, "Banana", B2:B8, "Delivered")`

You can also enter your conditions in separate cells, and reference those cells in your formulas, like this:

## How to find median in Excel

Median is the middle value in a group of numbers, which are arranged in ascending or descending order, i.e. half the numbers are greater than the median and half the numbers are less than the median. For example, the median of the data set {1, 2, 2, 3, 4, 6, 9} is 3.

This works fine when there are an odd number of values in the group. But what if you have an even number of values? In this case, the median is the arithmetic mean (average) of the two middle values. For example, the median of {1, 2, 2, 3, 4, 6} is 2.5. To calculate it, you take the 3rd and 4th values in the data set and average them to get a median of 2.5.

In Microsoft Excel, a median is calculated by using the MEDIAN function. For example, to get the median of all amounts in our sales report, use this formula:

`=MEDIAN(C2:C8)`

To make the example more illustrative, I've sorted the numbers in column C in ascending order (though it is not actually required for the Excel Median formula to work):

In contrast to average, Microsoft Excel does not provide any special function to calculate median with one or more conditions. However, you can "emulate" the functionality of MEDIANIF and MEDIANIFS by using a combination of two or more functions like shown in these examples:

## How to calculate mode in Excel

Mode is the most frequently occurring value in the dataset. While the mean and median require some calculations, a mode value can be found simply by counting the number of times each value occurs.

For example, the mode of the set of values {1, 2, 2, 3, 4, 6} is 2. In Microsoft Excel, you can calculate a mode by using the function of the same name, the MODE function. For our sample data set, the formula goes as follows:

`=MODE(C2:C8)`

In situations when there are two or more modes in your data set, the Excel MODE function will return the lowest mode.

## Mean vs. median: which is better?

Generally, there is no "best" measure of central tendency. Which measure to use mostly depends on the type of data you are working with as well as your understanding of the "typical value" you are attempting to estimate.

For a symmetrical distribution (in which values occur at regular frequencies), the mean, median and mode are the same. For a skewed distribution (where there are a small number of extremely high or low values), the three measures of central tendency may be different.

Since the mean is greatly affected by skewed data and outliers (non-typical values that are significantly different from the rest of the data), median is the preferred measure of central tendency for an asymmetrical distribution.

For instance, it is generally accepted that the median is better than the mean for calculating a typical salary. Why? The best way to understand this would be from an example. Please have a look at a few sample salaries for common jobs:

• Electrician - \$20/hour
• Nurse - \$26/hour
• Police officer - \$47/hour
• Sales manager - \$54/hour
• Manufacturing engineer - \$63/hour

Now, let's calculate the average (mean): add up the above numbers and divide by 5: (20+26+47+54+63)/5=42. So, the average wage is \$42/hour. The median wage is \$47/hour, and it is the police officer who earns it (1/2 wages are lower, and 1/2 are higher). Well, in this particular case the mean and median give similar numbers.

But let's see what happens if we extend the list of wages by including a celebrity who earns, say, about \$30 million/year, which is roughly \$14,500/hour. Now, the average wage becomes \$2,451.67/hour, a wage that no one earns! By contrast, the median is not significantly changed by this one outlier, it is \$50.50/hour.

Agree, the median gives a better idea of what people typically earn because it is not so strongly affected by abnormal salaries.

This is how you calculate mean, median and mode in Excel. I thank you for reading and hope to see you on our blog next week!

## You may also be interested in

Category: Excel Tips

### 24 responses to "Mean, median and mode in Excel"

1. Imran Masud says:

Svetlana, lot of thanks.

• You are welcome, Imran :)

• Howard says:

Hi How do I calculate the next due service date for the truck which uses hours for its operations.using Excel Formular for example
The last service was done :
Last service date :26.05.2015
Service interval :250hrs/month
Minimum hrs:9.5hrs/day
Next service due date :?
How do I calculate using Excel Formular... Due

2. jshekar says:

i want above formula only 54.88

• Hi Jshekar,

You can display fewer decimal places by clicking the Decrease Decimal icon on the ribbon (Home tab > Number group) or setting up the custom number format to show only 2 decimal places.

Alternatively, you can use the ROUND function:

=ROUND(5487564/100000,2)

3. Lar says:

Could subtotal work with countif function ??

I want the formula auto update when I filtered the category,

Regard,

• Hi Lar,

You can use either:

- Subtotal feature with the Count function, or

- SUBTOTAL function with 103 function number (function_num).

Either way, you will get only visible rows counted.

hello dear,

just I wanna want if we can use the mode and median for text?

5. Manab says:

How to find median from group data with the help of excel2016

• Doug says:

Manab:
Where the numbers are in cells E64 through E70
=MEDIAN(E64:E70) put this in an empty cell of your choice.

6. Kingie says:

ms excel formula for the mode of values in cells c6:c12, devide by the mean of values in cells l4:k6 and 100, result is then raised to the power of 3

7. Gibs Jeremiah says:

Hello, my name is Gibs Jeremiah. Could you please provide me a example of this question. What is an MS EXCEL formula when mode of the values in cell C6:C12, divided by the mean of values in cells L4:K6 and 100. The result is then raised to the power of 3.
Your inputs would be much appreciated.

• Hi Gibs,
Here's the formula as per your conditions:
=(MODE(C6:C12)/AVERAGE(K4:L6)/100)^3

8. Gibs Jeremiah says:

Next question, what is the MS EXCEL formula to find the principal, given the annual interest rate in cell G5, the year of investment in cell G6 and the final value in G8. The interest here is compounded every 3 months.
Your inputs would be much appreciated.

9. Gibs Jeremiah says:

Question 3
What is the MS EXCEL formula when, given the Variance in cell d1, find the standard deviation raised to the power of the number of values in cell A3:A5

10. Gibs Jeremiah says:

Question 4,
What is an MS EXCEL when the fifth root of the in the F3 subtracted from the median of the median of the median of the scores in cells 4?6.
J2:K3

Hi there
I would like to know how to find the mode using the frequency distribution table using Excel. The frequency table has numerical scores in first column and the frequencies in the second column.
Thanking you

12. Matt says:

I noticed when trying to calculate mode in one of my spreadsheets that after inputting new data points the mode value wasn't updating. Upon further investigation I realize that Excel is limited to 255 datapoints whereas I am trying to utilize over 1000. What alternatives or workarounds are there to this limitation?

13. Elena Teh says:

Thank you so much.
God bless.
Ellen

14. Tutor Joseph says:

Thanks a lot for this amazing and concise microsoft excel tutorial on mean median and mode. I am an Excel data analyst, but I must confess that I learnt something new from this article. Am the CEO of microsofttut blog.

15. stan says:

How do calculate the mean if my data is given in decimals, using excel ?

• Hi,
When calculating the average, it doesn't matter what numbers you have

16. Andrew says:

Is it possible to calculate mean, mode, median for grouped data in excel. if yes which formulas are applicable for each of the categories provided