Summary1. Variation in longevity within and between natural populations is widespread, and understanding the relative importance of environmental and genetic factors as well as their interactions in mediating such variation is crucial in longevity research. 2. In this study lifespan of adult copper butterflies was examined in relation to altitude, temperature (20 and 27°C), sex and adult feeding. 3. As expected, longevity increased with decreasing temperature, and sucrose-fed butterflies had longer lifespans compared to water-fed and finally non-fed individuals. The impact of feeding, especially of having access to water or not, was larger at the higher compared to the lower temperature. 4. Regarding altitudinal patterns, increased lifespan in high-altitude populations was largely restricted to beneficial feeding conditions, while under carbohydrate deprivation low-altitude animals lived longer, suggesting that low-altitude butterflies do better under food stress. 5. Differences in longevity between sexes were small at 20°C, while females lived substantially longer than males at the higher temperature. Consequently, females may be less susceptible to high temperature stress than males. Further, males suffered more from food stress than females, suggesting that females are generally more stress resistant than males. 6. Using a full factorial design, this study demonstrates that variation in longevity is caused by several factors, and additionally by substantial interactive effects. Consequently, patterns of variation in longevity are complex, and one needs to be cautious when neglecting this source of variation, by focussing on individual factors only.