If you are having an amniocentesis, you may ask to find out the baby's sex; amniocentesis is the most accurate way to determine the baby's gender before birth.
An amniocentesis can also be done during the third trimester of the pregnancy to determine if the baby's lungs are mature enough for delivery, or to evaluate the amniotic fluid for infection.