Average (mean ) and Median are mathematical terms which are related to statistics.This mathematical terms are usually calculated on the set of numbers. Average actually calculates the midpoint of the set of numbers. It is greatly affected by how bigger and how smaller the number is in the set. The median comes into the picture as because it calculates the middle number in the set.
Average (Mean):
An average is actually the most common method used to determine the midpoint of the set of numbers. An average is calculated by simply adding all the numbers in the group and then dividing the summation of a number by number of terms in the set. The average of the set of numbers is simply addition of the number divided by the number of terms.
For example: Let the set of numbers be 6, 8, 10, 12, 14. The summation (addition of all the terms) of all the numbers is 54. The total number of terms is 6. So, when 54 is divided by 6 it gives quotient as 9. 9 is the average of set of numbers.
Now, average cannot always draw the middle term of the set of values.Average is greatly affected by how larger or how smaller the numbers are there in the group. Therefore, median is calculated for the set of values.
Median
The median is the exact middle term in the set of values. For calculating the middle term the set of values are arranged in ascending order then the number in center of the distribution is calculated. In case of an odd number of terms, middle term can be easily calculated.In case of even number of terms, there are two middle terms.So the middle term is calculated by calculating the mean of the two middle terms.
Example:
Let us take two examples, one of odd number of terms and other of even number of terms .
 Set of values 5 , 3, 6, 6, 3, 5, 7, 8, 4 . So, first of all, we have to arrange the terms in ascending order which is as follows 3, 3, 4, 5, 5, 6, 6, 7, 8. So the total number of terms in the series is 9. The middle term will be the number located at the 5th starting from the left.
 Set of values 5 , 3, 6, 6, 3, 5, 7, 8, 4 , 20. . So, first of all, we have to arrange the terms in ascending order which is as follows 3, 3, 4, 5, 5, 6, 6, 7, 8, 20. So the total number of terms in the series is 10. The middle terms will be the number located at the 5th and 6^{th} starting from the left. The median will be the average of the two middle terms.
Tabular difference
Sr no.

AVERAGE 
MEDIAN 
1

The average is the arithmetic mean of the set of numbers  The median is described as the numeric value which is at the center of the distribution in the set of numbers. 
2

Average of the set of number cannot be the middle term.  Median of the set of number will be the middle term in case of the odd number of term. 
3

While calculating the average, it is not necessary to arrange the number in ascending order.  While calculating the median, it is necessary to arrange the number in ascending order. 
4

Mean is not a robust statistic tool as it gets unduly impacted by the values in the range of numbers.  There is no mathematical formula to calculate median. It is generally suitable for skewed distribution. 
For Example :
If in IBM Bangalore, 10 people are working each person is getting different salaries every month.Salaries of 10 people are 3 lpa, 4 lpa, 3 lpa, 7 lpa, 5 lpa, 6 lpa,5 lpa, 4 lpa,7 lpa,10 lpa. (lpa Lakhs per annum)
Then median salary of the 10 people is 5 lpa. As when the series is arranged in ascending order.5 lpa is the middle most term.
Average salary of the group is 5.4 lpa. It is the sum of salaries of the employees divided by 10(That is the number of employees)