Nutrient limitation is a key source of uncertainty in predicting terrestrial carbon (C) uptake. Models have begun to include nitrogen (N) dynamics; however, phosphorus (P), which can also limit or co-limit net primary production (NPP) in many ecosystems, is currently absent in most models. To meet this challenge, we integrated P dynamics into a cutting-edge plant nutrient uptake model (Fixation and Uptake of Nitrogen: FUN 2.0) that mechanistically tracks the C cost of N uptake from soil based on the cost of allocating C to leaf resorption and root/root-microbial uptake, and the availability of N in soil. We incorporated the direct C cost of P uptake, as well as a N cost of synthesizing phosphatase enzymes to extract P from soil, into a new model formulation (Fixation and Uptake of Nutrients: FUN 3.0). We confronted and validated FUN 3.0 against empirical estimates of canopy, root, and soil P pools from 45 temperate forest plots in Indiana, USA and 18 tropical dry forest plots located in Guanacaste, Costa Rica that vary in P availability and distribution of arbuscular mycorrhizal- (AM) and ectomycorrhizal- (ECM) associated trees. FUN 3.0 was able to accurately predict N and P retranslocation across the temperate and tropical forest sites (slopes of 0.95 and 0.92 for P and N retranslocation, respectively). Carbon costs for acquiring P were three times higher in tropical forest sites compared to temperate forest sites, driving overall higher C costs in tropical sites. In addition, the N costs for acquiring P in tropical forest sites lead to a substantial increase in N fixation to support phosphatase enzyme production. Sensitivity analyses showed that tropical sites appeared to be severely P limited, while the temperate sites showed evidence for co-limitation by N and P. Collectively, FUN 3.0 provides a novel framework for predicting coupled N and P limitation that earth system models can leverage to enhance predictions of ecosystem response to global change.