Start by arranging the values in increasing order. If the number of observations n is odd, the median is n/2+1 st value. n/2 is integer division (ignore the fraction). If there are 5 observations, the median is 5/2+1 = the third observation. If the number of observations is even, median = [ x(n/2)+x(n/2+1)] /2, the average of the two middle values. If there are 10 observations, 10/2 +(10/2+1), the average of the fifth and the sixth observation. The median is such that 50 % of the cases lie below it and 50 % above.