Just after answering the question, “Am I pregnant?”, your next one might be: “Am I having a boy or a girl?” Although plenty of methods — some legitimate, some just fun — can predict the sex of your baby earlier on, your 20-week ultrasound usually offers a fairly reliable answer — with a few caveats.

Learn how this second trimester sonogram works and how to tell if the images you see indicate that a baby boy or girl is on the way.

How does a “gender ultrasound” work?

During any ultrasound, a sonographer uses a wand called a transducer to emit sound waves through your belly (or other times, transvaginally). These pings safely bounce off of your baby’s tissues, fluids and bones, and the echos help create an image (called a sonogram) of your baby on the screen. 

You may get several ultrasounds throughout pregnancy, but the big gender reveal often happens during your second trimester at the 20-week ultrasound, if you want to know what you’re having. 

Typically done between weeks 18 and 22 of pregnancy, this test checks that all of your baby's organs and limbs are developing as expected — including those telltale reproductive organs

Although all babies start out with the same preliminary set of genitalia in the womb, at that point during your pregnancy, you can tell the difference between a baby boy or girl on an ultrasound.

Meaning that as long as your little one is in an opportune position, the sonographer will look for those anatomical boy-girl distinctions to deliver the news you’ve been eagerly awaiting. So if you’d rather not know, tell the sonographer you want to be surprised!

How accurate is a gender ultrasound?

How accurately an ultrasound predicts a baby’s sex depends on when it’s performed. While those scheduled late in the first trimester (between weeks 11 and 14) get it right about 75 percent of the time, those done in the second trimester have an almost 100 percent accuracy rate, though no test is perfect. 

As hard as it may be to wait, if you want to avoid repainting the nursery, hold off until the second trimester to act on any ultrasound results.

No matter when you find out baby’s sex, keep in mind that ultrasounds rely on visual analysis, which can be more subjective and have room for error. In fact the accuracy of the test can be affected by:

  • The sonographer. The more experienced and trained your ultrasound technician is, the more accurate your results (and baby sex determination) will be.
  • You. If you're experiencing gas or bloating (two common pregnancy symptoms) or have a full bladder, it can create shadows or cloud the image and make it more difficult to come up with an accurate reading of baby’s sex.
  • Your baby. As much as you want your baby to cooperate, your little one may have other plans. Crossed legs, the presence of the umbilical cord between the legs, or other less-than-ideal fetal positions can prevent the sonographer from getting a good enough look.
  • How many babies. If you're expecting multiples, your babies may hide or block one another — making it harder to learn each one’s sex.

If you’re looking for more certainty or an earlier answer, genetic testing can also reveal your baby’s sex. Procedures like noninvasive prenatal testing (NIPT), amniocentesis and chorionic villus sampling (CVS) take a more objective approach, using placental or fetal DNA to determine the sex. And in the case of NIPT, you can find out as early as week 9 of pregnancy

How to tell if it’s a boy on an ultrasound

While parents may have a hard time making out the various parts of their babies’ bodies during ultrasounds, sonographers look for certain male characteristics: 

  • A genital tubercle pointing up. This is what eventually grows into a penis (or a clitoris, in the case of a girl) and it’s what the technician will look at most closely to determine your baby’s sex. If it’s angled upward when looking at baby from the side, you’re likely having a boy. 
  • A dome shape. When looking up at the baby's bottom from below, a sonographer may spot what’s referred to as the “dome sign” between the baby's legs, which is the penis and scrotum.

How to tell if it’s a girl on an ultrasound

The absence of the above signs doesn't necessarily guarantee the baby is female. A sonographer's trained eyes will instead watch for these clues that suggest baby is a girl:

  • A genital tubercle angled downwards. If it’s pointed downward, it indicates a girl. This “nub” won’t elongate and will instead develop into the clitoris.
  • Three lines. Rather than the dome sign, seeing what looks like three light, layered lines (also called the “hamburger sign”) in the genital area indicates a girl. Those lines are the labia majora, the clitoris and the labia minora.
While it's not foolproof, a second trimester ultrasound done around week 20 of pregnancy can often answer your “boy or girl?” questions fairly accurately. So once you hear the happy news in the doctor’s office, you can start buying baby gear accordingly and sharing the secret with loved ones — unless you decide to keep it a surprise until the very end!