Although understanding female reproduction is crucial for population demography, determining how and to what relative extent it is constrained by different ecological factors is complicated by difficulties in studying the links between individual behavior, life history, and fitness in nature. We present data on females in a natural population of the butterfly Leptidea sinapis. These data were combined with climate records and laboratory estimates of life-history parameters to predict the relative impact of different ecological constraints on female fitness in the wild. Using simulation models, we partitioned effects of male courtship, host plant availability, and temperature on female fitness. Results of these models indicate that temperature is the most constraining factor on female fitness, followed by host plant availability; the short-term negative effects of male courtship that were detected in the field study were less important in models predicting female reproductive success over the entire life span. In the simulations, females with more reproductive reserves were more limited by the ecological variables. Reproductive physiology and egg-laying behavior were therefore predicted to be co-optimized but reach different optima for females of different body sizes; this prediction is supported by the empirical data. This study thus highlights the need for studying behavioral and life-history variation in orchestration to achieve a more complete picture of both demographic and evolutionary processes in naturally variable and unpredictable environments.