Boy or Girl? How You Can Really Find Out Your Baby's Sex
Whether your baby is a girl or a boy, you are ready to welcome them with the same love. Still, most parents are curious — and it is natural to wonder how early, and how reliably, you can find out. There are several medical tests that can determine a baby's sex before birth. In some countries, such as India, prenatal sex determination is banned because it has been misused for sex-selective abortion. In Sri Lanka, where our culture values every child equally, parents are free to ask.
This article explains how a baby's sex is decided, when and how you can find out, and which popular methods simply do not work.
How is a baby's sex decided?
A baby is conceived when a sperm fertilises an egg. The egg normally carries one X chromosome. The sperm carries either an X or a Y chromosome. If the fertilising sperm carries an X, the baby is typically a girl (XX); if it carries a Y, typically a boy (XY).
About half of a man's sperm carry an X chromosome and half carry a Y, so the chance of a girl or a boy is roughly 50:50 — and it is decided entirely by chance at the moment of fertilisation. No medicine, food or technique can change it afterwards.
Although the baby's chromosomal sex is fixed at conception, the external genitalia of boys and girls look very similar in early pregnancy and only take their distinct appearance over the following weeks. That is why a scan cannot tell you anything reliable in the first weeks of pregnancy — the difference is simply not visible yet.
The ultrasound scan — the usual way parents find out
The most common and easiest way to learn your baby's sex is at an ultrasound scan. At the detailed anomaly scan, usually performed around 18 to 20 weeks, the doctor can often see the baby's external genitalia clearly enough to tell you whether you are having a girl or a boy.
With a modern scanner and an experienced clinician, an opinion may sometimes be possible from around 14 to 16 weeks — but identification is generally more reliable at the detailed scan around 20 weeks. Research shows that ultrasound becomes considerably more accurate as pregnancy advances: accuracy in the early stages is noticeably lower, and improves week by week into the second trimester.3
A few practical points every parent should know:
- Accuracy is very high in experienced hands. With a modern scan machine, an experienced clinician can almost always tell correctly — uncertainty is rare, and usually arises only with conditions such as ambiguous genitalia.
- The baby's position matters. If your baby is lying awkwardly or keeping the legs crossed, it may be difficult or impossible to see — and that is nobody's fault.
- It is not the purpose of the scan. The anomaly scan exists to check your baby's growth and development and to look for physical conditions. Checking the sex is a bonus if time and position allow, not part of the screening itself — and a repeat scan is not arranged just because the sex could not be seen.
DNA blood tests (NIPT) — from about 10 weeks
A newer option is a blood test taken from the mother. During pregnancy, the mother's blood contains small fragments of DNA from the placenta, which usually reflect the baby's own genetic makeup. By looking for Y-chromosome material in this cell-free DNA, a laboratory can determine the baby's sex from roughly 9 to 11 weeks of pregnancy.
This is the same technology behind NIPT (non-invasive prenatal testing), which many parents now have as a screening test for chromosomal conditions such as Down syndrome. In Sri Lanka, laboratories offering NIPT include Y-chromosome detection as standard, so the baby's sex is reported as part of the result.
How accurate is it? A large review of 90 studies covering nearly 10,000 pregnancies found cell-free DNA testing identifies fetal sex with a sensitivity of about 97% and specificity of about 99%.6 Accuracy still depends on how far along you are, the amount of fetal DNA in the sample, twin pregnancy and laboratory methods. It is also a relatively expensive test.
Medically, early DNA sex determination matters most when a pregnancy is at risk of a serious inherited condition that affects only one sex (a sex-linked condition) — in those families it can guide which further tests are actually needed.
Amniocentesis and CVS — diagnostic tests, not curiosity tests
Two invasive tests can also reveal the baby's chromosomes, including the sex chromosomes:
- Amniocentesis — a thin needle draws a small sample of the fluid around the baby, usually between 15 and 20 weeks.
- Chorionic villus sampling (CVS) — a small sample of placental tissue, taken earlier in pregnancy.
Both are diagnostic tests offered only when there is a medical reason — for example, a higher chance of a chromosomal or genetic condition. Because each carries a small risk of miscarriage (around 1 in 200 for amniocentesis), they are never done simply to find out whether the baby is a girl or a boy. If you have one for a medical reason, the sex is simply part of the information it can provide.
What cannot tell you — or choose — your baby's sex
Many traditional beliefs and internet theories claim to predict or even influence a baby's sex. None of them work. A landmark study in the New England Journal of Medicine showed that timing intercourse in relation to ovulation has no influence on the baby's sex.7 The following can neither tell you nor change whether you are having a boy or a girl:
- Timing intercourse around ovulation, or particular sexual positions
- Special foods, drinks or dietary supplements
- The shape or position of your bump ("carrying high or low")
- Food cravings or the severity of morning sickness
- The baby's heart rate on a scan
- Chinese calendars and similar charts
- The position of the placenta ("Ramzi theory")
- Home urine "gender prediction" tests
Any of these will be "right" about half the time — exactly as often as a coin toss.
The bottom line
- Your baby's sex is fixed at conception, by chance, and cannot be changed.
- The most practical way to find out is at the detailed scan around 20 weeks — if the baby cooperates, and never with 100% certainty.
- A DNA blood test can tell you earlier (from about 10 weeks) with high accuracy, but it is costly and mainly valuable when there is a medical reason.
- Invasive tests such as amniocentesis are never done just to learn the sex.
- No food, position, calendar or old wives' tale can predict or choose your baby's sex.
If you have questions about your scans or screening tests in pregnancy, discuss them with your obstetrician. See also our guides to a healthy early pregnancy and our pregnancy care hub.
References
- NHS. Ultrasound scans in pregnancy [Internet]. London: NHS; 2023 [cited 2026 Aug 9]. Available from: nhs.uk
- NHS England. Screening in pregnancy: 20-week screening scan [Internet]. London: NHS England; 2019 [updated 2026 Mar 6; cited 2026 Aug 9]. Available from: gov.uk
- Amankona E, Donkor A, Agyei BA, Anyitey-Kokor I, Odoi AT, Wiafe YA. Effectiveness of prenatal ultrasound in fetal sex identification: a systematic review and meta-analysis. J Ultrasound. 2025;28(3):563–74. doi:10.1007/s40477-024-00977-7
- NHS England Genomics Education Programme. Non-invasive prenatal diagnosis (NIPD) [Internet]. London: NHS England; 2025 [cited 2026 Aug 9]. Available from: genomicseducation.hee.nhs.uk
- Royal College of Obstetricians and Gynaecologists. Non-invasive prenatal testing for chromosomal abnormality using maternal plasma DNA: Scientific Impact Paper No. 15 [Internet]. 2nd ed. London: RCOG; 2014 [cited 2026 Aug 9]. Available from: rcog.org.uk
- Wright CF, Wei Y, Higgins JPT, Sagoo GS. Non-invasive prenatal diagnostic test accuracy for fetal sex using cell-free DNA: a review and meta-analysis. BMC Res Notes. 2012;5:476. doi:10.1186/1756-0500-5-476
- 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–21. doi:10.1056/NEJM199512073332301
- NHS. Amniocentesis [Internet]. London: NHS; 2026 [cited 2026 Aug 9]. Available from: nhs.uk