Calculate the median of a number set using the calculator below.
What is the Median?
The median is the middle value of a number set and is a way to express the midpoint of the data. Half of the numbers will be higher than the median, and half will be lower.
The median is a measure of the central tendency of numeric data. Essentially, it’s a way to express the middle or center of a set of numbers.
The median is one of the observations of data used in summary statistics.
How to Find the Median
Before you can find the median of a data set, the data needs to be sorted first. Sort the numbers from lowest to highest. Then, count the numbers in the set.
If the count of the numbers is odd, then find the middle index of the numbers by adding one to the count and then dividing by 2. The result is the index of the median in the dataset.
If the count of the numbers is even, then find the two numbers in the middle by dividing the count by 2 to find the lower-middle index, then adding 1 to find the upper-middle index.
Then, add the numbers at the lower and upper-middle indices and divide the result by 2. The median for an even dataset is actually the mean of the middle two values.
You can find the median for an odd using the following formula:
median = x(n + 1)/2
The median is equal to the number at the index x(n + 1)/2, which is equal to the count of the data n plus 1, divided by 2.
You can find the median for an even using the following formula:
median = (xn/2 + x(n + 1)/2) ÷ 2
The median is equal to the number at the index xn/2 plus the number at index x(n + 1)/2, divided by 2.
Example: Calculate the Median
Calculate the median of the following numbers: [3,7,2,9,5]
Step 1: sort the numbers.
Step 2: count the numbers
count = 5
Step 3: find the middle index
median = x(5 + 1)/2
median = x6/2
median = x3
Step 4: find the number at the index 3
median = 5
The median of the numbers above is 5.
Median vs. Mean
We briefly touched on summary statistics above. Another commonly used metric to describe numeric data is the mean.
The mean is another measurement of the central tendency of a set of data. The mean is the average value of the data rather than the midpoint of the data.
The mean represents the average value of a number set. It is equal to the sum of the data divided by the count of the numbers in the data.
So should you use the median or the mean to describe a set of data?
The median is a good way to find the middle of the data and ignore outlying data points that might skew the average result. It reflects the middle of the typical values of the data.
The mean might be more useful if the average value of the entire set of data is important.
The mean considers each value in the data, so it might be a more accurate way to describe the central tendency of the data, especially if the majority of the data are in an evenly distributed range.
But, it’s important to note that major outliers in the data can skew the mean. Consider the data: [3,4,5,6,91]
The average of this data is 21.8, and the median value is 5.
The median might do a better job of discarding those outliers and reduce the skew since it only considers the midpoint of the data. But, there are some cases when outlier values should be considered, making the mean a better representation of the data.