See collections

Last revised:

Can you choose the sex of your baby?

When embarking on your family-building journey, you will inevitably think about how many children you ideally want — and what sexes they might be. But can you choose the sex of your baby?

Let’s explore how a baby’s sex is determined, the truth behind the old wives’ tales about having a boy or a girl, and the only way you can really choose the sex of your baby.

Legacy recognizes that gender and sex are separate concepts, but we’re using common language here. When we refer to conceiving a boy or a girl in the following article, we mean conceiving a baby with XY or XX chromosomes.

Key takeaways

  • A baby’s biological sex is determined by whether their father’s sperm contained an X chromosome or a Y chromosome. XX is genotypically female, while XY is genotypically male.
  • There are many ideas about ways to influence baby’s sex and how to conceive a boy or a girl, but these are mostly myths or “old wives’ tales” that aren’t supported by modern science.
  • The only reliable way to choose a baby’s sex is by using IVF with genetic testing. This process has financial and emotional considerations.
Couple with plain gold background

How is a baby’s sex determined?

Every human cell has 23 pairs of chromosomes (46 total chromosomes). Half of these are from the biological father’s sperm, and the other half from the biological mother’s egg.

Two of these chromosomes (X and Y chromosomes, also known as sex chromosomes) determine a baby’s sex. One X chromosome always comes from the egg, and the second — which can be X or Y — comes from the sperm.

If the sperm that fertilizes an egg has an X chromosome, the baby will be a girl (XX genotype). If it has a Y chromosome, it will be a boy (XY genotype). It’s the sperm that chooses the baby’s sex.

Can you influence sex selection to conceive a boy or girl? 

Many old wives’ tales claim you can take steps to influence whether you have a boy or girl when trying to conceive. But is there any truth to these rumors? Let’s dive in.

Sex position and baby’s gender

In the 1960s, physician Landrum B. Shettles studied sperm behavior and came up with a theory called the “Shettles method.” He then wrote a best-selling book called How to Choose the Sex of Your Baby. Shettles claimed both sex position and having sex at specific times during your cycle could influence the resulting baby’s gender.

Shettles based his theory on the belief that Y-chromosome-carrying sperm was lighter and swam faster than X-chromosome-carrying sperm, because the X chromosome is larger and contains more genes than the Y. And because X-bearing sperm is larger and “hardier,” he theorized, they were more able to survive acidic conditions, like the conditions of the vagina.

He wrote that having sex face-to-face (missionary position) with shallow penetration forces the sperm to travel farther in the acidic environment of the vagina, favoring sperm that would conceive a girl. Alternatively, to conceive a boy, Shettles wrote that having sex from behind, encouraging deep penetration, will deposit the sperm closer to the cervix, favoring male-producing sperm.

Shettles also claimed that which partner orgasmed, and in which order, could affect the baby’s gender. To conceive a girl, Shettles says the male partner should orgasm first, and vice versa if you are trying for a boy. Again this comes down to alkalinity, as Shettles believed female orgasm secretions were alkaline.

But is this true? Can certain positions really help you choose the sex of your baby? Probably not — or at least not reliably. Later studies, assisted by enhanced sperm analysis technology, found that Y-carrying sperm don’t swim faster, nor are they smaller or lighter than X-carrying sperm (multiple studies show no morphological differences between the two).

And further sperm studies found that the pH of the fluids to which sperm is exposed doesn’t seem to have a different effect on female-producing sperm, compared to male-producing sperm. In general, sperm is most motile in a neutral to slightly alkaline environment, between pH 7 and 8. The pH of the vagina is typically acidic, but shifts to neutral or alkaline just before ovulation, as a result of hormones that surge at that time. This helps facilitate fertilization.

The bottom line? There’s no robust evidence that sex position can influence your baby’s gender — so keep doing it in whatever way feels best for both of you. Learn more about sex while trying to conceive.

Specific times of the month/cycle to have sex to influence baby’s gender

Continuing with the Shettles method: The doctor believed the timing of intercourse was also part of the procedure, again based on the sperm’s preference for acidic or alkaline environments.

According to Shettles:

  • To conceive a girl, have sex between the end of menstruation and three days before ovulation. Abstain from sex 2–3 days before ovulation.
  • To conceive a boy, have sex starting on the day of ovulation and for the following three days. Abstain from sex from the start of the menstrual cycle to the day of ovulation.

Modern evidence is mixed. As outlined in a 2016 review, in 6 studies looking at the impact of the day of conception on the sex of baby, there were several completely different conclusions — some found that a boy was most likely if the couple had sex on the day of ovulation, while others found the opposite, that boys were most likely when conceived several days before or several days after ovulation.

In 2010, a small study published in the Journal of Reproductive Biomedicine found that 81% of subjects conceived a female baby by following a prescribed timing of intercourse combined with a specific diet. The timing was similar to the Shettles method advising to have sex 3-4 days before ovulation.

A 1998 study of 947 births found that timing of sex during the cycle didn’t have a significant or consistent effect on the sex ratio of the babies. The final ratio was pretty close to 50/50, with 101.5 male babies born for every 100 female babies.

In 1995, a study found that the day of intercourse had no effect on the sex of the baby, but did affect how likely the couple was to concieve at all. The study found:

Day of intercourseChance of conception
6 days prior to ovulationLess than 1%
5 days prior to ovulation8%
4 days prior to ovulation17%
3 days prior to ovulation8%
2 days prior to ovulation36%
1 day prior to ovulation34%
Day of ovulation36%
Day after ovulationLess than 1%

