The sample median is in the middle of the data: at least half the observations are less than or equal to it, and at least half are greater than or equal to it.
Suppose you have a column that contains N values. To calculate the median, first order your data values from smallest to largest. If N is odd, the sample median is the value in the middle. If N is even, the sample median is the average of the two middle values.
For example, when N = 5 and you have data x1, x2, x3, x4, and x5, the median = x3.
When N = 6 and you have ordered data x1, x2, x3, x4, x5,and x6:
where x3 and x4 are the third and fourth observations.