Agrifood systems (AFSs) generate environmental, social and health costs unaccounted for in market prices. True cost accounting makes hidden costs explicit, providing evidence for enhanced sustainability, equity and resilience. Combining project sites’ micro-level and national-level data, we assess externalities in Kenya and Viet Nam. At the national level, we find that externalities constitute one-third of AFS output value in Kenya, with social costs accounting for three-quarters of this total. In Viet Nam, externalities represent one-sixth of output, driven by environmental costs, constituting three-quarters of externalities. In project sites, external costs (excluding health) account for 30 per cent of production costs in Kenya, mostly driven by social costs (84 per cent). External costs represent 24 per cent of production costs in Viet Nam, among which environmental costs (61 per cent) dominate. Strategies to reduce costs include stronger labour regulations, investments in resource-efficient technologies and prudent input management. Priority interventions include empowering workers, strengthening farmer performance and addressing gender-based labour disparities.