As global grain demand is expected to keep on rising, productive but underachieving regions like the Argentine Pampas play a key role. Reduction of yield gaps in these regions would allow an increase in global food production. The objectives were to model the spatial patterns of the wheat (Triticum aestivum L.) yield gap in the Pampas and relate it to environmental factors. The study comprised an area of approximately 45 Mha during a 40‐yr interval. Attainable yield was estimated by a stochastic frontier production function adjusted on statistical data generated at county scale. Yield gap was calculated for each combination of climate and soil variables as the difference between attainable yield and the average yield estimated using an artificial neural network (ANN) model. Yield gap was then modeled by another ANN using as inputs climate and soil factors. Average yield gap was 865 kg ha−1 (25% of average attainable yield), ranging from 740 kg ha−1 (26%) in humid environments to 1140 kg ha−1 (42%) under semiarid ones during the last 5 yr. Yield gap could be adequately modeled with an ANN (R2 = 0.745, RMSE = 144 kg ha−1). The model showed that soil factors deeply impacted yield gap and minimum values were obtained in soils with medium to high organic C contents and available water storage capacity. Yield gap and a soil productivity index developed locally were negatively correlated. The methodology developed for yield gap analysis can be used for other crops and regions.Core Ideas Yield gap calculation combined two modeled yield levels, applying a frontier production function and an artificial neural network. Climate partially defined yield gaps; in semiarid environments these were largest. Soil properties explained 50% of yield gap variability at regional scale. Soil organic carbon and available water holding capacity interacted positively defining a minimum yield gap. Yield gap reducing efforts should be focused in low productivity soils.