measure how far your hands are from the saddle in cm
subtract your preffered distance from this number
choose a new stem who's length is shorter than the old one by the same amount
dont know your preffered reach? either go to lbs and get 'fitted' or experiment:
buy a stem much shorter than the current one, ride a bit, too long/short? get another thats shorter/longer, repeat.
to minimize the number of attempts choose new stems who's length splits the difference between the two existing ones that are immediatly longer and shorter, in this manner each attempt cuts the margin by half
lookup 'binary search tree'