Puppies are born fully formed, so you can determine a puppy's sex at birth. The easiest time to do this is as you finish drying it, before or after you weigh it. Gently turn the puppy over and examine the lower abdomen. On newborn puppies the penis and vulva can look similar, but they are located in different spots.
Determining a Puppy's Gender
On male puppies the penis is about one-third of the way up the belly, while the vulva of females is near the bottom of the abdomen, between the back legs. Be sure not to confuse either with the umbilical cord, which is about half-way up the abdomen. It is not necessary to wear gloves when handling newborn puppies, but avoid touching the umbilicus until it heals and be sure your hands are clean.
Be aware of the dam's anxiety level; most will tolerate the process without interfering, but if she is overly anxious give her the puppy to clean and dry, and weigh it as soon as she'll let you. If you have trouble determining a newborn puppy's gender, wait a few days. It does get easier as the puppy gets older. Keep checking during the daily weigh-ins. If you still have doubts consult your veterinarian for assistance.