It takes about 24 hours for a sperm cell to fertilize an egg. When the sperm penetrates the egg, the surface of the egg changes so that no other sperm can enter. At the moment of fertilization, the baby's genetic makeup is complete, including whether it's a boy or girl.