Genetics plays a crucial role in determining a dog's lifespan. Certain breeds are genetically predisposed to live longer due to factors like decreased susceptibility to diseases and healthier genes.