There are four main differences between male and female gerbils. Adult males are significantly larger, although this is not a precise method of sexing because gerbil size can depend on a number of other factors. Adult males have a large bulge at the base of the tail which is their scrotum. This is totally absent from females. This bulge is obvious by 6 weeks of age and can be seen at least two weeks earlier.
Female gerbils have more obvious nipples.
Finally and most importantly, the distance between the urinary and anal openings in female gerbils is much smaller than it is in males. This method can be used reliably from at least three weeks of age. The first thing to do is to put your gerbil on your left hand or a stable surface. Then, gently take your gerbil by the base of the tail with the first finger and thumb of your right hand. Lift the rear of your gerbil of the ground with your right hand.