Sperm can live inside a woman's body for up to five days under optimal conditions. This is because the female reproductive tract, especially around ovulation, produces fertile cervical mucus that protects sperm and helps them travel to the fallopian tubes where fertilization occurs
. The exact lifespan depends on factors such as sperm quality, the environment inside the vagina, uterus, and fallopian tubes, and the presence of fertile cervical fluid. If conditions are not favorable, sperm may survive only a few hours. In cases of male infertility or low sperm motility, sperm survival time may be shorter
. Outside the female body, sperm survive much shorter—typically minutes to about 30 minutes depending on moisture and temperature—but inside the female reproductive system, they can remain viable for several days, which explains why pregnancy can occur even if intercourse happens a few days before ovulation