'Is it a boy or a girl?' is one of the first questions parents-to-be want to know the answer to.
Now, thanks to a simple blood test they can find out with surprising accuracy at about seven weeks.
Though not widely offered by doctors, gender-detecting blood tests have been sold online to consumers for the past few years.
Now researchers have found they really do provide early and accurate results. The test looks for small pieces of the male sex chromosome in the mother's blood and reveals if a mother is carrying a baby boy as early as seven weeks into the pregnancy. The team, from the Tufts University School of Medicine, said the test may be particularly valuable for families that harbour sex-linked genetic disorders like haemophilia.
Because such disorders mostly strike boys, knowing that the baby is a girl could spare the mother diagnostic procedures, such as amniocentesis, that carry a small risk of miscarriage.
'It could reduce the number of invasive procedures that are being performed for specific genetic conditions,' said study author Dr Diana Bianchi.
The method called cell-free foetal DNA is available in many European hospitals and costs around £255. It is not currently not available from doctors in the United States but is available online.
'What they are finding in England is that many women are not going on to have the invasive tests,' Dr Bianchi said.
In those procedures, doctors either extract some of the fluid that surrounds the foetus but this can cause a small number of mothers to miscarry.
However, some researchers warned the test could be misused to terminate a pregnancy if the baby isn't of the desired sex.
'What you have to consider is the ethics of this,' said Dr Mary Rosser at the Montefiore Medical Center in New York.
'If parents are using it to determine gender and then terminate the pregnancy based on that, that could be a problem. 'Remember, gender is not a disease.'
In a fresh look at the medical evidence for the blood test, Bianchi and her colleagues analyzed 57 earlier studies that included more than 6,500 pregnancies.
They found parents could trust the test 98.8 percent of the time when it said they would have a boy, and 94.8 percent of the time when it indicated a girl.
The current non-invasive alternative - an ultrasound done at the end of the first trimester (12 weeks) - isn't always good at spotting a baby's sex. Dr Bianchi said she owns stock in privately held Verinata Health, a company that is developing cell-free foetal DNA tests for Down syndrome, although that company had no role in the new study. The study was reported in the Journal of the American Medical Association.