Human body cells have 23 pairs of chromosomes. One of these pairs is the sex chromosomes. Females have two X chromosomes (XX) and males have one X and one Y chromosome (XY). The Y chromosome carries a gene that makes a developing embryo become male.
Gametes have only one chromosome from each pair. Every egg made by a woman carries an X chromosome. A man makes two kinds of sperm in equal numbers: half carry an X chromosome and half carry a Y chromosome. This means the sex of a baby is decided by which sperm fertilises the egg.
If a sperm carrying X fertilises an egg, the zygote is XX and the baby is female. If a sperm carrying Y fertilises the egg, the zygote is XY and the baby is male. A genetic diagram or Punnett square for XX × XY shows two XX boxes and two XY boxes. The chance of a boy is 50% and the chance of a girl is 50%, a ratio of 1 : 1. Each fertilisation is independent, so having had several girls does not change the chance of the next baby being a boy.