Separating the Sexes
When baby rats are a mere five weeks old, they are ready to reproduce; therefore, males should be separated from the litter as soon as they are weaned from the mother (at about five weeks of age), and should be kept separated from the females at all times. This will prevent the accidental pregnancies, which occur at an alarming rate in pet shops. Many of these young rats are far too young and underdeveloped to healthily support an unborn litter, as they are not yet full-grown themselves. Likewise, the mother is far too weak to support an unborn litter so soon after weaning the previous litter, should one of her sons get her pregnant. Separating a litter by gender after weaning is in the best interest of the health of these young rats and their mother.
Once rats reach 3 weeks of age, it should be pretty obvious which are male and which are female though it can be determined sooner with experience. In males the testicles will be visible though they can pull them inside at will, especially when nervous or frightened. Females should have visible nipples on their bellies. The best thing to do is compare a few until you find two that are different, and then it will be easy to tell who is what.