What is the median of 18 18 24 and 36?

As there is an even number of them, the median is the mean average of the middle two, namely (18+24)/2 = 21.