

When we calculate the mean, we consider each value of the data. So extreme value affects while calculating the mean.
When we calculate the median, we consider only the middle values of the data. So extreme value does not affect while calculating the mean.
