What Determines If You’ll Have a Boy or Girl?

The sex of a baby is determined by the sperm cell that fertilizes the egg. Every egg carries an X chromosome, while sperm carry either an X or a Y chromosome. If a Y-bearing sperm reaches the egg first, the result is a boy (XY). If an X-bearing sperm wins out, the result is a girl (XX). That single moment of fertilization is the deciding event, and it happens essentially at random.

How the Y Chromosome Triggers Male Development

All embryos start out on the same developmental path for the first several weeks. The Y chromosome carries a specific gene called SRY, which acts as a master switch. The protein produced by this gene binds to DNA and activates a cascade of other genes that cause the embryo to develop testes. It also prevents the formation of a uterus and fallopian tubes. Without a Y chromosome and this gene, the embryo develops ovaries and female reproductive structures by default.

Physical differences in the genitalia begin appearing around weeks 9 to 11 of pregnancy, though ultrasound typically can’t distinguish sex reliably until around 18 to 20 weeks. The genetic sex, however, is locked in from the instant of fertilization.

Why It’s a Roughly 50/50 Split

Since half of all sperm carry an X chromosome and half carry a Y, you’d expect a perfect 50/50 split. In reality, the ratio tilts very slightly toward boys. Globally, about 105 boys are born for every 100 girls. The World Health Organization considers anything from 103 to 107 boys per 100 girls to be within the normal biological range. The reasons for this slight male skew aren’t fully understood, but it’s consistent across populations and time periods.

A large study published in Fertility and Sterility confirmed that this ratio stays remarkably constant regardless of the mother’s age, the father’s age, or birth order. In other words, your fifth child is no more likely to be a boy or girl than your first, and older parents don’t produce a different ratio than younger ones.

The Shettles Method and Timing Myths

One of the most popular folk strategies for choosing a baby’s sex is the Shettles method, which claims that timing intercourse relative to ovulation can shift the odds. The idea is that Y-bearing sperm (which would produce boys) are faster but die sooner, while X-bearing sperm (girls) are slower but hardier. Having sex closer to ovulation would supposedly favor boys; having sex a few days before would favor girls.

The problem is that the underlying premise doesn’t hold up. Studies using atomic force microscopy to examine sperm at the nanoscale found no meaningful differences in size or shape between X-bearing and Y-bearing sperm when looking at individual characteristics. While a complex statistical analysis of many features simultaneously could sort sperm into groups, the differences were so subtle that they couldn’t reliably predict which chromosome an individual sperm cell carried. The claimed 75 to 80 percent success rate from Shettles’s own publications has not been replicated by independent researchers. There is no strong clinical evidence that timing intercourse changes your odds in any practical way.

Does Diet or Nutrition Play a Role?

Some research has explored whether a mother’s diet around the time of conception might nudge the sex ratio. A study published in the Proceedings of the National Academy of Sciences fed female mice diets that were identical in nutritional completeness but differed in their ratio of fat to carbohydrate. The results were striking: mothers on a very high-fat diet produced litters that were 67% male, while mothers on a low-fat, high-carbohydrate diet produced litters that were only 39% male. The researchers confirmed that the diet itself, not changes in the mother’s weight, drove this difference.

These findings are intriguing but come with a major caveat: they were conducted in mice, not humans. The biological mechanism behind this effect isn’t clear, and no controlled study in humans has demonstrated that eating a particular diet before conception reliably shifts the odds of having a boy or girl. It’s an area of active scientific interest, but not something you can act on with any confidence.

The Only Reliable Way to Choose

The one method that can reliably determine a baby’s sex before pregnancy is preimplantation genetic testing during IVF. In this process, embryos created through in vitro fertilization are biopsied at an early stage, and their chromosomes are analyzed. Clinicians can identify which embryos are XX and which are XY, then transfer an embryo of the desired sex. The technology is highly accurate, though diagnostic errors can occasionally occur.

This approach was originally developed to prevent the transmission of sex-linked genetic diseases, conditions carried on the X chromosome that primarily affect boys. Its use purely for sex selection in the absence of a medical reason remains ethically debated, and policies vary by country and clinic.

When Chromosomes Don’t Follow the Typical Pattern

While XX and XY account for the vast majority of outcomes, biology isn’t always that neat. About 2 in every 100 births involve some form of intersex variation, where chromosomal, hormonal, or anatomical development doesn’t follow the standard male or female pathway. The most common chromosomal variations include Klinefelter syndrome (where a person has XXY chromosomes), Turner syndrome (a single X with no second sex chromosome), and Triple X syndrome. These conditions range widely in how they affect a person’s body, and many people with these variations don’t discover them until puberty or later, if at all.

These variations highlight that sex determination, while fundamentally driven by chromosomes, involves a complex chain of genetic signals that can occasionally take unexpected turns. The SRY gene on the Y chromosome is the primary trigger for male development, but the entire process depends on dozens of downstream genes responding correctly to that initial signal.