# Calculate mean and median

Enter the values, separated by spaces or line breaks, to calculate the mean and median.

## Mean

The mean is the average value and is calculated by dividing the sum of all the values by the number of values. It is sometimes called the arithmetic mean to distinguish it from other types of means such as the geometric mean.

Example:
Calculate the mean of 5, 2, 18, 3 and 7.

The first step is to calculate the sum of all the values.

5 + 2 + 18 + 3 + 7 = 35

The sum is then divided by the number of values to get the mean.

35
5
= 7

We can now conclude that the mean is 7.

## Median

The median is a value that splits the values into two halves such that the number of values greater than the median is equal to the number of values less than the median. One way to find the median is to sort all the values. For an odd number of values the median is the middle value. If the number of values are even the median is instead calculated as the mean of the two middle values.

Example:
Calculate the median of 8, 3, 1, 2, 9 and 1.

The first step is to sort the values.

1 1 23 8 9

The two middle values are 2 and 3. The mean of these two values is the median.

2 + 3
2
=
5
2
= 2.5

We have now found that the median is 2.5.