The lifespan of a sloth in the wild is around 20-30 years, but they can live up to 50 years in captivity.