Gross primary production (GPP)-the uptake of carbon dioxide (CO2) by leaves, and its conversion to sugars by photosynthesis-is the basis for life on land. Earth System Models (ESMs) incorporating the interactions of land ecosystems and climate are used to predict the future of the terrestrial sink for anthropogenic CO21 . ESMs require accurate representation of GPP. However, current ESMs disagree on how GPP responds to environmental variations 1,2 , suggesting a need for a more robust theoretical framework for modelling 3,4 . Here, we focus on a key quantity for GPP, the ratio of leaf internal to external CO2 (χ). χ is tightly regulated and depends on environmental conditions, but is represented empirically and incompletely in today's models. We show that a simple evolutionary optimality hypothesis 5,6 predicts specific quantitative dependencies of χ on temperature, vapour pressure deficit and elevation; and that these same dependencies emerge from an independent analysis of empirical χ values, derived from a worldwide dataset of >3,500 leaf stable carbon isotope measurements. A single global equation embodying these relationships then unifies the empirical light-use efficiency model 7 with the standard model of C3 photosynthesis 8 , and successfully predicts GPP measured at eddy-covariance flux sites. This success is notable given the equation's simplicity and broad applicability across biomes and plant functional types. It provides a theoretical underpinning for the analysis of plant functional coordination across species and emergent properties of ecosystems, and a potential basis for the reformulation of the controls of GPP in next-generation ESMs.