What determines the sex of a baby is the chromosome in the sperm: an egg always carries an X, so a sperm carrying an X typically makes a girl (XX) and a sperm carrying a Y typically makes a boy (XY), decided at the moment of fertilization.
It is one of the first questions people ask after a positive test, and the science is simpler than most of the myths. Sex is set by a single chromosome at conception, and a single gene on the Y chromosome, called SRY, steers development weeks later.
Below: the X and Y basics, who “decides”, how sex organs develop, the real odds, why timing tricks fail, and when tests can tell you.
Key Takeaways
- Eggs always carry an X chromosome; sperm carry an X or a Y, so the sperm determines chromosomal sex (NHGRI).
- XX typically develops as female and XY as male, because the SRY gene on the Y triggers testes to form.
- The early gonads look the same in all embryos until about week 7, according to StatPearls.
- Slightly more boys are born: about 105 for every 100 girls in U.S. CDC data. Timing sex does not change the odds.
- cfDNA blood screening can show sex from about 10 weeks; the anatomy scan at 18 to 22 weeks often can too.
Table of Contents
What Determines the Sex of a Baby? The Short Answer
Quick Answer
That is the whole mechanism in one paragraph, and it surprises many parents. Nothing the pregnant parent eats, does or feels changes it, and the sex does not shift later in pregnancy. StatPearls, a clinical reference hosted by the National Library of Medicine, explains that the sex of the embryo is set by the combined genetic material from the sperm and egg at fertilization.
Chromosomes 101: X, Y and the 23 Pairs
MedlinePlus Genetics, from the National Library of Medicine, explains that the sex chromosomes form one of the 23 pairs of human chromosomes in each cell.
- The X chromosome: a large chromosome that everyone typically carries at least one copy of.
- The Y chromosome: much smaller. NHGRI notes the Y is about one third as long as the X and has around 100 protein coding genes, the fewest of any chromosome.
- The typical patterns: MedlinePlus Genetics describes people with two X chromosomes (46,XX) as typically developing female characteristics and people with one X and one Y (46,XY) as typically developing male characteristics.
Each parent passes on one chromosome from every pair. NHGRI puts it simply: one set of chromosomes comes from the mother and the other from the father. Since the egg’s sex chromosome is always an X, the variable piece is the sperm.
Does the Mother or the Father Determine the Baby’s Sex?
Biologically, the sperm does. NHGRI states that in fertilization, sperm can contribute either an X or a Y chromosome, while eggs always contribute an X. That means:
- Egg (X) plus sperm carrying X: XX, typically a girl.
- Egg (X) plus sperm carrying Y: XY, typically a boy.
This is worth saying gently, because women have sometimes been blamed for “failing” to have a son. No parent chooses which sperm reaches the egg. It is chance at the moment of conception.
Fertilization happens around ovulation, before most people know they are pregnant. Pregnancy weeks are counted from the first day of your last period, so conception falls around the time your calendar calls 2 weeks pregnant. By your positive test, the chromosomal sex is already set.
The SRY Gene: How Sex Development Unfolds
The real switch is one gene on the Y chromosome called SRY (sex determining region Y). MedlinePlus Genetics explains that SRY makes a protein that acts as a transcription factor: it binds to DNA and helps control the activity of other genes. NHGRI describes it as turning on a set of other genes that lead the embryo to develop certain sex characteristics, such as testes.
According to StatPearls, the early gonads are bipotential, meaning they can become either testes or ovaries, and fetal gonads do not take on male or female characteristics until about week 7 of gestation. When SRY is present and working, the gonads become testes. In its absence, they become ovaries. MedlinePlus Genetics adds that the SRY protein also helps suppress development of the uterus and fallopian tubes.
| Stage (approximate) | What happens | Source |
|---|---|---|
| Fertilization | Chromosomal sex is set: XX or XY, depending on the sperm. | NHGRI; StatPearls |
| Early weeks | The gonads look the same in every embryo and could become testes or ovaries. | StatPearls |
| About week 7 | The gonads begin to take on male or female characteristics; with SRY they become testes. | StatPearls; MedlinePlus Genetics |
| Weeks 8 to 10 | In testes, Sertoli cells begin making anti-Mullerian hormone; this male pathway suppresses the uterus and fallopian tubes. | StatPearls; MedlinePlus Genetics |
| About week 9 | In testes, Leydig cells begin releasing testosterone. | StatPearls |
| By week 12 | The scrotum has formed in male development; female reproductive tract development is complete by the end of the first trimester. | StatPearls |
So do all babies start out female? Not exactly: StatPearls describes the early gonads as bipotential, not female. If you want to follow along week by week, see 10 weeks pregnant and 12 weeks pregnant, when many of these changes are underway.
Baby on the way? Get ahead on sleep.
Our free two-minute quiz builds a gentle, personalized sleep plan you can use from the first weeks at home.
Boy or Girl Odds: Is It Really 50/50?
Close, but not quite. Slightly more boys than girls are born. A National Center for Health Statistics report from the CDC found that the U.S. sex ratio at birth ranged from a low of 1,046 male births per 1,000 female births (in 1991 and again in 2001) to a high of 1,059 per 1,000 (in 1946). In everyday terms, that is roughly 105 boys for every 100 girls.
For any one pregnancy, that works out to a little over a 50 percent chance of a boy and a little under 50 percent for a girl. Having two or three children of one sex does not make the next baby “due” to be the other: each conception is its own event.
You may also hear that boys or girls “run in families.” Researchers are still studying whether some families lean slightly one way, and the findings are not settled. What is settled for your purposes: no family pattern, number of siblings or past birth can tell you the sex of your next baby. Only testing can.
Can You Influence the Sex of Your Baby? Timing, Shettles and Other Myths
The most famous sex selection plan is the Shettles method, which claims that sperm carrying a Y chromosome swim faster but die sooner, so having sex close to ovulation favors a boy and having sex a few days earlier favors a girl.
The best known test of the timing idea comes from a 1995 study in the New England Journal of Medicine by Allen Wilcox and colleagues at the National Institute of Environmental Health Sciences. They followed 221 healthy women trying to conceive and pinpointed ovulation with daily urine samples across 625 menstrual cycles. Their conclusion on sex was plain: cycles producing male and female babies had similar patterns of intercourse in relation to ovulation. In other words, timing did not predict whether the baby was a boy or a girl.
- Timing sex near ovulation for a boy: not supported by the Wilcox study, which found similar timing for boys and girls.
- Diets (salty foods for a boy, dairy for a girl): we could not find reliable evidence that any diet changes the sex of a baby. It is set by the sperm at fertilization.
- Sex positions, orgasm or pH tricks: we found no reliable evidence that any of them change the odds.
- Gender prediction calendars: fun, but they cannot change biology.
If a sex-linked genetic condition runs in your family, talk with your doctor or a genetic counselor before trying to conceive.
Differences of Sex Development
For a small number of babies, chromosomes, gonads and anatomy do not line up in the typical XX or XY pattern. These are called differences of sex development (DSDs), and you may also hear the word intersex. MedlinePlus notes that when an ultrasound shows genitals that are not clearly male or female, cfDNA screening may be used to learn more.
MedlinePlus Genetics describes several examples linked to the SRY gene itself:
- Swyer syndrome: a person has a 46,XY karyotype but female-typical characteristics. SRY variants are found in about 15 percent of cases; without a working SRY protein, testes do not form, but a uterus and fallopian tubes do.
- 46,XX testicular DSD: a person has a 46,XX karyotype but develops male characteristics. Most cases happen when SRY is moved from the Y chromosome, usually onto an X, during sperm formation in the father.
- Ovotesticular DSD: a person has both ovarian and testicular tissue. SRY translocations cause about 10 percent of cases.
NHGRI also notes that some people have extra sex chromosomes, such as XXY, XYY or XXX. These examples show why doctors say XX and XY are what typically lead to female and male development. If a scan or blood test suggests something unexpected, your care team or a genetic counselor can explain it.
When and How You Can Find Out Your Baby’s Sex
There are two main ways your baby’s sex shows up during pregnancy:
| Method | When | What to know |
|---|---|---|
| Cell-free DNA (cfDNA) screening, also called NIPT | As early as about 10 weeks | A blood test from the pregnant parent. MedlinePlus says it can be used to determine the baby’s sex. It is mainly a screening test for chromosome conditions, not a diagnosis, and is less accurate with twins or more. |
| Mid-pregnancy anatomy ultrasound | Between 18 and 22 weeks | Cleveland Clinic notes the technician may be able to see the genitals, depending on how the baby is lying. False results are possible. |
| Diagnostic tests (CVS or amniocentesis) | If your provider recommends them | MedlinePlus notes these are the tests used to confirm a positive cfDNA screening result. Ask your provider whether they apply to you. |
Cell-free DNA screening. MedlinePlus explains that cfDNA screening can be done as early as the 10th week of pregnancy. Ask your provider whether the lab will report sex and whether you can choose not to hear it.
The anatomy scan. Cleveland Clinic describes the 20-week ultrasound, often called the anatomy scan, as taking place between 18 and 22 weeks. Seeing the sex depends on position. If you want a surprise, Cleveland Clinic suggests telling the technician before the scan starts. Our 20 weeks pregnant guide covers what else the scan looks at.
What about earlier scans or home kits? Early in pregnancy the external genitals are still forming (StatPearls notes the scrotum is formed by about week 12), so a very early ultrasound guess can be hard to read. If you are tempted by a home kit, ask your provider first; testing ordered through your care team comes with someone to interpret the result.
Old Wives’ Tales, Gender Reveals and Keeping It Fun
Bump shape, cravings and the ring test cannot tell the sex, but they make a fun game while you wait. Our roundup of old wives’ tales for boy or girl explains where each one came from.
Once you know (or decide to stay surprised), you might want to celebrate. Browse gender reveal ideas and gender reveal games, and start a short list from baby girl names or baby boy names. If you are still deciding when to share the bigger news, read when to tell people you are pregnant.
Related Betteroo Guides
- Old Wives’ Tales About Baby Gender
- Gender Reveal Ideas
- When to Tell People You’re Pregnant
- 20 Weeks Pregnant
- 12 Weeks Pregnant
- Baby Registry Checklist
When to Call Your Doctor or Midwife
Learning your baby’s sex is usually just exciting news. Contact your doctor, midwife or a genetic counselor when:
- You have a family history of a sex-linked genetic condition: ideally before or early in pregnancy, so you can discuss testing options.
- A cfDNA screening result comes back unexpected or “high risk”: MedlinePlus stresses that it is a screening test; a positive result means a higher chance, not a diagnosis, and diagnostic testing such as CVS or amniocentesis is needed to confirm.
- The cfDNA result and the ultrasound do not match: for example the blood test reports a Y chromosome but the scan looks female, or the reverse. Your provider can explain possible reasons and next steps.
- The anatomy scan cannot clearly show the genitals or flags any concern: Cleveland Clinic notes your provider may order more tests if something on the scan needs a closer look.
- You feel anxious or disappointed about the result: tell your provider, who can connect you with support.
For heavy bleeding, severe abdominal pain or a change in your baby’s movements, call your provider right away; call 911 in an emergency. This article is general education, not medical advice.
Frequently Asked Questions
What determines the sex of a baby, the mother or the father?
The father’s sperm determines it. According to the National Human Genome Research Institute, an egg always contributes an X chromosome, while a sperm contributes either an X or a Y. Neither parent controls which sperm reaches the egg, so no one is to blame.
At what point is the sex of a baby determined?
Chromosomal sex is set at fertilization, when the sperm and egg combine, usually before you even know you are pregnant. StatPearls notes that the early gonads look the same in every embryo and only begin taking on male or female characteristics around week 7 of gestation.
Can the sex of a baby change during pregnancy?
No. The chromosomes that determine sex are set at fertilization and do not change. What can change is a guess: an early ultrasound may be misread because the genitals are still forming or the baby is turned away, so ask how confident the reading is.
Is it 50/50 to have a boy or a girl?
Almost. Slightly more boys are born than girls. A CDC National Center for Health Statistics report found U.S. ratios between 1,046 and 1,059 male births per 1,000 female births, roughly 105 boys for every 100 girls. Each pregnancy is a separate chance, so past children do not change the odds.
Can you choose the sex of your baby naturally?
There is no reliable natural method. A 1995 New England Journal of Medicine study of 221 women tracked intercourse timing and ovulation closely and found that cycles producing boys and girls had similar timing patterns. We found no reliable evidence for diet or position methods either.
How early can you find out the sex of your baby?
Cell-free DNA screening, a blood test, can be done as early as about 10 weeks, according to MedlinePlus, and may show the baby’s sex. The mid-pregnancy anatomy ultrasound, done between 18 and 22 weeks according to Cleveland Clinic, can often show the genitals, depending on the baby’s position.
Calmer days, better nights.
Betteroo builds a personalized sleep plan for your baby. Take the free two-minute quiz and have it ready before the newborn weeks.
7 Sources
- National Human Genome Research Institute (NIH). Y Chromosome Facts.
https://www.genome.gov/about-genomics/fact-sheets/Y-Chromosome-facts - MedlinePlus Genetics (National Library of Medicine). SRY gene.
https://medlineplus.gov/genetics/gene/sry/ - Libretti S, Aeddula NR. Embryology, Genitourinary. StatPearls, NCBI Bookshelf (NIH).
https://www.ncbi.nlm.nih.gov/books/NBK559309/ - Centers for Disease Control and Prevention, National Center for Health Statistics. More Boys Born Than Girls.
https://cdc.gov/nchs/pressroom/05facts/moreboys.htm - Wilcox AJ, Weinberg CR, Baird DD. Timing of sexual intercourse in relation to ovulation: effects on the probability of conception, survival of the pregnancy, and sex of the baby. N Engl J Med. 1995;333(23):1517-1521. PubMed.
https://pubmed.ncbi.nlm.nih.gov/7477165/ - MedlinePlus (National Library of Medicine). Prenatal Cell-Free DNA Screening.
https://medlineplus.gov/lab-tests/prenatal-cell-free-dna-screening/ - Cleveland Clinic. 20-Week Ultrasound (Anatomy Scan).
https://my.clevelandclinic.org/health/diagnostics/22644-20-week-ultrasound






