On average, a guinea pig has a lifespan of 5 to 7 years. However, with proper care, some guinea pigs may live even longer, reaching up to 8 years or more.