* Guinea pigs: The average lifespan of a guinea pig is 5 to 7 years, but some can live up to 8 or even 10 years with proper care.
* Hamsters: The average lifespan of a hamster varies depending on the species, but it's generally around 2 to 3 years. Some dwarf hamster species may live up to 4 years, while Syrian hamsters typically live for 2 to 3 years.
Factors affecting lifespan:
* Species: Different species of guinea pigs and hamsters have varying lifespans.
* Genetics: Some animals are genetically predisposed to live longer than others.
* Diet and exercise: A healthy diet and regular exercise can contribute to a longer lifespan.
* Environmental conditions: A clean and stimulating environment can promote longevity.
* Veterinary care: Regular veterinary checkups and prompt treatment for health issues can help extend an animal's life.