Final answer:
The sex of a baby is determined at conception, but the genitalia development occurs during the fetal period. By weeks 9 to 12, the external genitals are distinct enough to confirm the sex of the fetus with an ultrasound.
Step-by-step explanation:
The sex of a baby is determined at conception when an egg is fertilized by a sperm cell, though the external genitalia are not well defined at this point. The genitalia begin to develop from the same tissues in both male and female fetuses. The stages of development indicate that by the fetal stage, which begins around 9 weeks of gestation, the fetus shows recognizable human traits. It is during weeks 9 to 12 that sexual differentiation occurs and the external genitalia become distinct enough to identify the biological sex via ultrasound, with increasing accuracy thereafter.
The fetal development period is a crucial time for the growth and differentiation of the fetus's organs, including the reproductive system, which continues to differentiate and become more defined as the pregnancy progresses. By week 12, the genitalia are usually distinct enough to determine the biological sex of the fetus with a high degree of accuracy.