Despite its frequent use in policy discussions on future agricultural production, both the concept of the yield gap and its determinants are understood differently by economists and agronomists. This study provides a micro-level framework that disentangles and integrates agronomic and economic approaches to yield gap measurement. It decomposes the conventional yield gap indicator into four components that together provide a better understanding of why actual farm yield falls below potential: (1) the technical efficiency yield gap, (2) the allocative yield gap, (3) the economic yield gap and (4) the technology yield gap. The results can be used to inform targeted policy and farming recommendations at plot, farm household, local and national level. The framework is operationalised and tested by combining results from crop models with detailed farm and plot level survey data for maize production in Tanzania.