First, put all the numbers in order. That would be...
23, 23, 27, 29, 29, 31.
Then, find the middle number.
Here, there are two in the middl: 27 and 29. So we need to find the average of the two numbers.
27 + 29 = 56.
56 divided by 2 = 28.
The average of the two numbers and, consequently the median, is 28.
Hope it helps! :)