Is it a boy or a girl? That might’ve been the first question on your mind after finding out you were having a baby — and one that gets asked countless times throughout your pregnancy.

But while you might be wondering about your baby’s gender from the moment you read your test results, finding out the answer takes a little longer. Here’s when you can expect to learn the big news, and how it might happen. 

When can you find out your baby’s sex?

The answer depends on which prenatal tests or screenings you undergo. Women with healthy, uncomplicated pregnancies can typically find out their baby’s sex sometime around 20 weeks, during their level 2 ultrasound or anatomy scan.

You can opt to get the news a little earlier — possibly as soon as 9 weeks — if your provider has recommended prenatal testing to check for chromosomal abnormalities. 

Prefer to be surprised when you give birth? Even though ultrasounds and other prenatal tests can reveal the sex of your baby, that doesn’t mean you have to be told about the big news. Just let your doctor or ultrasound technician know so they don’t accidentally spill the beans while performing your scan or sharing your results.

How can you learn your baby’s sex?

You can find out whether you’re having a boy or a girl through an ultrasound performed about halfway through your pregnancy, while certain tests that check for chromosomal abnormalities can also give you the news a little sooner.  

Ultrasound

What it is and how it works: Ultrasounds or sonograms are imaging tests that use sound waves to take pictures. Most women undergo a level 2 ultrasound (sometimes called an anatomy scan) halfway through their pregnancy that checks your baby’s developing anatomy and measures growth. While the ultrasound tech checks your baby from head to toe, they can take a look at his or her developing genitals to see if your little bundle is a boy or a girl. 

When you can get it: Anytime between 18 and 22 weeks, though 20 weeks is typical.  

You’ll get results: Right away, if the ultrasound tech can get a clear view of your baby’s genitals. (Sometimes a baby might be curled up in a way that makes the genitals hard to see. If that’s the case, your tech might encourage you to move around or take a break to encourage your baby to change positions.) 

How accurate is it? Ultrasound techs are pros at spotting a boy versus a girl, but no one’s perfect. It’s possible for them to make a mistake, especially if your baby is in a position that makes it harder for the tech to get a clear view. 

Non-invasive prenatal testing (NIPT)

What it is and how it works: NIPT is a type of noninvasive prenatal screening that looks at DNA from your baby’s placenta in a sample of your blood. The test, which involves a quick blood draw from your arm, was previously recommended for women at high risk for carrying a baby with a chromosomal abnormality. However, the American College of Obstetricians and Gynecologists (ACOG) now says doctors should discuss all screening options with all pregnant women — regardless of age or risk — to figure out which one, if any, is most appropriate. The decision is a personal one, so be sure to talk to your health care provider about your options.

When you can get it: NIPT can be performed as early as 9 weeks into your pregnancy, earlier than any other type of prenatal testing.

You’ll get results in: A few days to a week or more, since your blood draw is sent to a lab for testing.

How accurate is it? Around 99 percent. 

Chorionic villus sampling (CVS)

What it is and how it works: Chorionic villus sampling (CVS) is an invasive diagnostic test that analyzes a baby’s genetic makeup and screens for chromosomal abnormalities. The test is usually reserved for moms who are higher risk, since it slightly elevates your risk of miscarriage. CVS is typically performed by a maternal fetal medicine specialist, who takes a sample of your baby’s placental cells through your vagina or cervix or by inserting a thin needle into your abdomen. 

When you can get it: CVS is typically performed between 10 and 13 weeks. 

You’ll get results in: Two or more weeks.

How accurate is it?: Around 98 percent. 

Amniocentesis

What it is and how it works: Like CVS, amniocentesis is another invasive diagnostic test that looks at your baby’s genetic makeup to screen for chromosomal abnormalities. The procedure uses a needle to extract amniotic fluid from the uterus. Since amniotic fluid contains your baby’s cells and other chemicals, it can provide information about your little one's genetics — including gender. Since the test slightly raises the risk for miscarriage, it’s only recommended for certain high-risk pregnancies.  

When you can get it: Amniocentesis is typically done between 16 and 20 weeks, though it can also be performed later.  

You’ll get results in: A few days to a few weeks, depending on the type of lab that processes your sample.

How accurate is it: More than 99 percent.  

What should you know about at-home gender prediction kits?

Though at-home pregnancy tests are highly accurate when taken correctly, the same can’t be said of most at-home kits designed to predict your baby’s gender. Most of the tests, which you can find in some drugstores and online, claim to test for your baby’s sex hormones in your urine.

But experts agree that the results aren’t reliable, and even the tests themselves recommend waiting on making any gender-based decisions until you’ve had your ultrasound.

What about kits that find out your baby’s gender by testing your blood? Some research suggests that they could give you a definitive answer, however, there have also been reports of test manufacturers filing for bankruptcy after lawsuits from new moms who found out after giving birth that their results were wrong.

The bottom line? These kinds of tests aren’t worth counting on. Even though it can be hard to wait, you’re better off finding out your baby’s sex from an ultrasound or a prenatal test prescribed by your provider. But if you really want to try one, run it by your practitioner first. 

As for all those gender prediction old wives' tales? While they're certainly fun to read about, there's no science behind them (although there are a few research-backed signs that might indicate whether or not you're having a boy or a girl).

Waiting can be hard, but hey! Keeping two lists of possible names and nursery colors can be fun. And whether the reveal comes from an ultrasound or another type of prenatal test, your little one will be here before you know it.