To sex a cat, look under its tail. Most cats lift their tails if scratched gently on the back at the base of the tail. A male cat has a much greater distance between the anus and the urinary tract opening than a female cat.
On a female kitten, the urinary tract opening and anus are right next to each other. On an adult female cat, they are less than one-half inch apart and resemble an upside-down exclamation point. A male kitten has at least one-half inch between the anus and the urinary tract opening, and an adult male cat has well over an inch separating the two orifices.
An unneutered adult male cat also has prominent testicles between the anus and the urinary tract opening.