Agrivoltaics co-locate crops with solar photovoltaics (PV) to provide sustainability benefits across land, energy, and water systems. Policies supporting a switch from irrigated farming to rainfed, grid-connected agrivoltaics in regions experiencing groundwater stress can mitigate both groundwater depletion and CO2 from electricity generation. Here, hydrology, crop, PV, and financial models are integrated to assess the economic potential for rainfed agrivoltaics in groundwater-stressed regions. The analysis reveals 11.2-37.6 PWh/yr of power generation potential, equivalent to 40%-135% of the global electricity supply in 2018. Almost 90% of groundwater depletion in 2010 (∼150 km3) occurred where the levelized cost for grid-connected rainfed agrivoltaic generation is 50-100 USD/MWh. Potential revenue losses following the switch from irrigated to rainfed crops represent 0%-34% of the levelized generation cost. Future cost-benefit analysis must value the avoided groundwater stress from the perspective of long-term freshwater availability.