For each horse in a race the prices on offer by all bookmakers in the sample are ordered into a list from longest to shortest. The list is then divided into two equal halves and the SP is the shortest odds available in the half containing the longest odds.
With standard UK and Irish horse racing when you choose SP then it doesn't matter what the price is when you take the horse, it only matters what price your horse is when the race starts - this is what you will be paid out at.