Around 18 to 20 weeks into the pregnancy, a genital ultrasound can often determine the baby’s gender. However, accuracy depends on factors such as fetal position and the skill of the sonographer.