carefully remove it from the tank maintaining a moist net as not to stress the fish to much.
I like to kinda role the net between my thumb and finger back and forth gently. You must put this next to your ear, if you hear a rattle its 99% male.
Option number two, now the thing is some folks do not like getting their hands wet so above option is not a valid option, no worries...go to your medicine cabinet, and look for any common aspirin, preferably the 81 mg size ( fish are much smaller than human


Of course sometimes its color or fin / body shape that are the tell tale signs but these are just to easy.