As you can see by the above table, using the Shettles method to choose the baby’s gender would actually prevent a couple from having sex on the days most likely to result in a pregnancy — the day of ovulation and the 2 days prior. That’s why experts typically recommend having sex every 1–2 days during the 5 days prior to ovulation, regardless of whether you’re hoping for a boy or a girl.

Learn more about when (and how often) to have sex when you’re trying to get pregnant.

Diet choices to select the baby’s gender

The theory that what a woman eats before getting pregnant can “choose” the sex of her baby has similar foundations to the Shettles method. It hypothesizes that diet can change the acidity of the female reproductive system, and therefore “select” for a sperm carrying an X or Y chromosome.

The types of foods advised to influence the baby’s sex include:

  • To conceive a girl, reduce salt intake. Eat foods high in calcium and magnesium (like dairy products and spinach). Eat food believed to “acidify” the body, such as seafood, meat, olives, vinegar, mustard, and grains. 
  • To conceive a boy, eat high-potassium foods like bananas, white beans, salmon, avocados, almonds, apples, and mushrooms. Increase foods believed to “alkalize” the body, such as citrus fruits, root vegetables, and nuts. Reduce dairy intake.

Does this really work? One very small study found that, in conjunction with intercourse timing, a diet higher in magnesium and calcium and low in potassium resulted in a higher percentage of female babies (16 of 21 pregnancies were XX pregnancies).

But again, these theories are based on the idea that X-chromosome-carrying sperm and Y-chromosome-carrying sperm are inherently different or thrive in different environments, which isn’t really supported by modern evidence.

Get tips to optimize sperm health so you can achieve your parenthood dreams.

The most important diet choices when trying to conceive — for both partners — are nutritious foods that support healthy sperm and a healthy pregnancy. See the 6 things all couples should do before trying to conceive and 6 superfoods for sperm health.

The only way to select the sex of your baby

Long story short: Gender selection without using in vitro fertilization (IVF) has little strong science behind it. The only true way to select the sex of your baby is by undergoing IVF with preimplantation genetic testing (PGT).

IVF is a reproductive treatment in which eggs are fertilized by sperm in a laboratory. When the egg is fertilized, it is called an embryo. The embryo can then be inserted into a patient’s uterus to grow and develop, or it can be frozen.

Preimplantation genetic testing (PGT) is a type of screening test that clinicians can perform on embryos created via IVF. Prior to being frozen, a small number of cells are removed from the embryos in a process known as “embryo biopsy.” Then, these cells are tested to identify the genetic makeup of the embryos, including their karyotype (number of chromosomes), sex chromosomes, and the presence of specific genetic disorders, such as cystic fibrosis.

IVF with PGT is not commonly used only for gender selection. Normally, it is used to ensure the selected embryo has the correct number of chromosomes. This reduces the chance of a failed IVF cycle and miscarriage. Gender selection is simply an unintentional “perk.” (If you’re doing IVF with PGT, you can also choose not to know the sex chromosomes of your embryos.)

But some clinics will offer IVF with PGT to help you achieve a more balanced representation of both genders in your family, or to have one child of a specific gender . If PGT is used for gender selection alone, it may be called “family balancing.”

The cost for IVF with PGT for gender selection can vary significantly across the US. For IVF alone, most people will pay around $15,000 to $20,000 per cycle. Genetic testing can increase the cost to over $30,000. Most insurance companies will not cover IVF if a couple is not infertile and is doing the procedure only to select the baby’s sex.

Does your baby’s gender really matter?

Lisa Schuman, LCSW

Lisa Schuman, LCSW, a fertility-focused social worker and director of The Center for Family Building, says there are a couple of things to consider if you decide to choose the sex of your baby.

Schuman discusses the potential for pregnancy loss. “Sometimes when people choose the gender, and they have a pregnancy loss, it can have a deeper impact,” she explained. “Instead of grieving over the loss of that baby-to-be, they’re actually thinking very specifically about that girl named “Sarah,” what she would look like and what their life would have been like together,” Schuman says. 

“You’re attaching so much more expectation if you already know the gender, have planned a name, and have almost created a personality for this child before they’re even conceived. That can make a loss so much harder because they’re already a very specific person,” Schuman says.

But the most important consideration is to understand that just because a child is a specific sex doesn’t mean they’ll confirm to your ideas of their gender.

Schuman explains a real-life story about this that she witnessed with a patient:

“I saw a woman who did PGT for gender selection and wanted one child, a girl. She made so many embryos and went through three rounds of IVF just to find a girl. It was really difficult for her, but eventually, there was a girl embryo. She kept saying, “I was always very girly. And I grew up loving pretend tea parties, painting my nails, and reading.” So she thought that she and her daughter would do all these same things together.”

“She dreamt of this forever, and she finally had this girl with whom she wanted to dress up, go for manicures, and share books. The girl grew up to be a ‘tomboy’ and not interested in any of the same things. She didn’t want to do the activities her Mom had idealized in her mind.”

“So I think people have to… ensure they don’t impose their wishes on that child, no matter how badly they want a specific gender. That they can love them for who they are.”

There also has to be the understanding that gender is different from sex. Although you can choose a child’s biological sex with IVF, their gender refers to how they identify and present. For some people, their sex at birth and gender align. For others, they don’t, and that’s completely normal. Parents need to embrace the fact that they can’t control their child’s gender identity.

Explore more collections