You can typically learn your baby's biological sex between 18–22 weeks of pregnancy during the anatomy ultrasound (also called the mid-pregnancy or level 2 ultrasound), though some people learn earlier. Earlier detection is possible through non-invasive prenatal testing (NIPT) or cell-free fetal DNA tests, which can reveal sex from around 9–10 weeks by analyzing fetal DNA in the mother's blood. Some clinics offer early ultrasounds at 13–14 weeks that may also show sex, though accuracy improves with the standard anatomy scan. A few people prefer to wait until birth for surprise, and some opt for more advanced imaging like 3D ultrasounds for clearer views. The timing also depends on the pregnancy's clarity, the baby's position, and the ultrasound equipment's quality. If you're interested in learning the sex earlier or later than typical, discuss your preferences with your healthcare provider.