The lifespan of sun bears (Helarctos malayanus) in the wild is not well-documented, but it is estimated to be around 20 to 25 years on average. In captivity, where they receive proper care and nutrition, sun bears tend to live longer. In some cases, they have been known to reach up to 30 years or even more.
As with many animals, individual lifespans can vary due to factors such as genetics, environmental conditions, and the level of care provided. Sun bears, like other bear species, have a slow rate of reproduction, with females giving birth to relatively few cubs, and they invest significant effort in raising their young. The longevity of sun bears is one of the reasons they are listed as a vulnerable species, as their populations are threatened by habitat loss and poaching. Conservation efforts are crucial to help protect these bears and their habitats.