Aim: At a global scale, the relationship of leaf longevity (LL) to mean annual temperature (MAT) is positive for deciduous species but negative for evergreen species. The aim of this paper is to understand the mechanisms underlying these contrasting patterns of leaf longevity, from a cost-benefit perspective. Location: Global. Methods: We tested our hypothesis that contrasting LL-MAT relationships in evergreen and deciduous species result from differing adaptations to variation in the length of the annual favourable period. We defined f as the portion of the year when monthly temperature and water availability were favourable. We examined whether the contrasting LL patterns with MAT can be also seen with f. Next, we calculated the optimal LL that maximizes carbon gain per unit time across a range of f. Results: The contrasting LL patterns across MAT were also found across f. Our optimization model successfully reproduced the contrasting LL patterns across f for the evergreen (LL longer than 1 year) and deciduous plants. The model shows that longer LL is required to maximize carbon gain for evergreen plants in shorter f, while LL of deciduous plants decreases with decreasing f. Without any a priori trait association, the model reproduced the well-known LL-leaf mass per area (LMA) relationship. The model also reproduced observed shifts in LL-LMA relationships across MAT or f. Evergreen leaves in long f need greater LMA to maintain LL than those in shorter f. Main conclusions: Observed contrasting LL-MAT patterns in deciduous and evergreen species can be reproduced via the simple rule of maximizing carbon gain across different lengths of favourable periods. Our model provides a mechanistic explanation for the empirical global patterns of several key leaf traits and their relationships.